Is this just to get absolute values of the prediction? I'm confused sorry.
Names default to here( 1 );
dt1 = open("$SAMPLE_DATA\Big Class.jmp");
fm = dt1 << Fit Model(
Y( :height, :weight ),
Effects( :age, :sex, :age * :sex ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:height << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), 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 )},
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), 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 )}
)
);
fm << Prediction Formula; //
dt2 = new table("Targets",
<<New Column("age", <<Set Values([12, 14])),
<< New Column("sex", character, <<Set Values({"M", "F"}))
);
Eval(EvalExpr(dt2 << New Column("Pred Formula height", formula(Expr(dt1:Pred Formula height << Get Formula)))));
Eval(EvalExpr(dt2 << New Column("Pred Formula weight", formula(Expr(dt1:Pred Formula weight << Get Formula)))));