Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- extend regression line through intercept

Topic Options

- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 19, 2013 9:49 AM
(7482 views)

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!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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.

11 REPLIES 11

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

** before** you add the Fit Line. The line will span all visible X values.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: extend regression line through intercept

Thanks Julian, will pass posting this along.

Mia

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- 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.

JMP Systems Engineer, Pharm and BioPharm Sciences

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- 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
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- 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.

Jim

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: extend regression line through intercept

Yes, but when I do that it doesn't work all the time. I have some plots I

generated that still don't work.

Tyler

generated that still don't work.

Tyler