BookmarkSubscribe
Choose Language Hide Translation Bar
wilkap
Community Trekker

How can I script the Fit Model platform to use the model script in a data table?

When you use the "Fit Model" menu selection under "Analyze" it uses the "model" script in the table to run the analysis.  How can I do this through scripting? For example, the model script in a table has the Y's, the effects, and the personality information required by "Fit Model."  I just need to know how to get these to work together.  Thank you.

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
mjoner
Community Trekker

Re: How can I script the Fit Model platform to use the model script in a data table?

You could try something like

Current Data Table() << Run Script("Model");

You might also need to do something like this -- if you need to get the model to actually run:

modelscript = Current Data Table() << Get Property("Model");

Insert Into(modelscript,Expr(Run));

Eval(modelscript);

2 REPLIES 2
mjoner
Community Trekker

Re: How can I script the Fit Model platform to use the model script in a data table?

You could try something like

Current Data Table() << Run Script("Model");

You might also need to do something like this -- if you need to get the model to actually run:

modelscript = Current Data Table() << Get Property("Model");

Insert Into(modelscript,Expr(Run));

Eval(modelscript);

Highlighted
wilkap
Community Trekker

Re: How can I script the Fit Model platform to use the model script in a data table?

This worked perfectly!  Thank you.