cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
ad
ad
Level II

Add linear fit , eqn, R^2 to overlay plots

Hi, 

I cannot add linear fit and display equation & R^2 values when using overlay plot feature in jmp by label : 0 and 1.  See the attached excel for data and desired plot. 

 

Can you please help ? 

 

Thanks a lot. 

 Microsoft ExcelScreenSnapz001.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Add linear fit , eqn, R^2 to overlay plots

Your Excel sheet does not have the data, but here is an approach that should work.

 

Go to Graph Builder.

Drag your X variable to the X zone.

Drag your Y variable to the Y zone.

Drag your Label variable to the Overlay zone.

This should give you a scatterplot with different colors for each value of the Label variable.

Now click on the Graph element for the regression line.

 

You can then modify what is displayed by looking at the regression line options to the left of the graph.

Here is an example using the Big Class data.

Graph Builder.png

Dan Obermiller

View solution in original post

Re: Add linear fit , eqn, R^2 to overlay plots

Graph Builder is designed for graphs, not analysis. Fortunately, everything you want to do can be done through Fit Y by X which is an analysis platform.

 

Choose Fit Y by X. Specify your X and Y variables.

When the scatterplot appears, go to the red triangle and choose Group By... and specify your labels variable.

Go to Fit Special and choose your transformed fit. It will be done for each value of the labels variable. 

Right-click the Y-axis and select  Axis Settings. In the dialog, in the upper left is the scale control for you to change to a log axis.

Dan Obermiller

View solution in original post

4 REPLIES 4

Re: Add linear fit , eqn, R^2 to overlay plots

Your Excel sheet does not have the data, but here is an approach that should work.

 

Go to Graph Builder.

Drag your X variable to the X zone.

Drag your Y variable to the Y zone.

Drag your Label variable to the Overlay zone.

This should give you a scatterplot with different colors for each value of the Label variable.

Now click on the Graph element for the regression line.

 

You can then modify what is displayed by looking at the regression line options to the left of the graph.

Here is an example using the Big Class data.

Graph Builder.png

Dan Obermiller
ad
ad
Level II

Re: Add linear fit , eqn, R^2 to overlay plots

Hi Dan, 

 

Thanks a lot for your quick solution. I appreciate it.

 

One more thing: If I want to change Y axis to log scale & want to do Fit Special : Transformed Fit log, can I acheive this in Graph Builder mode ?

 

THanks,

Re: Add linear fit , eqn, R^2 to overlay plots

Graph Builder is designed for graphs, not analysis. Fortunately, everything you want to do can be done through Fit Y by X which is an analysis platform.

 

Choose Fit Y by X. Specify your X and Y variables.

When the scatterplot appears, go to the red triangle and choose Group By... and specify your labels variable.

Go to Fit Special and choose your transformed fit. It will be done for each value of the labels variable. 

Right-click the Y-axis and select  Axis Settings. In the dialog, in the upper left is the scale control for you to change to a log axis.

Dan Obermiller
ad
ad
Level II

Re: Add linear fit , eqn, R^2 to overlay plots

Hi Dan, 

 

Thanks a lot! Really appreciate your help.