I want to create a script that does the following:
1) take a data set (1 column at a time)
2) do a continuous fit for all distributions
3) find the best fit, apply the spec limits and analyze capability parameters (CpK specifically)
4) output the CpK (and probably other stuff) to a table
I know how to do this manually, but even after I do it and save a script, the script doesn't regenerate the same analysis I had done originally. If I set the spec limits within a given distribution (the red triangle beside Normal 3 instead of the top level triangle), that gets lost completely in the script. If I set them from the top level the info is stored, but I have 50-100 data sets to run this analysis on, and they are a range of distributions. I need the script to find the BEST fit, then do this analysis.
Example 1 below is a code snippet I've gotten to work (not output to a table yet, but at least get the right distribution and analysis), but it requires me to know that the data will be Normal 3 mixture. If I use Example 2 it defaults to a Normal distribution, which is wrong. If I could figure out how to evaluate the best fit as a parameter I could use in a switch function or comparable to set up the syntax required for each distribution.
// Example 1 that gives meaningful results, but requires me to know the distribution
Distribution(
Column("Test Data"),
Fit Distribution (Normal Mixtures( Spec Limits( LSL( -1 ), USL( 1 ) ), Clusters( 3 ) )
)
);
// Example 2 gives garbage because it assumes the distribution is normal, and it's never normal
Distribution(
Column("Test Data"),
Fit Distribution ("All"), Capability Analysis ( LSL( -1 ), USL( 1 ) )
);
Other help with outputting to a table would be great too. This is my first JMP script and I'm struggling to find clear examples in the Scripting Guide.