<?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: Linear Regression of Data Set by a Column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13124#M12410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got most of the relevant code from Ian Cox's posting &lt;A _jive_internal="true" href="https://community.jmp.com/message/215121#215121"&gt;here&lt;/A&gt;.&amp;nbsp; This will do the analysis and then put all of the slopes and intercepts into a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Table&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Sample Data"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Add Rows&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Formula"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Character&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Nominal&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboA"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboC"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboB"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboC"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboA"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboB"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;}&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Acid Level"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Numeric&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Continuous&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;Format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Best"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;15&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"pH"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Numeric&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Continuous&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;Format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Best"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.7&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;4.8&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.75&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.4&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;6.45&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green;"&gt;// Run Fit Y by X&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;bv &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;Bivariate&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;pH &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;Acid Level &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fit Line&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;Line Color&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;213&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;72&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;87&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)}&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; By&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;Formula &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green;"&gt;// A reference to the report layer: bivREp is also a list&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;bivRep &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; bv &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG style="color: navy; font-family: 'Courier New';"&gt;Report&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green;"&gt;// 'Make Combined Data Table' avoids having to message to each item in 'bivRep'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;dt2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; bivRep &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;TableBox&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;)]&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG style="color: navy; font-family: 'Courier New';"&gt;Make Combined Data Table&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2015 13:56:12 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2015-07-06T13:56:12Z</dc:date>
    <item>
      <title>Save Parameter Estimates of Linear Regression with by Variable</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13123#M12409</link>
      <description>&lt;P&gt;I am trying to do a linear regression of 2 columns as grouped by a 3rd column and am stuck. I want a column with slope for that row, and another with intercept for that row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Short background:&lt;/P&gt;
