cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Marco_
Level III

Automate model fitting via JSL

Hi everyone,

 

I'm fitting several models within the Generalized Regression platform because of the advanced model selection features (e.g. prune forward selection). However, JMP does not allow me the exportation of the Indiviual Confidence Limit Formula for each model. Thus, I'm forced to fit the models after the model selection again in the fit least square platform which contains this feature.

I use the function Relaunch Active Set > Relaunch with Active Effects in the Generalized Regression platform and perform the fitting again in the fit least square platform.

Since I have to perform these steps many times I was wondering if it might be possible to automate this within JSL?

 

I would appreciate any help very much!

 

Greetings!

2 REPLIES 2

Re: Automate model fitting via JSL

Select Help > Scripting Index. Select objects using the drop-down menu at the top left. Search the left-most list for Generalized Regression Fit. Here you will find the protocol for this object. It will tell you all the messages that can be used to script this platform.

 

genreg.PNG

Marco_
Level III

Re: Automate model fitting via JSL

Thanks! That was a very good first hint! The example script is a good starting point!

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Diabetes.jmp" );
fm = dt << Fit Model(
	Y( :Y ),
	Effects(
		:Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG,
		:Glucose
	),
	Personality( "Generalized Regression" ),
	Generalized Distribution( "Normal" ),
	Validation( :Validation ),
	Run(
		Fit(
			Estimation Method( Lasso( Adaptive ) ),
			Validation Method( Validation Column )
		)
	)
);
fm << (fit[1] << Relaunch with Active Effects);

 

Do you have any suggestions how I can extend this script in order to perform multiple regressions at once by using a loop?

I guess instead of Y I could use an array with multiple responses, however I struggle a bit with the fm object. I would like to use it to perform a Least Square regression with the outcome of each Relaunch with Active Effects