turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Automate saving of prediction formula of a fit mod...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jun 10, 2013 9:37 AM
(469 views)

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.

Astep

1 REPLY

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jun 20, 2013 7:03 AM
(235 views)

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/Fitness.jmp" );

obj = Fit Model(

Y( :Oxy ),

Effects( :Runtime, :Weight, :RunPulse, :RstPulse, :MaxPulse ),

Personality( Stepwise ),

Run

);

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

Wendy