<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equat in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52756#M29876</link>
    <description>&lt;P&gt;This uses the fit curve platfrom and saves a formula column with the inverse predictions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=open("$Sample_Data/Big Class.jmp");
model= Fit Curve( Y( :height ), X( :weight ) );
model&amp;lt;&amp;lt; Fit Linear(Save Inverse Prediction Formula);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you could either just use the values in the table, but you could also get the formula column property,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 21:06:28 GMT</pubDate>
    <dc:creator>Byron_JMP</dc:creator>
    <dc:date>2018-03-07T21:06:28Z</dc:date>
    <item>
      <title>JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equation?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52745#M29868</link>
      <description>&lt;P&gt;I'm currently using JSL for the first time to automate data anlysis/reporting. My analysis involves:&lt;/P&gt;&lt;P&gt;1. Importing the required data (done)&lt;/P&gt;&lt;P&gt;2. Analysing the data (data)&lt;/P&gt;&lt;P&gt;3. Using computed data to perform a bivariate analysis and fitting a line (done)&lt;/P&gt;&lt;P&gt;4. Using the generated regression equation to predict 'x' for specific 'y' values: Here's where my problem lies. I'd like to have the capability of dynamically generating 'x' from 'y' in JSL. I also don't want to have to type in the regression equation manually since this would differ for different data sets.&lt;/P&gt;&lt;P&gt;Any pointers?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:59:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52745#M29868</guid>
      <dc:creator>Ainaskid</dc:creator>
      <dc:date>2018-03-07T17:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equat</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52749#M29870</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11176"&gt;@Ainaskid&lt;/a&gt;&lt;/P&gt;&lt;P&gt;There's probably a million ways to get what you are trying to do.&amp;nbsp; It depends on how you want to give the values of the predictors to get the predicted response.&amp;nbsp; Do you want to do it in a dialog box where the user inputs a number, presses a button, and the window returns a prediction?&amp;nbsp; Would it be acceptable to just put new values of X as additional rows in your data table and have a prediction formula return the predicted value in a column?&lt;/P&gt;&lt;P&gt;I'll show you quickly how to do the latter since it is easier.&amp;nbsp; Here's an example using the Big Class data set and predicting height from weight:&lt;/P&gt;&lt;PRE&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );&lt;BR /&gt;&lt;BR /&gt;biv = dt &amp;lt;&amp;lt; Bivariate( Y( :height ), X( :weight ), Fit Line() ); //get reference to Bivariate object&lt;BR /&gt;rpt = (biv &amp;lt;&amp;lt; Report); //get reference to report window for Biv&lt;BR /&gt;&lt;BR /&gt;//get the coefficients from the parameter estimates table&lt;BR /&gt;Coefs = (rpt["Parameter Estimates"][Table Box( 1 )] &amp;lt;&amp;lt; Get as Matrix)[0, 1]; &lt;BR /&gt;&lt;BR /&gt;//Create prediction formula from the coefficients&lt;BR /&gt;Eval(&lt;BR /&gt; Parse( &lt;BR /&gt; Eval Insert( "\[dt &amp;lt;&amp;lt; New Column("Prediction Formula", formula(^Coefs[1]^ + ^Coefs[2]^*:weight))]\" )&lt;BR /&gt; )&lt;BR /&gt;);&lt;BR /&gt;//You'll want to hard code in the value of the coefs using the string&lt;BR /&gt;//Otherwise this column won't work once Coefs is no longer defined or the value has changed&lt;BR /&gt;//The "Eval Insert" function inserts the value of Coefs[1] and Coefs[2] into the formula - this is how it is hard-coded in&lt;/PRE&gt;&lt;P&gt;Now, you should see a new column in Big Class with the predictions.&amp;nbsp; Since it's a formula, I can add new rows with weight values and get new height predictions.&amp;nbsp; Here, I added a row for 200, and got 75.42 as the prediction&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Predictions.PNG" style="width: 474px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/9738iD22937786447DD88/image-size/large?v=v2&amp;amp;px=999" role="button" title="Predictions.PNG" alt="Predictions.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to point out that this is even easier if you fit the model in the Fit Model platform instead since you can just send a &amp;lt;&amp;lt; Prediction Formula&amp;nbsp;message to the Fit Model object to get the column with the prediction formula.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;FitMod = dt &amp;lt;&amp;lt; Fit Model(
	Y( :height ),
	Effects( :weight ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Effect Leverage" ), Run()
);

FitMod &amp;lt;&amp;lt; Prediction Formula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Mar 2018 18:39:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52749#M29870</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-03-07T18:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equat</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52750#M29871</link>
      <description>&lt;P&gt;Another approach: Use Fit Model and then use the Inverse Prediction command.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 18:34:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52750#M29871</guid>
      <dc:creator>Dan_Obermiller</dc:creator>
      <dc:date>2018-03-07T18:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equat</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52751#M29872</link>
      <description>&lt;P&gt;The easiest way might be to use Fit Model and get the Fit Least Squares platform that has Inverse Prediction built in.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 18:37:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52751#M29872</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-03-07T18:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equat</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52753#M29874</link>
      <description>&lt;P&gt;I should have asked for clarification.&amp;nbsp; Did you really want to do inverse prediction?&amp;nbsp; If so, you can still use my method and just do a formula with (:height - coef[1])/coef[2]&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 18:42:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52753#M29874</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-03-07T18:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: JSL- Is there a way to automatically interpolate 'x' values from from 'y' using regression equat</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52756#M29876</link>
      <description>&lt;P&gt;This uses the fit curve platfrom and saves a formula column with the inverse predictions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=open("$Sample_Data/Big Class.jmp");
model= Fit Curve( Y( :height ), X( :weight ) );
model&amp;lt;&amp;lt; Fit Linear(Save Inverse Prediction Formula);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you could either just use the values in the table, but you could also get the formula column property,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 21:06:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Is-there-a-way-to-automatically-interpolate-x-values-from/m-p/52756#M29876</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2018-03-07T21:06:28Z</dc:date>
    </item>
  </channel>
</rss>

