Hi @rk3,
Welcome in the Community !
I would recommend not using ChatGPT or other AI-assisted tools for JSL coding, as JSL is not a standard language that these assistants have encountered. Therefore, the syntax is very often (if not always) wrong/false by default.
You could perhaps run the analysis by "point and click" using the JMP platforms (and using CTRL + click to "Run model" for all the responses you have entered in the Fit DSD platform) and use the JSL script recorded by the JMP Log to create the script you need ?
Using the "Extraction Data" dataset from JMP, creating 2 responses so that several responses could be taken into consideration, here are the JSL parts created by the log recorder when fitting several models using Fit DSD, then running models, and finally saving prediction formula in datatable :
// Open Data Table: Extraction Data.jmp
Open( "$SAMPLE_DATA/Design Experiment/Extraction Data.jmp" );
// Creation of 2 new responses Y2 and Y3
// Launch platform: Fit Definitive Screening for 3 responses Yield, Y2 and Y3
New Window( "Extraction Data - Fit Definitive Screening",
Outline Box( "Fit Definitive Screening",
<<SetHorizontal( 1 ),
Data Table( "Extraction Data" ) <<
Fit Definitive Screening(
Y( :Yield ),
X( :Methanol, :Ethanol, :Propanol, :Butanol, :pH, :Time ),
Quadratic Terms Obey Strong Heredity( 1 ),
Interactions Obey Strong Heredity( 1 )
),
Data Table( "Extraction Data" ) <<
Fit Definitive Screening(
Y( :Y2 ),
X( :Methanol, :Ethanol, :Propanol, :Butanol, :pH, :Time ),
Quadratic Terms Obey Strong Heredity( 1 ),
Interactions Obey Strong Heredity( 1 )
),
Data Table( "Extraction Data" ) <<
Fit Definitive Screening(
Y( :Y3 ),
X( :Methanol, :Ethanol, :Propanol, :Butanol, :pH, :Time ),
Quadratic Terms Obey Strong Heredity( 1 ),
Interactions Obey Strong Heredity( 1 )
),
<<Set Base Font( "Title" ),
<<SetHorizontal( 1 )
)
);
// Save Columns: Prediction Formula Yield
Local( {obj},
obj = Data Table( "Extraction Data" ) <<
Fit Model(
Y( :Yield ),
Effects(
:Methanol, :Time, :Methanol * :Time, :Methanol * :Methanol,
:Time * :Time
),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Screening" ),
Run(
:Yield << {Summary of Fit( 0 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Effect Details( 0 ), Sorted Estimates( 0 ),
Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 1 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 ), Profiler(
1,
Confidence Intervals( 1 ),
Desirability Functions( 1 ),
Term Value(
:Methanol( 5, Lock( 0 ), Show( 1 ) ),
:Time( 1.5, Lock( 0 ), Show( 1 ) )
)
)}
)
);
obj << Prediction Formula;
obj << Close Window;
);
// Save Columns: Prediction Formula Y2
Local( {obj},
obj = Data Table( "Extraction Data" ) <<
Fit Model(
Y( :Y2 ),
Effects( :Methanol, :Ethanol, :pH ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Screening" ),
Run(
:Y2 << {Summary of Fit( 0 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Effect Details( 0 ), Lack of Fit( 0 ),
Sorted Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 ),
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
:Methanol( 5, Lock( 0 ), Show( 1 ) ),
:Ethanol( 5, Lock( 0 ), Show( 1 ) ),
:pH( 7.5, Lock( 0 ), Show( 1 ) )
)
)}
)
);
obj << Prediction Formula;
obj << Close Window;
);
// Save Columns: Prediction Formula
Local( {obj},
obj = Data Table( "Extraction Data" ) <<
Fit Model(
Y( :Y3 ),
Effects(
:Methanol, :Ethanol, :Propanol, :Methanol * :Ethanol,
:Methanol * :Propanol, :Ethanol * :Propanol, :Propanol * :Propanol
),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Screening" ),
Run(
:Y3 << {Summary of Fit( 0 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Effect Details( 0 ), Lack of Fit( 0 ),
Sorted Estimates( 0 ), Plot Actual by Predicted( 0 ),
Plot Regression( 0 ), Plot Residual by Predicted( 0 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 ),
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
:Methanol( 5, Lock( 0 ), Show( 1 ) ),
:Ethanol( 5, Lock( 0 ), Show( 1 ) ),
:Propanol( 5, Lock( 0 ), Show( 1 ) )
)
)}
)
);
obj << Prediction Formula;
obj << Close Window;
);
This script won't be directly usable for your task, but it may help you understand the JSL structure. You can also look at JMP Scripting Index to better understand the language format used by JSL.
I'm sure other experienced JSL members of the Community will be able to provide a working script for your task.
Best,
Victor GUILLER
"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)