Hi All
I looking for the JSL code to get the "Fit Model" platform to Box Cox transform data automatically by using the "Replace with Transform" or "Refit with Transform"

Thanks for all your help
Regards
Jakob
Hi @Jakob
Had to slightly alter the example from the Scripting Index, but this should work (just need the 'Refit' line in to prompt it to run):
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
obj = dt << Fit Model(
Y( :ABRASION ),
Effects( :SILICA, :SILANE, :SULFUR ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run
);
Wait( 1 );
obj << Box Cox Y Transformation(
1,
Refit with Transform( 1 )
);
Thanks,
Ben
Hi Ben
Thanks for your help,
I have tried to use the solution, but I get a different results in my exported columns when using manual approach and the scripted version:
Can the reason be that I call the first fit model window ?
Regards
Jakob
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
obj = dt << Fit Model(
Y( :ABRASION ),
Effects( :MODULUS, :ELONG, :HARDNESS, :SILICA, :SILANE, :SULFUR ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Screening" ),
Run(
<<{Summary of Fit( 0 ), Analysis of Variance( 0 ), Parameter Estimates( 0 ), Effect Tests( 0 ), Effect Details( 0 ),
Lack of Fit( 0 ), Expanded Estimates( 0 ), Sorted Estimates( 0 ), Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 1 ), Plot Effect Leverage( 0 ),
Plot Residual by Normal Quantiles( 0 ), Show All Confidence Intervals( 0 ), Show Sqrt Variance Component( 1 ),
Box Cox Y Transformation( 1 ), Scaled Estimates( 0 ), Profiler( 0 )},
FDR( 0 ),
),
SendToReport(
Dispatch( {}, "Box-Cox Transformations", OutlineBox, {Close( 0 )} )
)
);
obj << Predicted Values;
obj << Std Error of Individual;
Wait( 1 );
obj << Box Cox Y Transformation(1,Refit with Transform(1));
Wait( 3 );
obj << Predicted Values;
obj << Std Error of Individual;
Hi @Jakob, what lambda value do you use when running manually? that might be where the difference is. Change the value on 'Refit with Transform (1)' to whatever lambda value is used. i.e.,
obj << Box Cox Y Transformation(1,Refit with Transform(0.95));
Hi Ben
Thank you so much for the help
Regards
Jakob