cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-452851%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EComment%20obtenir%20des%20estimations%20de%20param%C3%A8tres%20et%20un%20r%C3%A9sum%C3%A9%20de%20l'ajustement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-452851%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ESalut%2C%3C%2FP%3E%3CP%3EJe%20suis%20nouveau%20dans%20JMP.%20Comment%20puis-je%20obtenir%20l'ajustement%20lin%C3%A9aire%2C%20le%20r%C3%A9sum%C3%A9%20de%20l'ajustement%20et%20les%20estimations%20des%20param%C3%A8tres%20dans%20un%20tableau%20de%20donn%C3%A9es%26nbsp%3B%3F%3C%2FP%3E%3CP%3EParce%20que%20j'ai%20besoin%20d'obtenir%20la%20pente%2C%20l'ordonn%C3%A9e%20%C3%A0%20l'origine%2C%20le%20Rcarr%C3%A9%20et%20le%20RMSE%20du%20trac%C3%A9%20bivari%C3%A9%20et%20de%20le%20transformer%20en%20format%20tabul%C3%A9.%20S'il%20vous%20pla%C3%AEt%20aider.%20Je%20n'ai%20re%C3%A7u%20que%20le%20r%C3%A9sum%C3%A9%20du%20script%20d'ajustement%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ebivsumfit%20%3D%20rbiv%5B%22Summary%20of%20Fit%22%5D%5B1%5D%20%26lt%3B%26lt%3B%20make%20combined%20data%20table%3B%0Abivsumfit2%20%3D%20bivsumfit%20%26lt%3B%26lt%3B%20Split(%20Split%20By(%20%3AColumn%201%20)%2C%20Split(%20%3AColumn%202%20)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-452851%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EExploration%20et%20visualisation%20des%20donn%C3%A9es%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPersonnalisation%20de%20masse%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-453117%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%26nbsp%3B%3A%20Comment%20obtenir%20des%20estimations%20de%20param%C3%A8tres%20et%20un%20r%C3%A9sum%C3%A9%20de%20l'ajustement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-453117%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ELa%20m%C3%A9thode%20Make%20Combined%20Data%20Table%20collecte%20toutes%20les%20tables%20SAME%20dans%20la%20fen%C3%AAtre%20de%20la%20plate-forme%20et%20cr%C3%A9e%20une%20nouvelle%20table%20de%20donn%C3%A9es.%20par%20exemple%2C%20si%20vous%20aviez%20une%20variable%20dans%20le%20r%C3%B4le%20Par%20avec%20trois%20niveaux%2C%20il%20y%20aurait%20trois%20tables%20d'estimations%20de%20param%C3%A8tres.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EVous%20souhaitez%20obtenir%20des%20tableaux%20disparates%20%C3%A0%20partir%20du%20rapport.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-452874%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%26nbsp%3B%3A%20Comment%20obtenir%20des%20estimations%20de%20param%C3%A8tres%20et%20un%20r%C3%A9sum%C3%A9%20de%20l'ajustement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-452874%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EVoici%203%20m%C3%A9thodes%20pour%20cr%C3%A9er%20la%20table%20de%20sortie%20souhait%C3%A9e%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22txnelson_0-1642749662894.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1642749662894.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1642749662894.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F39150iF4D33E0B8282B0E5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22txnelson_0-1642749662894.png%22%20alt%3D%22txnelson_0-1642749662894.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20Generate%20the%20required%20table%20by%20creating%20output%20tables%0A%2F%2F%20and%20then%20manipulating%20them%20to%20get%20the%20results%0ANames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Open%20Data%20Table%3A%20big%20class.jmp%0A%2F%2F%20%E2%86%92%20Data%20Table(%20%22big%20class%22%20)%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fbig%20class.jmp%22%20)%3B%0A%0A%2F%2F%20Launch%20platform%3A%20Bivariate%0Abiv%20%3D%20Bivariate(%20Y(%20%3Aheight%20)%2C%20X(%20%3Aweight%20)%2C%20fit%20line%20)%3B%0A%0A%2F%2F%20Output%20the%20Summary%20of%20Fit%20data%20and%20transfor%20the%20output%20table%0A%2F%2F%20to%20a%20single%20row%0Arbiv%20%3D%20Report(%20biv%20)%3B%0Abivsumfit%20%3D%20rbiv%5B%22Summary%20of%20Fit%22%5D%5BTable%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20make%20combined%20data%20table(%20invisible%20)%3B%0Abivsumfit2%20%3D%20bivsumfit%20%26lt%3B%26lt%3B%20Split(%20Split%20By(%20%3AColumn%201%20)%2C%20Split(%20%3AColumn%202%20)%2C%20invisible%20)%3B%0AClose(%20bivsumfit%2C%20nosave%20)%3B%0A%0A%2F%2F%20Output%20the%20Parameter%20Estimate%20data%20and%20transfor%20the%20output%20table%0A%2F%2F%20to%20a%20single%20row%0Abivparmest%20%3D%20rbiv%5B%22Parameter%20Estimates%22%5D%5BTable%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%0Amake%20combined%20data%20table(%20invisible%20)%3B%0Abivparmest2%20%3D%20bivparmest%20%26lt%3B%26lt%3B%20Split(%20Split%20By(%20%3ATerm%20)%2C%20Split(%20%3AEstimate%20)%20)%3B%0AClose(%20bivparmest%2C%20nosave%20)%3B%0A%0A%2F%2F%20Combine%20the%202%20tables%0Abivparmest2%20%26lt%3B%26lt%3B%20Update(%20With(%20bivsumfit2%20)%2C%20Match%20Columns(%20%3AX%20%3D%20%3AX%2C%20%3AY%20%3D%20%3AY%20)%20)%3B%0AClose(%20bivsumfit2%2C%20nosave%20)%3B%0A%0A%2F%2F%20Clean%20up%20the%20final%20table%0Abivparmest2%20%26lt%3B%26lt%3B%20delete%20columns(%0A%20%7B%22X%22%2C%20%22Y%22%2C%20%22Table%22%2C%20%22Mean%20of%20Response%22%2C%20%22Observations%20(or%20Sum%20Wgts)%22%2C%20%22RSquare%20Adj%22%2C%20%22~Bias%22%2C%0A%20%22Std%20Error%22%2C%20%22t%20Ratio%22%2C%20%22Prob%26gt%3B%7Ct%7C%22%7D%0A)%3B%0Abivparmest2%3AIntercept%20%26lt%3B%26lt%3B%20set%20name(%20%22Y%20Intercept%22%20)%3B%0AColumn(%20bivparmest2%2C%202%20)%20%26lt%3B%26lt%3B%20set%20name(%20%22Slope%22%20)%3B%0Abivparmest2%3ARoot%20Mean%20Square%20Error%20%26lt%3B%26lt%3B%20set%20name(%20%22RMSE%22%20)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20Create%20the%20required%20ouput%20table%20by%20reading%20the%20results%0A%2F%2F%20directly%20from%20the%20ouput%20report%0Anames%20default%20to%20here(1)%3B%0A%0A%2F%2F%20Open%20Data%20Table%3A%20big%20class.jmp%0A%2F%2F%20%E2%86%92%20Data%20Table(%20%22big%20class%22%20)%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fbig%20class.jmp%22%20)%3B%0A%0A%2F%2F%20Launch%20platform%3A%20Bivariate%0Abiv%20%3D%20Bivariate(%20Y(%20%3Aheight%20)%2C%20X(%20%3Aweight%20)%2C%20fit%20line%20)%3B%0A%0A%2F%2F%20Create%20the%20new%20table%0AdtOut%20%3D%20New%20Table(%22Results%22%2C%0A%20Add%20Rows(%201%20)%2C%0A%20New%20Column(%20%22Slope%22%20)%2C%0A%20New%20Column(%20%22Y%20Intercept%22%20)%2C%0A%20New%20Column(%20%22Rsquare%22%20)%2C%0A%20New%20Column(%20%22RMSE%22%20)%0A)%3B%0A%0A%2F%2F%20Copy%20the%20table%20data%20to%20the%20output%20data%20table%0Arbiv%20%3D%20report(%20biv%20)%3B%0AdtOut%3AY%20Intercept%5B1%5D%20%3D%20rbiv%5B%22ParameterEstimates%22%5D%5BNumberColBox(1)%5D%5B1%5D%3B%0AdtOut%3ASlope%5B1%5D%20%3D%20rbiv%5B%22ParameterEstimates%22%5D%5BNumberColBox(1)%5D%5B2%5D%3B%0AdtOut%3ARsquare%5B1%5D%20%3D%20rbiv%5B%22Summary%20of%20Fit%22%5D%5BNumberColBox(1)%5D%5B1%5D%3B%0AdtOut%3ARMSE%5B1%5D%20%3D%20rbiv%5B%22Summary%20of%20Fit%22%5D%5BNumberColBox(1)%5D%5B3%5D%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20Create%20the%20required%20ouput%20table%20using%20the%20Linear%20Regression%0A%2F%2F%20function%20and%20adding%20in%20the%20RMSE%0ANames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Open%20Data%20Table%3A%20big%20class.jmp%0A%2F%2F%20%E2%86%92%20Data%20Table(%20%22big%20class%22%20)%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fbig%20class.jmp%22%20)%3B%0A%0A%2F%2F%20Calculate%20the%20linear%20regression%0Ax%20%3D%20dt%3Aweight%20%26lt%3B%26lt%3B%20get%20values%3B%0Ay%20%3D%20dt%3Aheight%20%26lt%3B%26lt%3B%20get%20values%3B%0A%7BEstimates%2C%20Std_Error%2C%20Diagnostics%7D%20%3D%20Linear%20Regression(%20y%2C%20X%20)%3B%0A%2F%2F%20calculate%20the%20RMSE%0Ap%20%3D%20x%20*%20estimates%5B2%5D%20%2B%20estimates%5B1%5D%3B%0Ad%20%3D%20y%20-%20p%3B%0ARMSE%20%3D%20Sqrt(%20Sum(%20d%20%3A*%3C%2Fimg%3E%20d%20)%20%2F%20(N%20Rows(%20d%20)%20-%202)%20)%3B%0A%0A%2F%2F%20Create%20the%20new%20table%0AdtOut%20%3D%20New%20Table(%20%22Results%22%2C%0A%20Add%20Rows(%201%20)%2C%0A%20New%20Column(%20%22Slope%22%20)%2C%0A%20New%20Column(%20%22Y%20Intercept%22%20)%2C%0A%20New%20Column(%20%22Rsquare%22%20)%2C%0A%20New%20Column(%20%22RMSE%22%20)%0A)%3B%0A%0A%2F%2F%20Copy%20the%20calculated%20values%20to%20the%20output%20data%20table%0AdtOut%3AY%20Intercept%5B1%5D%20%3D%20Estimates%5B1%5D%3B%0AdtOut%3ASlope%5B1%5D%20%3D%20Estimates%5B2%5D%3B%0AdtOut%3ARsquare%5B1%5D%20%3D%20Diagnostics%5B%22RSquare%22%5D%3B%0AdtOut%3ARMSE%5B1%5D%20%3D%20RMSE%3B%0A%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
UserID16644
Level V

How to get Parameter Estimates and Summary of Fit

Hi, 

I'm new in JMP. How can I get the linear fit, summary of fit & parameter estimates make into data table? 

Because I need to get the slope, Y-intercept, Rsquare and RMSE of the bivariate plot and make into tabulated format. Please help. I only got the summary of fit script

bivsumfit = rbiv["Summary of Fit"][1] << make combined data table;
bivsumfit2 = bivsumfit << Split( Split By( :Column 1 ), Split( :Column 2 ) );
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to get Parameter Estimates and Summary of Fit

Here are 3 methods to create the output table you want

txnelson_0-1642749662894.png

// 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 )] << make combined data table( invisible );
bivsumfit2 = bivsumfit << 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 )] <<
make combined data table( invisible );
bivparmest2 = bivparmest << Split( Split By( :Term ), Split( :Estimate ) );
Close( bivparmest, nosave );

