Subscribe Bookmark RSS Feed

Analyze trend

sajanjiv

New Contributor

Joined:

Jun 22, 2017

Hi 

I am comparing Google search data between 3 cancers as part of a small project, and have the attached file generated from Google trends data. How do I see if the searches for a particular cancer are going up with time?, and if so is the difference in trend significant? Next, can I compare trends between cancers C, P and L (from the attached file)?

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

The first issue I see with this request is that it looks very much like a homework assignment.  Please excuse my assumption if it is not.

The second issue, is that your "Month: column has been input as a character column.  For any analysis across time this column needs to be changed to being numeric.

 

Jim
sajanjiv

New Contributor

Joined:

Jun 22, 2017

Thanks Tx. This is not a homework assignment. I am a Gastroenterology
fellow and way older than homework days unfortunately...

Sure. Please feel free to change the column to numeric if the analysis
requires.
pmroz

Super User

Joined:

Jun 23, 2011

The code below adds a numeric date column (assumes 1st of every month) and creates a graph using Graph Builder.

dt = data table("CancerIS_JMP");

dt << New Column( "Month Dt",
		Numeric,
		"Continuous",
		Format( "ddMonyyyy", 10 ),
		Input Format( "ddMonyyyy" ),
		Formula( Informat( :Month || "-01", "yyyy-mm-dd" ) )
);

gb = dt << Graph Builder(
	Size( 530, 452 ),
	Show Control Panel( 0 ),
	Variables( X( :Month Dt ), Y( :IS ), Overlay( :Cancer Type ) ),
	Elements( Line( X, Y, Legend( 15 ) ), Points( X, Y, Legend( 16 ) ) )
);

IS_graph.png

You can do a visual inspection to see there are any upward trends.  If you need something more quantitative you could fit a model.