JSL method to get the upper control limits from multivariate outlier analysisWhat inspired this wish list request?
Multivariate platform's Outlier Analysis allows you to save Mahalanobis Distances, Jackknife Distances, etc to a column. It will plot these and show a calculated Upper control limit on those for current alpha - very useful for using the distances to assess whether a point is an outlier. JMP puts a single value (ie Jackknife Value) into the column properties (ie on the Jackknife Distances column) that is this UCL. However, if there was a By group, there are distinct UCL values for every group (based on number of non-missing points in the group) and this single value in the column properties appears to just be for the last group.
One might think you could extract them from the platform's report but it doesn't seem like it - they are in Frameboxes, not textboxes in the report and I don't see a way to extract those values.
What is the improvement you would like to see?
In my use case, with a By Group I'd like the UCLs in a column as well. But what I'd like to see is maybe an ability to ask the platform for those, maybe similar to the way you can ask a fit in Fit Model for various calculated values using <
Related: it would be nice if in cases like this there were a good way to <
Why is this idea important?
I think it's clear why the UCLs are useful - it's what you'd compare the distance to in order to see if it's a large distance, for a given confidence?
Here's a community post where someone wanted this value, they just weren't using a By I guess because were happy with the single value in column properties:Solved: Jackknife Predicted Values - JMP User Community
Automation and ScriptingBasic Data Analysis and ModelingRe: JSL method to get the upper control limits from multivariate outlier analysisYou can export those values with scripting. This isn't the best method but should show that it is possible
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Solubility.jmp");
dt << New Column("Group", Numeric, Continuous, Formula(
If(Row() < 20, 1, Row() < 40, 2, 3);
));
mv = dt << Multivariate(
Y(:Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane),
Variance Estimation("Row-wise"),
Scatterplot Matrix(1),
By(:Group)
);
mv << Jackknife Distances(1, Save Jackknife Distances);
window = mv[1] << Top Parent;
fbs = window << XPath("//OutlineBox[text()='Jackknife Distances']//FrameBox");
fbs_of_interest = fbs[2::NItems(fbs)::2];
segs = fbs_of_interest << Find Segs(CustomStreamSeg(1));
seg_scripts = segs << get script;
ucls = {};
For Each({seg_script}, seg_scripts,
Insert Into(ucls, seg_script[1]["Text"][2]);
);
show(ucls);Re: JSL method to get the upper control limits from multivariate outlier analysisClever! I had tried to use FindSegs unsuccessfully. But it's not changing my wish for a way to directly request those values.
Re: JSL method to get the upper control limits from multivariate outlier analysisKudo + Kudo for the nice workaround 
@jthi how did you find out that it is CustomStreamSeg?
Is there something like << list segs?


Re: JSL method to get the upper control limits from multivariate outlier analysisMost likely by guessing and trying different things (I know it is FrameBox -> I know there could be display segments -> go from there (check xml, use << find segs... or just start with xml). Accessing that weird CustomStreamSeg isn't necessary as you can get the UCL value from "earlier" FrameBox accessing its LineSeg
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Solubility.jmp");
dt << New Column("Group", Numeric, Continuous, Formula(
If(Row() < 20, 1, Row() < 40, 2, 3);
));
mv = dt << Multivariate(
Y(:Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane),
Variance Estimation("Row-wise"),
Scatterplot Matrix(1),
By(:Group)
);
mv << Jackknife Distances(1, Save Jackknife Distances);
window = mv[1] << Top Parent;
linesegs = window << XPath("//FrameBox[@helpKey = 'Multiv Outlier']/LineSeg[@description='UCL Line']");
ucls = {};
For Each({yvals}, linesegs << Get Y Values,
Insert Into(ucls, yvals[1]);
);
show(ucls);Re: JSL method to get the upper control limits from multivariate outlier analysisThanks 
nice trick to use the XML here as well - I expected it to stop on FrameBox level.
cool that XPath works here as well ...
Re: JSL method to get the upper control limits from multivariate outlier analysisA couple of other observations about this that might be worth a look: when you save the Jackknife distances this way (from Multivariate platform's Outlier Analysis) you don't get a formula column although you do if you save Mahalanobis distances or T squared. The results for Jackknife distances do match the formula described Multivariate Methods documentation but that doesn't result consistently in a missing value for the simple 1-d case where all the other values are the same so their standard deviation is 0, it can result in either missing or a very large value in that case.