If you want to let JMP determine which distribution is the best fit, and then only run the Process Capability on the "best fit" distribution, the below script first runs a Distribution Platform and finds the best fit, and then runs the Process Capability on the best fit distribution.
Names default to here(1);
dt =
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Run
dis = Distribution(invisible,
Continuous Distribution(
Column( :PNP3 ),
Fit Normal( Show Fit( 0 ) ),
Fit Cauchy( Show Fit( 0 ) ),
Fit Student's t( Show Fit( 0 ) ),
Fit Lognormal,
Fit Exponential( Show Fit( 0 ) ),
Fit Gamma( Show Fit( 0 ) ),
Fit Johnson( Show Fit( 0 ) ),
Fit SHASH( Show Fit( 0 ) ),
Fit Normal 2 Mixture( Show Fit( 0 ) ),
Fit Normal 3 Mixture( Show Fit( 0 ) ),
Fit Weibull( Show Fit( 0 ) ),
Process Capability( Use Column Property Specs )
)
);
fitList = report(dis)["Compare Distributions", stringcolbox(1)]<<get;
If(contains(fitList,"Gamma") < contains(fitList,"Johnson Sb"), best = "Gamma", best = "Johnson");
report(dis) << close window;
eval(substitute(expr(
dt << Process Capability(
Process Variables( :PNP3 & Dist( _best_ ) ),
Moving Range Method( Average of Moving Ranges ),
Capability Index Plot( 1 )
);),
expr( _best_ ), parse(best))
);
Jim