// Combine the 2 tables
bivparmest2 << Update( With( bivsumfit2 ), Match Columns( :X = :X, :Y = :Y ) );
Close( bivsumfit2, nosave );

// Clean up the final table
bivparmest2 << delete columns(
	{"X", "Y", "Table", "Mean of Response", "Observations (or Sum Wgts)", "RSquare Adj", "~Bias",
	"Std Error", "t Ratio", "Prob>|t|"}
);
bivparmest2:Intercept << set name( "Y Intercept" );
Column( bivparmest2, 2 ) << set name( "Slope" );
bivparmest2:Root Mean Square Error << set name( "RMSE" );
// 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];
// 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 << get values;
y = dt:height << 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 :* 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;

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to get Parameter Estimates and Summary of Fit

Here are 3 methods to create the output table you want

txnelson_0-1642749662894.png

// 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 )] << make combined data table( invisible );
bivsumfit2 = bivsumfit << 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 )] <<
make combined data table( invisible );
bivparmest2 = bivparmest << Split( Split By( :Term ), Split( :Estimate ) );
Close( bivparmest, nosave );

// Combine the 2 tables
bivparmest2 << Update( With( bivsumfit2 ), Match Columns( :X = :X, :Y = :Y ) );
Close( bivsumfit2, nosave );

// Clean up the final table
bivparmest2 << delete columns(
	{"X", "Y", "Table", "Mean of Response", "Observations (or Sum Wgts)", "RSquare Adj", "~Bias",
	"Std Error", "t Ratio", "Prob>|t|"}
);
bivparmest2:Intercept << set name( "Y Intercept" );
Column( bivparmest2, 2 ) << set name( "Slope" );
bivparmest2:Root Mean Square Error << set name( "RMSE" );
// 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];
// 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 << get values;
y = dt:height << 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 :* 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;

Jim

Re: How to get Parameter Estimates and Summary of Fit

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.

 

You want to get disparate tables from the report.

Recommended Articles