<?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: Need coefficients for equation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225052#M44716</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15456"&gt;@raj138&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you are using the JMP UI and using JMP Fit Y by X, then select &lt;STRONG&gt;Fit Special&lt;/STRONG&gt; and the dialog window below will appear:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;uncheck &lt;STRONG&gt;Centered Polynomial&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Select Quartic for a 4th order polynomial&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 471px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19177i5BF2E1DAF11979ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 524px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19178iA85604D4EAE189AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are scripting there are numerous methods to get this, here is one example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

dt = New Table( "Coef Example",
	Add Rows( 6 ),
	New Column( "X",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [12, 13, 16, 23, 33, 41] )
	),
	New Column( "Y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [111, 213, 654, 222, 877, 94] )
	)
);

biv = dt &amp;lt;&amp;lt;Bivariate(
	Y( :Y ),
	X( :X ),
	Fit Special(
		Degree( 4 ),
		Centered Polynomial( 0 )
	)
);
coef_vec = Report(biv )["Parameter Estimates"][NumberColBox(1)] &amp;lt;&amp;lt; Get as Matrix;
eqn_txt  = Report(biv )["Polynomial Fit Degree=4"][TextBox(1)] &amp;lt;&amp;lt; get text;

show(coef_vec, eqn_txt);
/*:

coef_vec = [-19170.6096344096, 3588.21966043696, -233.095589066526, 6.37271344368134, -0.0620122936283627];
eqn_txt = "Y = -19170.61 + 3588.2197*X - 233.09559*X^2 + 6.3727134*X^3 - 0.0620123*X^4";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Sep 2019 00:43:15 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2019-09-07T00:43:15Z</dc:date>
    <item>
      <title>Need coefficients for equation</title>
      <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225028#M44711</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to generate the coefficients for the fit equation between 2 variables. However JMP generates equations by modifying the independent variable, which is not what I want. Is there anything that can be done to avoid JMP in doing so?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for the below table, JMP generates this equation, "Y = 1124.1 - 38.7*X + 9.8*(X-23)^2 + 0.7*(X-23)^3 - 0.1*(X-23)^4".&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is just A*X^4 + B*X^3 + C*X^2 + D*X + E. How do I get it in this form?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;213&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;654&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;222&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;33&lt;/TD&gt;&lt;TD&gt;877&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;41&lt;/TD&gt;&lt;TD&gt;94&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 23:09:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225028#M44711</guid>
      <dc:creator>raj138</dc:creator>
      <dc:date>2019-09-06T23:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need coefficients for equation</title>
      <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225052#M44716</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15456"&gt;@raj138&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you are using the JMP UI and using JMP Fit Y by X, then select &lt;STRONG&gt;Fit Special&lt;/STRONG&gt; and the dialog window below will appear:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;uncheck &lt;STRONG&gt;Centered Polynomial&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Select Quartic for a 4th order polynomial&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 471px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19177i5BF2E1DAF11979ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 524px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19178iA85604D4EAE189AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are scripting there are numerous methods to get this, here is one example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

dt = New Table( "Coef Example",
	Add Rows( 6 ),
	New Column( "X",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [12, 13, 16, 23, 33, 41] )
	),
	New Column( "Y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [111, 213, 654, 222, 877, 94] )
	)
);

biv = dt &amp;lt;&amp;lt;Bivariate(
	Y( :Y ),
	X( :X ),
	Fit Special(
		Degree( 4 ),
		Centered Polynomial( 0 )
	)
);
coef_vec = Report(biv )["Parameter Estimates"][NumberColBox(1)] &amp;lt;&amp;lt; Get as Matrix;
eqn_txt  = Report(biv )["Polynomial Fit Degree=4"][TextBox(1)] &amp;lt;&amp;lt; get text;

show(coef_vec, eqn_txt);
/*:

coef_vec = [-19170.6096344096, 3588.21966043696, -233.095589066526, 6.37271344368134, -0.0620122936283627];
eqn_txt = "Y = -19170.61 + 3588.2197*X - 233.09559*X^2 + 6.3727134*X^3 - 0.0620123*X^4";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 00:43:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225052#M44716</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-09-07T00:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need coefficients for equation</title>
      <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225054#M44717</link>
      <description>&lt;P&gt;Additional solutions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use Fit Model, click the red triangle in the top left corner of the launch dialog and de-select &lt;STRONG&gt;Center Polynomials&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you saves the fitted centered model as a column formula, open the formula in the Formula Editor, click the red triangle above the formula and select &lt;STRONG&gt;Simplify&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 11:15:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225054#M44717</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-09-07T11:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need coefficients for equation</title>
      <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225073#M44720</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Hi Mark. Just a quick additional note to the readers, that Save Predicted for Fit Y by X, centered Polynomial, quartic, saves the centered model. However, it is the power formula vs. nested multiplication formula saved by Fit Model. &lt;STRONG&gt;Simplify&lt;/STRONG&gt; does not expand and simplify the power formula, and as you stated in your post, &lt;STRONG&gt;Simplify&lt;/STRONG&gt; will create the uncenterd formula from the nested multiplication formula.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fit Y by X saved power formula" style="width: 557px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19183i141560A86BB9CC7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Fit Y by X saved power formula" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Fit Y by X saved power formula&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fit Model saved nested multiplication formula" style="width: 778px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19184i4FC0AC2CE2BD706B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Fit Model saved nested multiplication formula" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Fit Model saved nested multiplication formula&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 05:16:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225073#M44720</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-09-08T05:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need coefficients for equation</title>
      <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225074#M44721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70"&gt;@gzmorgan0&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the solution. Sometimes, I have to fit using polynomial of degree 6 in which case your solution 1 does not work for me. I have option to fit only until degree 5.&lt;/P&gt;&lt;P&gt;I like your solution 2 using scripting but could you please help modify the script to call the data from the table rather than mention the values in the code, because sometimes i get data with 100s of rows.&lt;/P&gt;&lt;P&gt;-Raj&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 06:37:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225074#M44721</guid>
      <dc:creator>raj138</dc:creator>
      <dc:date>2019-09-08T06:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need coefficients for equation</title>
      <link>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225075#M44722</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/15456"&gt;@raj138&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are multiple methods to reference a data table and specify the column names.&amp;nbsp; The JMP&amp;nbsp; Menu &amp;gt; Help &amp;gt; &lt;STRONG&gt;Scripting Index&lt;/STRONG&gt; and&amp;nbsp; JMP Menu &amp;gt; Help &amp;gt; Books &amp;gt; &lt;STRONG&gt;Scripting Guide&lt;/STRONG&gt; are excellent references.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A common method to refer to the curretly open data table is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you want to open a data table the syntax is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "directory/file.jmp" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;JMP can also get data drom a datbase and other file types, like Excel. Below is an example using the sample dattaset Big Class.jm with weight for Y and height for X. Note with a script you can specify a higher order polynomial.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

dt = Open("$Sample_Data/Big Class.jmp");
biv = dt &amp;lt;&amp;lt;Bivariate(
	Y( :weight ),
	X( :height ),
	Fit Special(
		Degree( 6 ),
		Centered Polynomial( 0 )
	)
);
coef_vec = Report(biv )["Parameter Estimates"][NumberColBox(1)] &amp;lt;&amp;lt; Get as Matrix;
eqn_txt  = Report(biv )["Polynomial Fit Degree=?"][TextBox(1)] &amp;lt;&amp;lt; get text;

show(coef_vec, eqn_txt);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Sep 2019 07:03:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-coefficients-for-equation/m-p/225075#M44722</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-09-08T07:03:03Z</dc:date>
    </item>
  </channel>
</rss>

