- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Compare polynomial regression lines
This may be basic but I'm struggling to find a way around this in JMP. Pardon me if this has been discussed previously on this forum. I essentially want to statistically compare regression lines. However, these are polynomial curves. All the options I have tried in JMP fits a linear curve by default which is not a good fit for the data.
Briefly, I want to perform a hypothesis test to assess whether there are differences among the categories within my dataset. I am able to do this using the 'Fit Model' dialog. But I am unable to the regression as 3rd order polynomials. Hence, JMP automatically applies a linear fit.
Is there a way to tell JMP to perform polynomial fitting in the "Fit Model" dialog.
Your help is appreciated.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
You can build this model as well in fit model platform (Macros --> Polynomial to degree ...),
using sex in By-role you can fit separate regression models, save them as formula and compare them as you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
If you want a formal statistical test to compare the curves, then you would add the categorical variable into the model. Using Georg's example, your model would be Height, Height^2, Height^3, Sex, Sex*Height, Sex*Height^2, Sex*Height^3.
The test of the parameter for Sex would tell you if there are differences in the intercepts.
The test of the Sex*Height parameter would tell you if there are differences in the slopes of Height.
The test of Sex*Height^2 would tell you if there are differences in the quadratic parameter estimates.
The test of Sex*Height^3 would tell you if there are differences in the cubic parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
I think @Georg helped but didn't go far enough. That is to say, you need to add interaction terms for all the X terms. Here is the same example, but with an interaction term for all the :height terms:
So this case concludes that there is no need for a unique intercept, first-order, or second-order term across sexes.
Note that these effect tests are appropriate for a difference in the parameter estimates across groups. They are not appropriate for equivalence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
In platform fit y by x you can perform polynomial regression, and you can also show confidence region,
maybe this helps?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
Hello Georg,
Thanks but this doesn't help my situation. I have two categorial variables by which I need to compare the regressions.
So the Fit Y by X doesn't help, unless there's some way around this that I don't know.
What I need to do is fit a polynomial curve through the Fit Model dialogue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
You can build this model as well in fit model platform (Macros --> Polynomial to degree ...),
using sex in By-role you can fit separate regression models, save them as formula and compare them as you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
If you want a formal statistical test to compare the curves, then you would add the categorical variable into the model. Using Georg's example, your model would be Height, Height^2, Height^3, Sex, Sex*Height, Sex*Height^2, Sex*Height^3.
The test of the parameter for Sex would tell you if there are differences in the intercepts.
The test of the Sex*Height parameter would tell you if there are differences in the slopes of Height.
The test of Sex*Height^2 would tell you if there are differences in the quadratic parameter estimates.
The test of Sex*Height^3 would tell you if there are differences in the cubic parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Compare polynomial regression lines
I think @Georg helped but didn't go far enough. That is to say, you need to add interaction terms for all the X terms. Here is the same example, but with an interaction term for all the :height terms:
So this case concludes that there is no need for a unique intercept, first-order, or second-order term across sexes.
Note that these effect tests are appropriate for a difference in the parameter estimates across groups. They are not appropriate for equivalence.