&lt;P&gt;I have 30k different formulations that have each been tested with 13 different levels of an acid. I want to understand the slope of the pH as a function of acid concentration. For my range (and purpose) I can do this as a linear regression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My data table is set up such as this, but with 30k Formula Combos and 13 acid levels for a total of 390k rows.&lt;/P&gt;
&lt;TABLE class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;&lt;STRONG&gt;Formula&lt;/STRONG&gt;&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;&lt;STRONG&gt;Acid Level&lt;/STRONG&gt;&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;&lt;STRONG&gt;pH&lt;/STRONG&gt;&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;
&lt;P&gt;ComboA&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;6.7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboB&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;6.75&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboC&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;6.5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboA&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;6.4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboB&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;6.45&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know that I can plot them in Fit Y by X, group the data, and then add linear fits but that 1) takes forever with 30k groups and 2) is a pain to pulls the slopes out of that report&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I current have split my table by "Acid Level", splitting "pH", and keeping "Formula". I know have something like this, and want a way to fill in the right 2 columns.&lt;/P&gt;
&lt;TABLE class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;&lt;STRONG&gt;Formula&lt;/STRONG&gt;&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;ph 5&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;ph 10&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;ph 15&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;ph 20&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;Slope&lt;/TH&gt;
&lt;TH valign="middle" style="padding: 2px; text-align: center; color: rgb(255, 255, 255); background-color: rgb(102, 144, 188);"&gt;Intercept&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboA&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboB&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="padding: 2px;"&gt;ComboC&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&lt;EM style="font-size: 13.33px;"&gt;data&lt;/EM&gt;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD style="padding: 2px;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First preference is to do with a formula. If I need to do a script, I can do that as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 16:12:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13123#M12409</guid>
      <dc:creator>clausa</dc:creator>
      <dc:date>2017-09-13T16:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13124#M12410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got most of the relevant code from Ian Cox's posting &lt;A _jive_internal="true" href="https://community.jmp.com/message/215121#215121"&gt;here&lt;/A&gt;.&amp;nbsp; This will do the analysis and then put all of the slopes and intercepts into a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Table&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Sample Data"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Add Rows&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Formula"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Character&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Nominal&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboA"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboC"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboB"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboC"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboA"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"ComboB"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;}&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Acid Level"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Numeric&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Continuous&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;Format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Best"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;15&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"pH"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Numeric&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; Continuous&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;Format&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple;"&gt;"Best"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.7&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;4.8&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.75&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;6.4&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;6.45&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green;"&gt;// Run Fit Y by X&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;bv &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;Bivariate&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;pH &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;Acid Level &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fit Line&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;Line Color&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;213&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: 'Courier New';"&gt;72&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;87&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;)}&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; By&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;Formula &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green;"&gt;// A reference to the report layer: bivREp is also a list&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;bivRep &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; bv &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG style="color: navy; font-family: 'Courier New';"&gt;Report&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: green;"&gt;// 'Make Combined Data Table' avoids having to message to each item in 'bivRep'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;dt2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; bivRep &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd;"&gt;TableBox&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black;"&gt;)]&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG style="color: navy; font-family: 'Courier New';"&gt;Make Combined Data Table&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 13:56:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13124#M12410</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2015-07-06T13:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13125#M12411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter's script will serve you well.&amp;nbsp; However, for reference if you were to do this by JMP rather than by JSL (it is often a toss up time wise depending on if it is a one time analysis or not) then if you fit your y-by-x you can "broadcast" your fit line, go get a cup of coffee if needed, then when JMP is done running right click on one of the parameter estimate tables and select "make combined data table" to get a table with the estimates.&amp;nbsp; Which is how to execute Peter's script without the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 14:39:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13125#M12411</guid>
      <dc:creator>KarenC</dc:creator>
      <dc:date>2015-07-06T14:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13126#M12412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Coincidentally, I was just about to point out that, if you know you need linear regression and only want the parameters, then JSL is much faster. The code below took about 100 seconds on my laptop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;NamesDefaultToHere&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// Make some grouped data&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;gs &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Group size&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;ng &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;30000&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;// Number of groups&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;groupID &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;SortAscending&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;Repeat&lt;/SPAN&gt;&lt;STRONG&gt;((&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;::&lt;/SPAN&gt;ng&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;`,&lt;/SPAN&gt; gs&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;xVals &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;J&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NRow&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;groupID&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;RandomNormal&lt;/SPAN&gt;&lt;STRONG&gt;())&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;yVals &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;J&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NRow&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;groupID&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;RandomNormal&lt;/SPAN&gt;&lt;STRONG&gt;())&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// Put the data in a table&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt1 &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewTable&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Grouped Regression Data"&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"Group"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Nominal&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Values&lt;STRONG&gt;(&lt;/STRONG&gt;groupID&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"x"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Continuous&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Values&lt;STRONG&gt;(&lt;/STRONG&gt;xVals&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; &lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"y"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Numeric&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Continuous&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Values&lt;STRONG&gt;(&lt;/STRONG&gt;yVals&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// Uncomment this block to use Fit Y By X to do the fitting&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;/*&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// Use Fit Y By X&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;fxy = dt1 &amp;lt;&amp;lt; Bivariate(Y( :y ), X( x ), Fit Line( {Line Color( {208, 64, 86} )} ), By(:Group));&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// Get the pfitted parameters into a table&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// (To do this interactively, right-click on any Parameter Estimates table in the report and select 'Make Combined Data Table')&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;fxyRep = fxy &amp;lt;&amp;lt; Report;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;dt2 = fxyRep[1][TableBox(3)] &amp;lt;&amp;lt; makeCombinedDataTable;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// Split dt2&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;dt3 = dt2 &amp;lt;&amp;lt; Split(Split By( :Term ), Split( :Estimate ), Group( :Group ), Remaining Columns( Drop All ));&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;dt3 &amp;lt;&amp;lt; setName("Parameter Estimates from Fit Y By X");&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;Close(dt2, noSave);&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;*/&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;/// Do the linear regression in JSL, bypassing the platform . . .&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// (1) Get the data from the table&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;xVals &lt;/SPAN&gt;=&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt1&lt;/SPAN&gt;,&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"x"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;getAsMatrix&lt;/STRONG&gt;;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;yVals &lt;/SPAN&gt;=&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt1&lt;/SPAN&gt;,&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"y"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;getAsMatrix&lt;/STRONG&gt;;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;groupID &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt1&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;"Group"&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;getAsMatrix&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// (2) Add the unit vector to the design matrix&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;xVals &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;J&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NRow&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;xVals&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;xVals&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// (3) Do the linear regression for each group and store the results&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;beta &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;J&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;ng&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;for&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;g&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; g &lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt; ng&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; g&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; thisGroup &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Loc&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;groupID &lt;SPAN style="color: #011993;"&gt;==&lt;/SPAN&gt; g&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp; beta&lt;STRONG&gt;[&lt;/STRONG&gt;g&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Transpose&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;Inv&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;xVals&lt;STRONG&gt;[&lt;/STRONG&gt;thisGroup&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;`*&lt;/SPAN&gt;xVals&lt;STRONG&gt;[&lt;/STRONG&gt;thisGroup&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;*&lt;/SPAN&gt;xVals&lt;STRONG&gt;[&lt;/STRONG&gt;thisGroup&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;`*&lt;/SPAN&gt;yVals&lt;STRONG&gt;[&lt;/STRONG&gt;thisGroup&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #008f00;"&gt;// (4) Make the table of results&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;dt4 &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;AsTable&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;beta&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt4 &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;setName&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Parameter Estimates from JSL"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt4&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"Col1"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;setName&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Intercept"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt4&lt;/SPAN&gt;,&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"Col2"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;setName&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"x"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 15:22:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13126#M12412</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2015-07-06T15:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13127#M12413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;P&gt;thank you that is a nice approach with matrix.&lt;/P&gt;&lt;P&gt;is there a way to get the Rsquare as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 11:24:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13127#M12413</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-05-10T11:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13128#M12414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you have the fitted coefficients for each group (as above), you can get the predicted values, and hence residuals and the residual sum of squares (for each group). The total sum of squares (for each group) is easy too, so then you have everything needed to get &lt;A href="https://en.wikipedia.org/wiki/Coefficient_of_determination"&gt;R squared &lt;/A&gt;(for each group).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bear in mind, though, that as you add more manipulations to the JSL it will take longer (though in this case still quicker than using the platform). Someone also needs to write and validate the code, of course!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2016 12:05:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13128#M12414</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2016-05-10T12:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13129#M12415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;will check it considering your last comment. Thank you Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 02:40:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13129#M12415</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-06-27T02:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13130#M12416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;coming back to this topic.&lt;/P&gt;&lt;P&gt;I understand all the manipulation and can aplply to my data but still very unclear about the following part:&lt;/P&gt;&lt;P&gt;beta = J(ng, 2, .);&lt;/P&gt;&lt;P&gt;for (g=1, g &amp;lt;= ng, g++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisGroup = Loc(groupID == g);&lt;/P&gt;&lt;P&gt;&amp;nbsp; beta[g, 0] = Transpose(Inv(xVals[thisGroup, 0]`*xVals[thisGroup, 0])*xVals[thisGroup, 0]`*yVals[thisGroup]);&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;not able to figure out what is happenning except tht a beta matrix is created and all data replaced in a new table...&lt;/P&gt;&lt;P&gt;could you please help me understand this point?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 06:23:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13130#M12416</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-09-01T06:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13131#M12417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;I found following way to calculate expression.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SS_TOT = Summation( i = 1, N Row( dt1 ), (Column( dt1, k )&lt;I&gt; - a_mean&lt;K&gt;) ^ 2 / N Row( dt1 ) );&lt;/K&gt;&lt;/I&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;but calculation is made for all column "k".&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Any hint on how I could include some group separation?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SS_TOT[gp#1] / SS_TOT[gp#2] ... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 09:22:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/13131#M12417</guid>
      <dc:creator>KinKame</dc:creator>
      <dc:date>2016-09-05T09:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Linear Regression of Data Set by a Column</title>
      <link>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/842989#M101670</link>
      <description>&lt;P&gt;Running JSL is very useful for large datasets and large # of #groupIDs. Is there a way to iterate over non-numeric groupID.&lt;/P&gt;&lt;P&gt;And of course needs a column to store the non-numeric GroupID also.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 22:46:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/m-p/842989#M101670</guid>
      <dc:creator>kasias</dc:creator>
      <dc:date>2025-02-19T22:46:39Z</dc:date>
    </item>
  </channel>
</rss>

