- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to extract a numberical value from "Distribution" display box?
Hi, all
I met a problem in extracing a numeric value from a display box object.
It is very tricky and could not figure it out.
I have following table "Data.jmp", and try to fit its distribution using following JSL code:
dt = CurrentDataTable();
div = Distribution( Stack( 1 ),
Continuous Distribution(Column( :Value ), Horizontal Layout( 1 ), Vertical( 0 ),
Fit Distribution( Normal(Goodness of Fit( 1 ))), More Moments(1) ),
SendToReport( Dispatch( {"Value"}, "Distrib Outlier Box", FrameBox, Marker Drawing Mode( "Fast" )) )
);
r = div << Report;
skewness = r["Value"]["Moments"][NumberColBox(2)] << get(10);
But the code cannot run, because the error message: "Can't subscript Display Box in access or evaluation of 'Subscript' , r["Value"]["Moments"][Number Col Box( 2 )]"
Would you please advise me how to refer to the "Skewness" value in this display window?
Appreciate your kind help and effort.
Fred
Table: "DATA.jmp"
-------------------------------
Value
5.2185061
6.6833499
5.3100586
4.5776369
3.3874512
4.943848
6.6833499
5.9509278
6.1340333
5.6762697
7.5988771
5.7678227
6.6833499
5.5847171
4.4860839
5.8593752
6.9580079
5.6762697
4.2114259
5.0354005
6.2255863
5.0354005
5.4016116
5.8593752
6.2255863
6.6833499
4.7607425
4.3945314
6.6833499
7.0495609
6.0424807
5.2185061
6.5917973
4.7607425
7.4157716
3.7536623
5.3100586
6.4086918
6.5002443
4.943848
I met a problem in extracing a numeric value from a display box object.
It is very tricky and could not figure it out.
I have following table "Data.jmp", and try to fit its distribution using following JSL code:
dt = CurrentDataTable();
div = Distribution( Stack( 1 ),
Continuous Distribution(Column( :Value ), Horizontal Layout( 1 ), Vertical( 0 ),
Fit Distribution( Normal(Goodness of Fit( 1 ))), More Moments(1) ),
SendToReport( Dispatch( {"Value"}, "Distrib Outlier Box", FrameBox, Marker Drawing Mode( "Fast" )) )
);
r = div << Report;
skewness = r["Value"]["Moments"][NumberColBox(2)] << get(10);
But the code cannot run, because the error message: "Can't subscript Display Box in access or evaluation of 'Subscript' , r["Value"]["Moments"][Number Col Box( 2 )]"
Would you please advise me how to refer to the "Skewness" value in this display window?
Appreciate your kind help and effort.
Fred
Table: "DATA.jmp"
-------------------------------
Value
5.2185061
6.6833499
5.3100586
4.5776369
3.3874512
4.943848
6.6833499
5.9509278
6.1340333
5.6762697
7.5988771
5.7678227
6.6833499
5.5847171
4.4860839
5.8593752
6.9580079
5.6762697
4.2114259
5.0354005
6.2255863
5.0354005
5.4016116
5.8593752
6.2255863
6.6833499
4.7607425
4.3945314
6.6833499
7.0495609
6.0424807
5.2185061
6.5917973
4.7607425
7.4157716
3.7536623
5.3100586
6.4086918
6.5002443
4.943848
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to extract a numberical value from "Distribution" display box?
Your script got mangled, but I could get the skewness by replacing the last line with:
skewness = r["Moments"][NumberColBox(1)][10];
skewness = r["Moments"][NumberColBox(1)][10];