How can I save the "Stepwise History" into a data table using JSLI am trying to save the "Stepwise History" results from the "Fit model" platform into a data table using the
following script:
obj = Fit Model( Y( :Y ), Effects( :X1, :X2, :X3, :X4, :X5, :X6, :X7, :X8, :X9, :X10, :X11, :X12, :X13, :X14 ), Personality( "Stepwise" ), Run( Stopping Rule( "P-value Threshold" ), Prob to Enter( 0.2 ), Direction( "Mixed" ) ) ); obj << go;
r = obj << Report; dt = r[Table Box( 4 )] << Make into Data Table; Close(dt,Save("Testsave.JMP"));
The reult is a data table with the column names from the stepwise history, but with zero rows. So the information I need for the rest of my analysis is not in the table, while the report does show the history.
Does anyone have an idea to get this working?
Re: How can I save the "Stepwise History" into a data table using JSLThank, I have already applied this and it works great,
Re: How can I save the "Stepwise History" into a data table using JSLYou need to "Finish" the platform. See script below:
Names Default To Here( 1 );
origdt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
obj = origdt << Fit Model(
Y( :NPN1 ),
Effects(
:PNP1,
:PNP2,
:NPN2,
:PNP3,
:IVP1,
:PNP4,
:NPN3,
:IVP2,
:NPN4,
:SIT1,
:INM1,
:INM2,
:VPM1,
:VPM2,
:VPM3,
:PMS1,
:SNM1,
:SPM1,
:NPN5
),
Personality( "Stepwise" ),
Run( Stopping Rule( "P-value Threshold" ), Prob to Enter( 0.2 ), Direction( "Mixed" ) )
);
obj << go;
obj << finish;
r = obj << Report;
dt = r["Step History"][Table Box( 1 )] << Make into Data Table;
Close( dt, Save( "Testsave.JMP" ) );