How to reference a fitted model?
If I have a script that launches a model dialog, then how do I get a reference to the model object?
For example I want to do something like
fm = Fit Model();
script = fm << Get Script;
However, this doesn't work because the fit model dialog is non-modal and Get Script gets executed before the dialog is completed. The result is a near empty script:
Fit Model(Set Alpha Level(0.05));
Whereas the script for the model looks like:
Fit Model(
Y( :height ),
Effects( :weight ),
Personality( Standard Least Squares ),
Emphasis( Minimal Report ),
Run(
:height << {Plot Actual by Predicted( 0 ), Plot Residual by Predicted( 0 ),
Plot Effect Leverage( 0 )}
)
);