cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
ih
Super User (Alumni) ih
Super User (Alumni)

How to Save Prediction Formula for Generalized Regression Using JSL

In partitions or linear regressions either 'Prediction Formula' or 'Save Prediction Formula' creates a new column in the data table.  In the generalized regression platform neither work.  In the example below, I suspect this is because I actually want to send a message to the 'Adaptive Lasso with AICc Validation' part of the Generalized Regression report instead of the top level 'Generalized Regression for Oxy'.  Any idea how to do this?

dt = Open( "$SAMPLE_DATA/Fitness.JMP" )  //open sample data

//Fit model with variable reduction
lasso = dt << Fit Model(
	Y( :Oxy ),
	Effects( :Age, :Weight, :Runtime, :RunPulse, :RstPulse, :MaxPulse ),
	Personality( "Generalized Regression" ),
	Generalized Distribution( "Normal" ),
	Run(
		Fit(
			Estimation Method( Lasso( Adaptive ) ),
			Validation Method( AICc )
		)
	)
);

//Save the prediction formula to the table
lasso << Save Prediction Formula;
lasso << Prediction Formula;
lasso << Get Prediction Formula;
//None of these work, the log returns 'Fit Generalized[]' for each.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to Save Prediction Formula for Generalized Regression Using JSL

The Save Prediction Formula needs to be part of the Fit syntax

dt = Open( "$SAMPLE_DATA/Fitness.JMP" ) ; //open sample data

//Fit model with variable reduction
lasso = dt << Fit Model(
	Y( :Oxy ),
	Effects( :Age, :Weight, :Runtime, :RunPulse, :RstPulse, :MaxPulse ),
	Personality( "Generalized Regression" ),
	Generalized Distribution( "Normal" ),
	Run(
		Fit(
			Estimation Method( Lasso( Adaptive ) ),
			Validation Method( AICc),
			Save Prediction Formula(1) )
	)
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to Save Prediction Formula for Generalized Regression Using JSL

The Save Prediction Formula needs to be part of the Fit syntax

dt = Open( "$SAMPLE_DATA/Fitness.JMP" ) ; //open sample data

//Fit model with variable reduction
lasso = dt << Fit Model(
	Y( :Oxy ),
	Effects( :Age, :Weight, :Runtime, :RunPulse, :RstPulse, :MaxPulse ),
	Personality( "Generalized Regression" ),
	Generalized Distribution( "Normal" ),
	Run(
		Fit(
			Estimation Method( Lasso( Adaptive ) ),
			Validation Method( AICc),
			Save Prediction Formula(1) )
	)
);
Jim
ih
Super User (Alumni) ih
Super User (Alumni)

Re: How to Save Prediction Formula for Generalized Regression Using JSL

Perfect, thank you!