<?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 calculate slope and intercept in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/52284#M29598</link>
    <description>&lt;P&gt;I figured it out.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;kXPlotDT = Report( kXPlot )["Parameter Estimates"][Table Box(1)] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Ry&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 14:28:43 GMT</pubDate>
    <dc:creator>RyMcQeN</dc:creator>
    <dc:date>2018-02-28T14:28:43Z</dc:date>
    <item>
      <title>How to calculate slope and intercept</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37782#M22144</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am facing 2 issues when trying tocalculate Slope and Intercept values:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I did not find an easy way to get the Slope and intercept except the use of "Bivariate + fit line"&lt;/LI&gt;
&lt;LI&gt;Using the Bivariatein a loop seems to result in a slow execution of the code: I think that creating a table and the associated fit lile&amp;nbsp; several times is very slow&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;My question: is there a way to get the slope and intercept without using the bivariate to get faster ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I use in a loop to extract the slopes and intercepts:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;biv1 = Bivariate( Y( MyTab:X ), X( MyTab:Y ), Fit Line( {Line Color( "Red" )} ) );
	colBox = Report( biv1 )[Number Col Box( 7 )];
	beta = colBox &amp;lt;&amp;lt; GetAsMatrix;
	My_Slope = beta[2];   // slope
	My_Intercept = beta[1];   // intercept
	Close( MyTab, nosave );
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 13:44:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37782#M22144</guid>
      <dc:creator>samir</dc:creator>
      <dc:date>2017-04-06T13:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate slope and intercept</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37784#M22146</link>
      <description>&lt;P&gt;for starters,&amp;nbsp;have a look at this option:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.pega-analytics.co.uk/blog/linear-regression-matrix-form/" target="_self"&gt;http://www.pega-analytics.co.uk/blog/linear-regression-matrix-form/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;it is a solution offered by David Burnham in his blog. using matrix calculations he&amp;nbsp;achieves high speeds for&amp;nbsp;calculating the regression coefficients.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&lt;/P&gt;
&lt;P&gt;ron&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 09:18:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37784#M22146</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2017-04-04T09:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate slope and intercept</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37785#M22147</link>
      <description>&lt;P&gt;Thanks Ron,&lt;/P&gt;&lt;P&gt;That's what I was looking for: I will implement and test the spead :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 10:06:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37785#M22147</guid>
      <dc:creator>samir</dc:creator>
      <dc:date>2017-04-04T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate slope and intercept</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37854#M22177</link>
      <description>&lt;P&gt;Rather than having a loop, you could also consider making a big table with a 'By' variable, sticking with the Bivariate platform, then using 'Make Combined Data Table'. I expect the matrix approach will be faster, though.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 12:51:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/37854#M22177</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-04-06T12:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate slope and intercept</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/51489#M29189</link>
      <description>&lt;P&gt;Hi Ian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have followed your approach using the 'By' variable and sticking with the bivariate platform. I am not sure of the correct syntax for 'Make Combined Data Table' to work for multiple Fit Lines.&amp;nbsp; Can you help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;kXPlot = dt &amp;lt;&amp;lt; Bivariate( Y( :LMS_dX ), X( :X_Nominal ), By(Column(::bcol)), Fit Line());
kXPlotDT = kXPlot &amp;lt; ???&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:28:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/51489#M29189</guid>
      <dc:creator>RyMcQeN</dc:creator>
      <dc:date>2018-02-28T14:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate slope and intercept</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/52284#M29598</link>
      <description>&lt;P&gt;I figured it out.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;kXPlotDT = Report( kXPlot )["Parameter Estimates"][Table Box(1)] &amp;lt;&amp;lt; Make Combined Data Table;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Ry&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 14:28:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-calculate-slope-and-intercept/m-p/52284#M29598</guid>
      <dc:creator>RyMcQeN</dc:creator>
      <dc:date>2018-02-28T14:28:43Z</dc:date>
    </item>
  </channel>
</rss>

