Hi all,
I have an experiment with many outputs, and I want to get the values given by the prediction formula in a script to send them to a data table. Anybody know how to do that?
Thanks,
Jose Angel
If you select the red triangle next to the Response>Save Columns>Prediction Formula, it will add a column to your data table that has the prediction formula. If you right click on that column, and go to the Formula (it will have a check next to it) you can view the formula.
The suggestion to save the model as a column formula is a good one. There are many ways to use it.
This example illustrates how you can directly get the value displayed in the profiler as another way:
Names Default to Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); fit = dt << Fit Model( Y( :weight ), Effects( :age, :sex, :height ), Personality( "Standard Least Squares" ), Emphasis( "Minimal Report" ), Run( Profiler( 1, Confidence Intervals( 1 ), Term Value( age( 12, Lock( 0 ), Show( 1 ) ), sex( "F", Lock( 0 ), Show( 1 ) ), height( 62.55, Lock( 0 ), Show( 1 ) ) ) ), :weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ), Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 )} ) ); fit rep = fit << Report; prediction = Num( fit rep["Prediction Profiler"][AxisBox(1)][TextBox(2)] << Get Text );
Try this in your script
rfit = fit << Report; pf=rfit["Prediction Profiler"] << get scriptable object; pf << Remember Settings; dtout = (rfit["Prediction Profiler"]["Remembered Settings"][Table Box(1)]<< Make Into Data Table);