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
- :
- Adding Options to the Fit Model Function

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

Sep 2, 2011 4:44 AM
(339 views)

I'm writing some JSL script to fit a model to a data table. Rather than work out the syntax from scratch, I've used the usual trick of running it from the menu, and then sending the script to a script window so I can then copy, amend and/or generalize it in any way I want:

dt1i << Fit Model(

Y( :Response ),

Effects( :Respondent, :Product ),

Personality( Standard Least Squares ),

Emphasis( Minimal Report ),

Run Model(

:Response << {Lack of Fit( 0 ), Plot Actual by Predicted( 0 ),

Plot Regression( 0 ), Plot Residual by Predicted( 0 ),

Plot Effect Leverage( 0 )}

)

I now want to modify this so that I append the predicted values onto the original data set. I can do that from the menu easily enough by selecting the appropriate option after running the model, but I can't work out how to modify the above script to perform that additional task. Can anyone tell me (a) what modification I need to make, and (b) how I can determine this sort of thing for myself? I know it's very simple, but I can't find what I'm looking for in the manual here, and I haven't yet managed to hit the right syntax by trial and error.

Many thanks,

David

3 REPLIES

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

Sep 2, 2011 4:55 AM
(291 views)

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

Sep 2, 2011 5:36 AM
(291 views)

I agree that the jsl documentation is not complete. But since I learned about the indexes in the help menu there has been less trial and error.

The example below is found in the Object Scripting Index under Fitmodel/Fit Least Squares/Save Columns:

dt =

Open**(**

"$English_Sample_Data/Drug.jmp"

**)**;

obj =

Fit Model**(**

Y**(** :y **)**,

Effects**(** :Drug, :x **)**,

Personality**(**

Standard Least Squares

**)**,

Emphasis**(** Minimal Report **)**,

Run

**)**;

obj << Predicted Values;

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

Sep 2, 2011 6:47 AM
(291 views)

Hi:

More generally, one can determine what commands are available for objects via the "Show Properties( object )" command.

Including some that are scripting only. More examples on page 20 of the => Help, Books, Scripting Guide.

obj = Fit Model(....);

Show Properties( obj ); // displays many available object commands

Best regards,

-Matt