cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
bbenny7
Level III

All pairs comparison in Fit curve platform

Hi,

In the attached example I have different several samples belonging to 5 difference groups.

I run the Fit curve platform to extrapolated the slope. Then, I would like to make all pairs comparison between the slopes. However, I can only find the compare parameter estimate which compares the different slopes against the average slope.

How can I run an all pairs comparison?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: All pairs comparison in Fit curve platform

Hi @bbenny7 ,

 

Because you have a simple linear model, you can use the Fit Model platform instead and make a model of X, Group and X*Group vs. Y and run a Standard Least Squares regression. In this there are a couple of tests to do pairwise comparison (Red Button in model > Multiple Comparisons > Pick something like a pairwise T test) and also do a slope comparison (Red Button > Estimates > Compare Sloped).

 

I've attached the data table you sent over with the model run for you. Hope it helps.

Thanks,

Ben

“All models are wrong, but some are useful”

View solution in original post

rcast15
Level III

Re: All pairs comparison in Fit curve platform

@bbenny7 @Ben_BarrIngh Just adding to the discussion. But the compare slopes option in Fit Model performs the exact same analyses as the compare parameter estimates in the Fit Curve platform. You are comparing each group's individual slope against the overall mean slope. If you want paired comparisons of slopes then the multiple comparison option cannot do this, as it only compares mean responses. You can see this if you look at the Multiple Comparisons output.

In order to get paired comparisons of slopes in a linear model like this, you can use the often-forgotten Custom test option in Fit Model. This allows you to specify linear contrasts of your parameter estimates for your specified model. I find these tricky to understand at first as you need to know how contrasts work and how JMP parameterizes their model coefficients. 

What I like to do is to fire up Custom Test and click "Add Column" to get the same number of columns of group slopes that I have. Then you can get your individual slope estimates for each group by specifying a +1 for the X term, or the overall average slope, and a 1 for the group*X interaction for each group. Now due to parameterization of linear models, the final group is actually a +1 for the overall average slope term and a -1 for the other 4 groups. This will get you your slope estimate for Group E. You can also verify all of these estimates by doing the math yourself, or by looking at the Compare Slopes output which shows the group slopes.

Finally, in order to get any paired difference in group slopes, you just subtract the 2 columns of interest. In the example I saved to your data table I first found each group slope estimate, A-E in that order, and then in the 6th final column I took the 1st column-5th column. This result is a linear contrast of the differences in slopes for Group A and group E. Which turns out to be 2.1786. You can always double check this result by just doing subtraction on the individual slope estimates you get from anywhere else in the report. The nice thing about this method however is that you get a standard error for this difference in slopes estimate, as well as a p-value.

Sorry for the long explanation but I leverage Custom Tests quite a bit for this exact function and thought I would share.

View solution in original post

8 REPLIES 8

Re: All pairs comparison in Fit curve platform

Hi @bbenny7 ,

 

Because you have a simple linear model, you can use the Fit Model platform instead and make a model of X, Group and X*Group vs. Y and run a Standard Least Squares regression. In this there are a couple of tests to do pairwise comparison (Red Button in model > Multiple Comparisons > Pick something like a pairwise T test) and also do a slope comparison (Red Button > Estimates > Compare Sloped).

 

I've attached the data table you sent over with the model run for you. Hope it helps.

Thanks,

Ben

“All models are wrong, but some are useful”
bbenny7
Level III

Re: All pairs comparison in Fit curve platform

Thanks @Ben_BarrIngh , this is what I was looking for.

rcast15
Level III

Re: All pairs comparison in Fit curve platform

@bbenny7 @Ben_BarrIngh Just adding to the discussion. But the compare slopes option in Fit Model performs the exact same analyses as the compare parameter estimates in the Fit Curve platform. You are comparing each group's individual slope against the overall mean slope. If you want paired comparisons of slopes then the multiple comparison option cannot do this, as it only compares mean responses. You can see this if you look at the Multiple Comparisons output.

In order to get paired comparisons of slopes in a linear model like this, you can use the often-forgotten Custom test option in Fit Model. This allows you to specify linear contrasts of your parameter estimates for your specified model. I find these tricky to understand at first as you need to know how contrasts work and how JMP parameterizes their model coefficients. 

What I like to do is to fire up Custom Test and click "Add Column" to get the same number of columns of group slopes that I have. Then you can get your individual slope estimates for each group by specifying a +1 for the X term, or the overall average slope, and a 1 for the group*X interaction for each group. Now due to parameterization of linear models, the final group is actually a +1 for the overall average slope term and a -1 for the other 4 groups. This will get you your slope estimate for Group E. You can also verify all of these estimates by doing the math yourself, or by looking at the Compare Slopes output which shows the group slopes.

Finally, in order to get any paired difference in group slopes, you just subtract the 2 columns of interest. In the example I saved to your data table I first found each group slope estimate, A-E in that order, and then in the 6th final column I took the 1st column-5th column. This result is a linear contrast of the differences in slopes for Group A and group E. Which turns out to be 2.1786. You can always double check this result by just doing subtraction on the individual slope estimates you get from anywhere else in the report. The nice thing about this method however is that you get a standard error for this difference in slopes estimate, as well as a p-value.

Sorry for the long explanation but I leverage Custom Tests quite a bit for this exact function and thought I would share.

rcast15
Level III

Re: All pairs comparison in Fit curve platform

Forgot to attach the updated data table

Re: All pairs comparison in Fit curve platform

Great point @rcast15, thanks for adding on all those details for the answer, I learned something new!

“All models are wrong, but some are useful”
MRB3855
Super User

Re: All pairs comparison in Fit curve platform

Re: All pairs comparison in Fit curve platform

Hi @bbenny7.

I just wanted to add that the ability to do all pairwise comparisons of slopes in Fit Model Standard Least Squares, REML, and Mixed Models has been added in JMP 19.  For example, if I use your data and run a standard least squares regression like @Ben_BarrIngh ran and choose Estimates >> Compare Slopes from the main red triangle menu and turn off Comparisons with Overall Average from the Slope Comparisons for group*X menu, I will get the following report of Student's t All Pairwise Comparisons:

SlopeCompare1.jpg

Here is a picture of all the options available for slope comparisons in JMP 19:

SlopeCompare2.jpg

I hope this is helpful.

Laura

 

 

rcast15
Level III

Re: All pairs comparison in Fit curve platform

@Laura_Lancaster 

That is a great add I had no idea that was included in 19, thanks for sharing! Sounds like I need to get v19.0

Recommended Articles