The example script below gets me the 5 number summary in the format I need. However, I would also like to get the spec limits for each parameter (under Analysis Columns) , LSL and USL, in two separate columns in the final "Summary" data table? How to get this via JSL?
Also, is a another/better way to do what I am need without using Tabulate ()?
Names Default To Here( 1 );
Clear Log();
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
col_names = dt << Get Column Group( "Processes" );
(dt << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Statistics( Min ) ),
Column Table( Statistics( Mean, Median ) ),
Column Table( Statistics( Max ) ),
Column Table( Statistics( Std Dev ) ),
Row Table(
Grouping Columns( :lot_id, :wafer, :Wafer ID in lot ID ),
Analysis Columns(
Eval( col_names )
)
)
)
)) << Make Into Data Table;
You can use the Manage Limits system to do what you want
Names Default To Here( 1 );
Clear Log();
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
col_names = dt << Get Column Group( "Processes" );
(tab = dt << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Statistics( Min ) ),
Column Table( Statistics( Mean, Median ) ),
Column Table( Statistics( Max ) ),
Column Table( Statistics( Std Dev ) ),
Row Table(
Grouping Columns( :lot_id, :wafer, :Wafer ID in lot ID ),
Analysis Columns(
Eval( col_names )
)
)
)
)) << Make Into Data Table;
dtTab = current data table();
tab << close window;
procCols = Associative Array(dtTab:Analysis Columns << get values) << get keys;
obj = dt << Manage Limits(
Process Variables ( eval(procCols) )
);
obj << Save to Tall Limits Table;
dtLimits = current data table();
obj << close window;
try( window("Consistency Problem") << close window );
dtTab << Update(
with( dtLimits ),
Match Columns( :Analysis Columns = :Variable ),
Add Columns from Update Table( :LSL, :Target, :USL)
);
Might be enough if you use variables instead of relying on current data table. At least in JMP17.2 both tabulate << make into data table and << save tall limits table return reference to the table
Names Default To Here(1);
Clear Log();
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
col_names = dt << Get Column Group("Processes");
tab = dt << Tabulate(
Show Control Panel(0),
Add Table(
Column Table(Statistics(Min)),
Column Table(Statistics(Mean, Median)),
Column Table(Statistics(Max)),
Column Table(Statistics(Std Dev)),
Row Table(
Grouping Columns(:lot_id, :wafer, :Wafer ID in lot ID),
Analysis Columns(
Eval(col_names)
)
)
)
);
dttab = tab << Make Into Data Table;
tab << close window;
procCols = Associative Array(dtTab:Analysis Columns << get values) << get keys;
obj = dt << Manage Limits(Process Variables(Eval(procCols)));
dtlimits = obj << Save to Tall Limits Table;
obj << close window;
Try(Window("Consistency Problem") << close window);
dtTab << Update(
with(dtLimits),
Match Columns(:Analysis Columns = :Variable),
Add Columns from Update Table(:LSL, :Target, :USL)
);
@jthi Get this error on JMP 16.2
Object 'Data Table' does not recognize the message 'Manage Limits';
perhaps you mean one of these: <<Manage Spec Limits <<Item Analysis <<Factor Analysis <<Combine Columns... <<Make Indicator Columns... <<New Columns... <<Paste Columns <<Markers <<Select Matching Cells <<Get Rows <<Maximize Display <<Move Scripts <<Rename Table Script <<Matched Pairs <<Multivariate <<Normal Mixtures <<Capability <<Parallel Plot.
There is no other opened data table to update the current data table.
Empty()
Changing Manage Limits () to Manage Spec Limits () gives me another error.
Maybe this doesn't work in JMP16.2. You have to perform different types of checks for the tables. If I remember correctly Get Data Table List() is fairly robust option and the latest table is always first
I changed the code to eliminate the Manage Limits section and to change it to a simple piece of JSL that creates a limit table by reading the limits from the original table. See if this works
Names Default To Here( 1 );
Clear Log();
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
col_names = dt << Get Column Group( "Processes" );
(tab = dt << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Statistics( Min ) ),
Column Table( Statistics( Mean, Median ) ),
Column Table( Statistics( Max ) ),
Column Table( Statistics( Std Dev ) ),
Row Table(
Grouping Columns( :lot_id, :wafer, :Wafer ID in lot ID ),
Analysis Columns(
Eval( col_names )
)
)
)
)) << Make Into Data Table;
dtTab = current data table();
tab << close window;
procCols = Associative Array(dtTab:Analysis Columns << get values) << get keys;
// Create a limits table
dtLimits = new table("Limits",
new column("Variable", character),
new column("LSL"),
New column("Target"),
New column("USL")
);
For Each({col}, procCols,
specs = column(dt, col) << get property("Spec Limits");
if(isList(specs),
dtLimits << add rows(1);
dtLimits:Variable[nrows(dtLimits)] = col;
dtLimits:LSL[nrows(dtLimits)] = specs["LSL"];
dtLimits:Target[nrows(dtLimits)] = specs["Target"];
dtLimits:USL[nrows(dtLimits)] = specs["USL"];
)
);
dtTab << Update(
with( dtLimits ),
Match Columns( :Analysis Columns = :Variable ),
Add Columns from Update Table( :LSL, :Target, :USL)
);