Distribution Platform: Difficulty Using "Set Spec Limits for K Sigma" when all fits are used
Aug 10, 2019 2:22 PM(214 views)
Hi. In the Distribution platform, is there a way to refer back to a fitted distribution if the Fit Distribution("All") option is used?
Context: I have a script that fits multiple distributions to my data using the Distribution platform. When I include the Fit Distribution("All") option, the report includes a table "Compare Distributions" with the ranking of each distribution. For example:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dist = Distribution(
Outlier Box Plot(0),
dist << (Fit Handle << Set Spec Limits for K Sigma(3)); //Does nothing
My problem occurs when I want to use the "Set Spec Limits for K Sigma" command. Naturally I must indicate which one of the specific fits this is meant for. I've tried using Fit HandleI, intending to refer to the first fit in the "Compare Distributions" table, but this has no effect.
In the example above, I can use Set Spec Limits for K Sigma command in the GUI (i.e. report window), so in theory I believe I should be able to do this programmatically as well. So far the best option I can think of is to use the above code to identify the best distribution, the re-perform a separate fit using that specific distrubtion, which I would then be able to refer the Set Spec Limits for K Sigma command to. This involves extra computation and code though, which I would prefer to avoid.
Hi Tx. Thanks for replying to this. I see your solution finds the best distribution from the "Compare Distributions" table in the report, and then creates a new, separate fit using the Fit Distribution() command, to which a Set Spec Lims command can be sent. Unfortunately this is what I'm trying to avoid since it involves computing the best fit distribution twice (once with the Fit Distribution(All) command, and again with the Fit Distribution(theDist) command). That being said, unless there's a better option (sigh), this seems to be how it must be done.
An alternate idea occured to me...
In the GUI, one can click on the red down arrow next to the distribution and select "Set Spec Limits...", as shown below. Do you suppose there's a way to tell JSL to "click" on the RDA and select the 5th item in the resulting dropdown list? That is, rather than figure out the commands to do this, just have JSL hijack the GUI. Is anything like that possible?