BookmarkSubscribeSubscribe to RSS Feed

Automate saving of prediction formula of a fit model(stepwise) using JMP script?


Community Trekker


Jun 10, 2013

Hi everybody,

Hoping that someone with more JMP script-writing experience can offer some suggestions here.

What I'd like to do is fit a linear regression using the "Fit Model(stepwise)" option,

then save the prediction values for the subsequent model to my current data table automatically through the script. 

Thanks for your answers.




Jun 23, 2011

Hi, Astep:

In current releases of JMP, issuing Run Model generates a regular Fit Least Squares but does not also return a handle to the Fit Least Squares object.  Therefore, you will need to use the syntax shown in the example below in order to obtain the Prediction Formula:

dt = Open( "$SAMPLE_DATA/" );
obj = Fit Model(
     Y( :Oxy ),
     Effects( :Runtime, :Weight, :RunPulse, :RstPulse, :MaxPulse ),
     Personality( Stepwise ),
obj << Finish;
obj << Run Model; 

Fit Least Squares[1] << Prediction Formula;  //HERE

In a future release of JMP, we expect that the Run Model command will return a reference to the Fit Least Squares object.  This would allow for easier access to save the Prediction Formula.

I hope this helps!

Wendy Murphrey