Elie,
Here is a script that illustrates what I eluded to in my last response: It uses the formula that is generated when the prediction column is generated. However, the script could also be written to just grab the parameter estimates from the Parameter Estimates table that is displayed, and to modify it and place it back into the display. This would be the programmers choice.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
// Run the analysis
fm = dt << Fit Model(
Y( :NPN1 ),
Effects( :PNP1, :PNP2, :NPN2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
:NPN1 << {Lack of Fit( 0 ), Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Effect Leverage( 0 )}
)
);
// Output the formula to a new column
fm << Prediction Formula;
// Get the formula back as a character string
TheFormula = Char( Column( dt, N Cols( dt ) ) << get formula );
// Strip out the elements and reformat the values
Intercept = Format( Num( Word( 1, TheFormula, " " ) ), "Fixed Dec", 4 );
Beta1 = Format( Num( Word( 3, TheFormula, " " ) ), "Fixed Dec", 4 );
Beta2 = Format( Num( Word( 7, TheFormula, " " ) ), "Fixed Dec", 4 );
Beta3 = Format( Num( Word( 11, TheFormula, " " ) ), "Fixed Dec", 4 );
// Reconstruct the prediction formula
NewFormula = Intercept || " + " || Beta1 || " * :PNP1 + " || Beta2 ||
" * :PNP2 + " || Beta3 || " * :NPN2";
// Write it back to the displayed output
Report( fm )["Parameter Estimates"] << append( Outline Box( "Prediction Formula", Text Box( NewFormula ) ) );
Jim