<?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 get Parameter Estimates and Summary of Fit in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/453117#M69996</link>
    <description>&lt;P&gt;The method Make Combined Data Table collects all the SAME tables in the platform window and makes a new data table. for example, if you had a variable in the By role with three levels, there would be three Parameter Estimates tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want to get disparate tables from the report.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 19:31:06 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2022-01-21T19:31:06Z</dc:date>
    <item>
      <title>How to get Parameter Estimates and Summary of Fit</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/452851#M69973</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new in JMP. How can I get the linear fit, summary of fit &amp;amp; parameter estimates make into data table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because I need to get the slope, Y-intercept, Rsquare and RMSE&amp;nbsp;of the bivariate plot and make into tabulated format. Please help. I only got the summary of fit script&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;bivsumfit = rbiv["Summary of Fit"][1] &amp;lt;&amp;lt; make combined data table;
bivsumfit2 = bivsumfit &amp;lt;&amp;lt; Split( Split By( :Column 1 ), Split( :Column 2 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:42:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/452851#M69973</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-06-10T23:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter Estimates and Summary of Fit</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/452874#M69975</link>
      <description>&lt;P&gt;Here are 3 methods to create the output table you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1642749662894.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39150iF4D33E0B8282B0E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1642749662894.png" alt="txnelson_0-1642749662894.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Generate the required table by creating output tables
// and then manipulating them to get the results
Names Default To Here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Launch platform: Bivariate
biv = Bivariate( Y( :height ), X( :weight ), fit line );

// Output the Summary of Fit data and transfor the output table
// to a single row
rbiv = Report( biv );
bivsumfit = rbiv["Summary of Fit"][Table Box( 1 )] &amp;lt;&amp;lt; make combined data table( invisible );
bivsumfit2 = bivsumfit &amp;lt;&amp;lt; Split( Split By( :Column 1 ), Split( :Column 2 ), invisible );
Close( bivsumfit, nosave );

// Output the Parameter Estimate data and transfor the output table
// to a single row
bivparmest = rbiv["Parameter Estimates"][Table Box( 1 )] &amp;lt;&amp;lt;
make combined data table( invisible );
bivparmest2 = bivparmest &amp;lt;&amp;lt; Split( Split By( :Term ), Split( :Estimate ) );
Close( bivparmest, nosave );

// Combine the 2 tables
bivparmest2 &amp;lt;&amp;lt; Update( With( bivsumfit2 ), Match Columns( :X = :X, :Y = :Y ) );
Close( bivsumfit2, nosave );

// Clean up the final table
bivparmest2 &amp;lt;&amp;lt; delete columns(
	{"X", "Y", "Table", "Mean of Response", "Observations (or Sum Wgts)", "RSquare Adj", "~Bias",
	"Std Error", "t Ratio", "Prob&amp;gt;|t|"}
);
bivparmest2:Intercept &amp;lt;&amp;lt; set name( "Y Intercept" );
Column( bivparmest2, 2 ) &amp;lt;&amp;lt; set name( "Slope" );
bivparmest2:Root Mean Square Error &amp;lt;&amp;lt; set name( "RMSE" );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Create the required ouput table by reading the results
// directly from the ouput report
names default to here(1);

// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Launch platform: Bivariate
biv = Bivariate( Y( :height ), X( :weight ), fit line );

// Create the new table
dtOut = New Table("Results",
	Add Rows( 1 ),
	New Column( "Slope" ),
	New Column( "Y Intercept" ),
	New Column( "Rsquare" ),
	New Column( "RMSE" )
);

// Copy the table data to the output data table
rbiv = report( biv );
dtOut:Y Intercept[1] = rbiv["ParameterEstimates"][NumberColBox(1)][1];
dtOut:Slope[1] = rbiv["ParameterEstimates"][NumberColBox(1)][2];
dtOut:Rsquare[1] = rbiv["Summary of Fit"][NumberColBox(1)][1];
dtOut:RMSE[1] = rbiv["Summary of Fit"][NumberColBox(1)][3];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Create the required ouput table using the Linear Regression
// function and adding in the RMSE
Names Default To Here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Calculate the linear regression
x = dt:weight &amp;lt;&amp;lt; get values;
y = dt:height &amp;lt;&amp;lt; get values;
{Estimates, Std_Error, Diagnostics} = Linear Regression( y, X );
// calculate the RMSE
p = x * estimates[2] + estimates[1];
d = y - p;
RMSE = Sqrt( Sum( d :*&lt;/img&gt; d ) / (N Rows( d ) - 2) );

// Create the new table
dtOut = New Table( "Results",
	Add Rows( 1 ),
	New Column( "Slope" ),
	New Column( "Y Intercept" ),
	New Column( "Rsquare" ),
	New Column( "RMSE" )
);

// Copy the calculated values to the output data table
dtOut:Y Intercept[1] = Estimates[1];
dtOut:Slope[1] = Estimates[2];
dtOut:Rsquare[1] = Diagnostics["RSquare"];
dtOut:RMSE[1] = RMSE;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jan 2022 15:03:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/452874#M69975</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-01-21T15:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Parameter Estimates and Summary of Fit</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/453117#M69996</link>
      <description>&lt;P&gt;The method Make Combined Data Table collects all the SAME tables in the platform window and makes a new data table. for example, if you had a variable in the By role with three levels, there would be three Parameter Estimates tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want to get disparate tables from the report.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 19:31:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-Parameter-Estimates-and-Summary-of-Fit/m-p/453117#M69996</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-01-21T19:31:06Z</dc:date>
    </item>
  </channel>
</rss>

