topic Re: Extend linear regression line in JMP version 13 in Discussions
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51185#M29057
<P>Hi <LI-USER uid="6566"></LI-USER>,</P>
<P>I see just what you mean! There are a few ways to go about this. Using rows with value ranges staggered by column you can achieve the same result, regardless of what variable is the X or Y:<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2018-02-13 at 12.43.55 PM.png" style="width: 400px;"><img src="https://community.jmp.com/t5/image/serverpage/image-id/9319i0441EA5CBD28FEFE/image-size/medium?v=1.0&px=400" title="Screen Shot 2018-02-13 at 12.43.55 PM.png" alt="Screen Shot 2018-02-13 at 12.43.55 PM.png" /></span>I agree that's not ideal, and in Fit Y by X in JMP 14 the line will extend by default. Another option: Graph Builder has a nice functionality for that sort of plotting using the Formula element, which might be useful to you in general. Write your own formula in a formula column, or for any model save your prediction formula for the mean, as well as the formula columns for the confidence intervals (if you want, but make sure to save the formula columns, not just the values), then pull up graph builder, use the same X as the X variable, then all your formula columns for the Y variable, and then click the Formula graph element. You can then change line colors and styles if you like.</P>
<P> </P>
<P>I hope this helps some!</P>
<P> </P>
<P><LI-USER uid="2026"></LI-USER></P>
<P> </P>
<P><LI-VIDEO vid="thYmJjZTE6-oHbE4Ybj_ScO-kI_F-C98" width="320" height="200" size="original" uploading="false" thumbnail="http://cf.c.ooyala.com/thYmJjZTE6-oHbE4Ybj_ScO-kI_F-C98/Ut_HKthATH4eww8X4xMDoxOjA0MTuSZS" align="center"></LI-VIDEO></P>Tue, 13 Feb 2018 17:48:44 GMTjulian2018-02-13T17:48:44ZExtend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35195#M20770
<P>Hi,</P>
<P> </P>
<P>I have a question regarding the Fit Line functionality in version 13.</P>
<P>In version 10, I was able to make graphs with a linear regression line that extended beyond the data points (see figure). However in version 13 the linear regression line stops at the last data point. Is there a setting in version 13 to achieve the extension of the linear regression beyond the last data point?</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="example.png" style="width: 513px;"><img src="https://community.jmp.com/t5/image/serverpage/image-id/9315iB74E996220CAA611/image-size/large?v=1.0&px=999" title="example.png" alt="example.png" /></span></P>
<P> </P>
<P>Thanks!</P>Tue, 13 Feb 2018 16:01:03 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35195#M20770RobRobeyns2018-02-13T16:01:03ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35198#M20771
<P>You can use either the annotation tools, or in JSL use the Add Graphics capability to add to the fit line, however, since it is a regression, which is based upon the parameters within the data, and not a forcasting tool, having the fit line project beyond the known data points would be statictically improper. So what you are seeing is a correction of an error in JMP 10.</P>Thu, 02 Feb 2017 11:22:36 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35198#M20771txnelson2017-02-02T11:22:36ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35503#M20947
<P>I agree with Jim's concerns about extrapolating beyond the range of data observed. However, if you wish to do this you can add in a new row to the table with a value beyond the range of data for just your X variable, and JMP will then extend the line to that point. Since there is no Y value associated with that row this will not change the regression results. </P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Extrapolate.gif" style="width: 824px;"><img src="https://community.jmp.com/t5/image/serverpage/image-id/5051i3AC3280F5E076250/image-size/large?v=1.0&px=999" title="Extrapolate.gif" alt="Extrapolate.gif" /></span></P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>Wed, 08 Feb 2017 16:31:37 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35503#M20947julian2017-02-08T16:31:37ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35549#M20965
<P>Great! Thanks for the feedback!</P>Thu, 09 Feb 2017 08:57:31 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/35549#M20965RobRobeyns2017-02-09T08:57:31ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36022#M21208
<P>Adding a 0 on x didn't work. Had to use Annotation tools with fit where intercept is forced to zero where it is impossible to have any other intercept value other than (0,0).</P>Fri, 17 Feb 2017 16:50:08 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36022#M21208cfranklin3332017-02-17T16:50:08ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36023#M21209
<P>There are, obviously, times where you want to force the intercept to 0, but a caution: this changes the interpretation of many of the regression statistics that you are looking at. Essentially, by forcing the intercept to be 0, you are saying that the mean is 0 (think of centered/scaled data). This can be especially problematic if you are extrapolating beyond the range of your data.</P>
<P> </P>
<P>Another simple way to think of this: think of a plot of height versus weight. You can fit a line to that data. Should that line be forced to go through the (0,0) point? If you have no height, you would not have a weight so it makes sense. However, the linear relationship likely would not hold from the lowest height datapoint to 0. Forcing it to be linear across the entire range can cause problems.</P>Fri, 17 Feb 2017 16:56:18 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36023#M21209Dan_Obermiller2017-02-17T16:56:18ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36024#M21210
Also need to extrapolate for stability / shelf-life extension based on 95% CI of trend. Unable to get Degradation to provide similar to existing visual plots.Fri, 17 Feb 2017 17:08:35 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36024#M21210cfranklin3332017-02-17T17:08:35ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36025#M21211
<P>You can use <STRONG>Bivariate</STRONG> > <STRONG>Fit Special</STRONG> command to select a No Intercept trend analysis.</P>Fri, 17 Feb 2017 17:12:44 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/36025#M21211markbailey2017-02-17T17:12:44ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/42142#M24557
<P>This has been one of my fustrations with the JMP program, as new rollouts have made the program less flexible and useable. If alternative work-arounds are being offered for functions that use to be available in past versions, then why was that functionality removed in the first place?</P>Wed, 19 Jul 2017 14:18:43 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/42142#M24557KV2017-07-19T14:18:43ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/42143#M24558
<P>For large and complicated datasets the work-around is not feasible.</P>Wed, 19 Jul 2017 14:20:31 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/42143#M24558KV2017-07-19T14:20:31ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/42173#M24572
<P>When first-generation food processors cut off fingers, responsible manufacturers added interlocks to the covers.</P><P> </P><P>When Taylor Series approximations were improperly used to extrapolate beyond the range of the data, responsible manufacturers disabled that functionality.</P><P> </P><P>I think Jim and Dan are right. Just say no to the workarounds. If you simply must extrapolate, fit a deterministic (usually nonlinear) model.</P>Wed, 19 Jul 2017 19:21:42 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/42173#M24572Kevin_Anderson2017-07-19T19:21:42ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/48665#M27676
<P>Regarding this issue of extending best-fit lines to the limits of the (say) X graph range limits, I would like suggest a scenario where it is very useful to have these best-fit lines extend beyond the data. In my work, EVERY SINGLE DAY I do an analysis where two variables should have perfect 1:1 correlation (slope of 1, intercept of zero). And this 1:1 correlation should extend across range that far exceeds my data limits. The actual X vs Y never a that true 1:1 correlation -- and that's very useful to know. But to help grasp this, I like to explicitly add the 1:1 line to the graph. And I want this 1:1 line to extend far beyond the data limits so that when I also do a best-fit on the actual data, even though the best-fit line is limited to the range of available data, I can use the 1:1 line as "tilted floor" of comparison. I fully understand why best-fit data shouldn't be extrapolated (too far) beyond the available data, but why can't I include an extended 1:1 line??? (Yes, I can add it as a graphical object, but that's just JMP *creating* work for me rather than JMP simlifying my work.) Comments?</P>Fri, 15 Dec 2017 00:13:14 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/48665#M27676nocaltim2017-12-15T00:13:14ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/48666#M27677
<P>While there are almost always exceptions to rules, I believe JMP has taken the most prudent road with the way they have implemented the platform. </P>Fri, 15 Dec 2017 00:43:10 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/48666#M27677txnelson2017-12-15T00:43:10ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51173#M29053
Mark, I have a need to make the plots extrapolate to a population not existing in the data set to provide predictive models of what we will see from known variation in time. Constraining slope wrecks the statistical validity. I had developed this method in a previous revision of JMP and this will force an entire team of several hundred engineers to move away from JMP as a platform. Do we have a better fix than this?Tue, 13 Feb 2018 15:56:21 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51173#M29053quantum2018-02-13T15:56:21ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51180#M29054
<P>A great place to request (or add back) certain functionality would be in the new JMP Wish List:</P>
<P> </P>
<P><A href="https://community.jmp.com/t5/JMP-Wish-List/idb-p/jmp-wish-list" target="_self">https://community.jmp.com/t5/JMP-Wish-List/idb-p/jmp-wish-list</A></P>
<P> </P>
<P>Developers are looking at this list for upcoming versions and this sounds like a great thing to add to that list (if it is not already there).</P>Tue, 13 Feb 2018 17:01:35 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51180#M29054chris_kirchberg2018-02-13T17:01:35ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51182#M29055
<P>Hi <LI-USER uid="11011"></LI-USER>,<BR /><BR /></P>
<P>The fix/trick I listed above will work in JMP 13 to extend a regression line (and in JMP 14 this will happen automatically). Is there something else you would like to do?<BR /><BR /></P>
<P><LI-USER uid="2026"></LI-USER></P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="extend.png" style="width: 400px;"><img src="https://community.jmp.com/t5/image/serverpage/image-id/9318i0C79BE3DC6B43DCE/image-size/medium?v=1.0&px=400" title="extend.png" alt="extend.png" /></span></P>
<P> </P>
<P> </P>
<P> </P>Tue, 13 Feb 2018 17:19:56 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51182#M29055julian2018-02-13T17:19:56ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51183#M29056
<P>Hi Julian,</P><P>The problem with your "trick" is this: Suppose I have a data table with three columns of data -- Age, Height, Weight. Sometimes I will plot Age vs Weight, sometimes I will plot Age vs Weight, sometimes I will plot Height vs Weight, and sometimes I will invert the X and Y values (Weight vs Age instead of Age vs Weight). Your trick works only if I have only a single X value for all plots. Correct? Or am I missing something? And, if I am correct, it becomes a real pain to manage as to which column (Age, Weight, Height) will be the X-value for the next plot that I will be making (or re-making via a script). Instead...JMP should -- at a minimum -- allow forced-fits (where I am prescribing the slope and intercept, for example) to extend to the limits of the X and Y plot window limits.</P><P> </P>Tue, 13 Feb 2018 17:32:06 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51183#M29056nocaltim2018-02-13T17:32:06ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51185#M29057
<P>Hi <LI-USER uid="6566"></LI-USER>,</P>
<P>I see just what you mean! There are a few ways to go about this. Using rows with value ranges staggered by column you can achieve the same result, regardless of what variable is the X or Y:<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2018-02-13 at 12.43.55 PM.png" style="width: 400px;"><img src="https://community.jmp.com/t5/image/serverpage/image-id/9319i0441EA5CBD28FEFE/image-size/medium?v=1.0&px=400" title="Screen Shot 2018-02-13 at 12.43.55 PM.png" alt="Screen Shot 2018-02-13 at 12.43.55 PM.png" /></span>I agree that's not ideal, and in Fit Y by X in JMP 14 the line will extend by default. Another option: Graph Builder has a nice functionality for that sort of plotting using the Formula element, which might be useful to you in general. Write your own formula in a formula column, or for any model save your prediction formula for the mean, as well as the formula columns for the confidence intervals (if you want, but make sure to save the formula columns, not just the values), then pull up graph builder, use the same X as the X variable, then all your formula columns for the Y variable, and then click the Formula graph element. You can then change line colors and styles if you like.</P>
<P> </P>
<P>I hope this helps some!</P>
<P> </P>
<P><LI-USER uid="2026"></LI-USER></P>
<P> </P>
<P><LI-VIDEO vid="thYmJjZTE6-oHbE4Ybj_ScO-kI_F-C98" width="320" height="200" size="original" uploading="false" thumbnail="http://cf.c.ooyala.com/thYmJjZTE6-oHbE4Ybj_ScO-kI_F-C98/Ut_HKthATH4eww8X4xMDoxOjA0MTuSZS" align="center"></LI-VIDEO></P>Tue, 13 Feb 2018 17:48:44 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51185#M29057julian2018-02-13T17:48:44ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51196#M29063
<P>This works acceptably on multiple data sets contained in the same column as split by a group column. this will work nicely although in JMP 14 I do look forward to seeing this operate by default. </P>Tue, 13 Feb 2018 19:58:09 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51196#M29063quantum2018-02-13T19:58:09ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51264#M29077
<P>I just need to say this, to get it out of my system. I understand there are exceptions to almost every rule, but:</P><P> </P><P>1. Most physical phenomena are described by sums and/or products of differential equations. These differential equations are usually nonlinear in the parameters by nature. (This means something different than "curved"!!)</P><P> </P><P>2. Since these sums and/or products of differential equations are very difficult to model, we tend to fit Taylor Series approximations to them, since they are much easier to specify and can often do an acceptable job of fitting the data. These approximations are necessarily fit only over the range of the existing data.</P><P> </P><P>3. Making predictions by extrapolating these approximations outside the existing data is like playing Russian Roulette.</P><P> </P><P>Please don't be too upset if JMP and the responsible denizens of this community don't want to help you load your gun!</P><P> </P><P>You can do anything your heart desires, no matter how statistically ill-considered or exceptional, by writing a JSL script. Scripts can be easily deployed across an enterprise. You may wish to consider writing some JSL to implement your procedures.</P><P> </P><P>Good luck!</P>Tue, 13 Feb 2018 23:42:02 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/51264#M29077Kevin_Anderson2018-02-13T23:42:02ZRe: Extend linear regression line in JMP version 13
https://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/66734#M34483
Today teaching "JMP Software: ANOVA and Regression", in JMP13.1 and JMP14. It is fixed in JMP14.0, can see the extrapolation in Bivariate. Student has JMP13.1, stops at last data point. So to fix, upgrade to free JMP14.0 for current license owners. Note there are some reported bugs in JMP14.0, so do not uninstall JMP13. It is nice that the upgrade does not overwrite the previous version like other software, you can keep both versions with same license.Mon, 06 Aug 2018 19:13:39 GMThttps://community.jmp.com/t5/Discussions/Extend-linear-regression-line-in-JMP-version-13/m-p/66734#M34483Vball2472018-08-06T19:13:39Z