<?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: How to create polynomial degree 2 and get the coefficient and constant? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40518#M23727</link>
    <description>Hi ian_jmp, My objective is get the coefficient and constant of "y = ax^2+bx+c" but in fit polynomial is "y = a(x-d)^2+bx+c". However I got the solution from user# MathStatChem by fit special.</description>
    <pubDate>Fri, 16 Jun 2017 01:53:22 GMT</pubDate>
    <dc:creator>Sibtid</dc:creator>
    <dc:date>2017-06-16T01:53:22Z</dc:date>
    <item>
      <title>How to fit a polynomial degree 2 models with by-groups then capture the parameter estimates</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40443#M23697</link>
      <description>&lt;P&gt;I would like to create polynomial degree 2 by each (SERIAL, P1, P2, P3) and get the&amp;nbsp;coefficient and constant then put in each column by using JSL.&lt;/P&gt;
&lt;P&gt;The example data was attached in this post, but actually I will do with the data about 1 million rows.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="001516.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6459iDC8D8CDC4AB1BE23/image-size/large?v=v2&amp;amp;px=999" role="button" title="001516.png" alt="001516.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 12:53:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40443#M23697</guid>
      <dc:creator>Sibtid</dc:creator>
      <dc:date>2018-07-11T12:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40446#M23699</link>
      <description>&lt;P&gt;It would be possible to develop the script below to get what you need:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);
ClearLog();
dt = DataTable("Example data.jmp");
col = Column(dt, "Predicted y By SERIAL By P1 By P2 By P3");
// Get the formula generated by the platform
f = col &amp;lt;&amp;lt; getFormula;
// Start to parse this formula expression
for(g = 1, g &amp;lt;= Narg(f) - 1, g = g + 2,
	f1 = Arg(f, g);
	f2 = Arg(f, g+1);
	Print(f1, f2, "\!n");
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I suspect it might be simpler to send the 'MakeCombinedDataTable' message to the appropriate table in the report window if that's possible. Look in 'Help &amp;gt; Scripting Guide'.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 12:03:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40446#M23699</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-06-15T12:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40450#M23702</link>
      <description>&lt;P&gt;Also, if you are using the Fit Y by X platform / Bivariate platform to generate the polynomial fits, make sure to do a "Fit Special" and use uncentered polynomials. &amp;nbsp;Otherwise the fitted quadratic will be of the form&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;f(x) = a + b*x + c*(x-xbar)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where xbar is the mean of the x values used in the regression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doing the fitting with a By variable and then right clicking the parameter estimates table to make a combined data table is a very efficient way to do this.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 13:46:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40450#M23702</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2017-06-15T13:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40451#M23703</link>
      <description>&lt;P&gt;Try this script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;_biv=Bivariate(
	Y( :y ),
	X( :x ),
	Fit Special(
		Degree( 2 ),
		Centered Polynomial( 0 ),
		{Line Color( {213, 72, 87} )}
	),
	By( :SERIAL, :P1, :P2, :P3 )
);


_rbiv=Report(_biv[1]);

_dtParameterEst = _rbiv[Table Box(3)]&amp;lt;&amp;lt; Make Combined Data Table;

_dtParameterEst &amp;lt;&amp;lt; Split(
	Split By( :Term ),
	Split( :Estimate ),
	Group( :P3, :P2, :P1, :SERIAL ),
	Remaining Columns( Drop All ),
	Sort by Column Property
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jun 2017 14:00:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40451#M23703</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2017-06-15T14:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40505#M23715</link>
      <description>Thanks ian_jmp, let me try.</description>
      <pubDate>Thu, 15 Jun 2017 17:58:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40505#M23715</guid>
      <dc:creator>Sibtid</dc:creator>
      <dc:date>2017-06-15T17:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40506#M23716</link>
      <description>Thanks MathStatChem, let me try for your suggestion.</description>
      <pubDate>Thu, 15 Jun 2017 18:01:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40506#M23716</guid>
      <dc:creator>Sibtid</dc:creator>
      <dc:date>2017-06-15T18:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40518#M23727</link>
      <description>Hi ian_jmp, My objective is get the coefficient and constant of "y = ax^2+bx+c" but in fit polynomial is "y = a(x-d)^2+bx+c". However I got the solution from user# MathStatChem by fit special.</description>
      <pubDate>Fri, 16 Jun 2017 01:53:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40518#M23727</guid>
      <dc:creator>Sibtid</dc:creator>
      <dc:date>2017-06-16T01:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create polynomial degree 2 and get the coefficient and constant?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40519#M23728</link>
      <description>&lt;P&gt;Hi MathStatChem,&lt;/P&gt;&lt;P&gt;Your solution it work.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 01:58:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-fit-a-polynomial-degree-2-models-with-by-groups-then/m-p/40519#M23728</guid>
      <dc:creator>Sibtid</dc:creator>
      <dc:date>2017-06-16T01:58:14Z</dc:date>
    </item>
  </channel>
</rss>

