- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
extend regression line through intercept
Hi All,
there may be an easy way to do this but I haven't figured it out yet. I just want the regression line to pass through the y-axis at the intercept. So far, I can only get results like what I included in the attachment.
thanks for any help!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
If you're in Bivariate, just reset the X axis to include 0 before you add the Fit Line. The line will span all visible X values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
If you're in Bivariate, just reset the X axis to include 0 before you add the Fit Line. The line will span all visible X values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
Xan, is there a way to do this for Fit Spline, either here or for the smoother in Graph Builder? I.e. extend the smoother through x=0?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
Hi @mia_stephens,
It seems neither Graph Builder nor Fit Y by X will extend a smoother out of the box. There is a way to this, but it requires a few steps:
- Launch Fit Y by X with your Y and X, and fit a spline of your choosing (Red Triangle > Flexible > Fit Spline).
- Go to the Red Triangle for the smoothing fit > Save Predicteds. JMP will not just save the predicted Ys, but a prediction formula using the Spline Eval() function and a coefficient matrix.
- Launch Graph > Graph Builder, add your predictor as the X, and the new saved formula column as the Y
- Toggle the Formula graphing element
- If you want to have the original points plotted, drag your original Y column to the drop zone to add a variable to Y, and then shift-click the Points element (or drag the points element to the plot).
- You will be plotting points for both the formula column as well as the original Y; if you don't want this, expand the controls for the points and uncheck the box for the spline predictor under variables.
Now, whether or not this is a good idea of course depends on the data and how flexible that model is. In the example below this particular extrapolation returns a prediction of -29,714 lbs for someone 0 inches tall :)
I hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
Thanks Julian, will pass posting this along.
Mia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
Thanks so much! I knew it'd be a quick and easy one
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
If you happen to forget to reset the axis before fitting the line...
Click the red triangle menu on the linear fit, and then select "set alpha level", 0.05 is the default so click that.
This will redraw the regression line, and it will also redraw the confidence intervals of the individual and fit too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
Do you know how to do this using the JMP script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
All you have to do to get the JMP script for this, is to generate the bivariate plot interactively, and then go to the red triangle in the output, and select "Save Script". It will give you your script for reproducing the chart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: extend regression line through intercept
generated that still don't work.
Tyler