Ciao,
Sono nuovo in JMP. Come posso ottenere l'adattamento lineare, il riepilogo dell'adattamento e le stime dei parametri nella tabella dei dati?
Perché ho bisogno di ottenere la pendenza, l'intercetta Y, Rsquare e RMSE del grafico bivariato e trasformarlo in formato tabulato. Per favore aiuto. Ho solo il riassunto dello script fit
bivsumfit = rbiv["Summary of Fit"][1] << make combined data table;
bivsumfit2 = bivsumfit << Split( Split By( :Column 1 ), Split( :Column 2 ) );
Ecco 3 metodi per creare la tabella di output che desideri

// 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 :*</img> 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;
Il metodo Crea tabella dati combinata raccoglie tutte le tabelle SAME nella finestra della piattaforma e crea una nuova tabella dati. ad esempio, se si dispone di una variabile nel ruolo Per con tre livelli, ci sarebbero tre tabelle Stime dei parametri.
Vuoi ottenere tabelle disparate dal rapporto.