cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
ron_horne
Super User (Alumni)

summary table sorted in the wrong order if there are value labels

hi all,

just wondered if i came across a bug in the program.

table summary is known to produce a sorted table by the grouping variable. i just noticed it is not the case if there are value labels (and no value ordering).

for example:

Open( "$SAMPLE_DATA/Big Class.jmp" );

// this will produce a correctly sorted table

Data Table( "Big Class" ) << Summary( Group( :age ), Link to original data table( 0 ) );

// and here is where thing go a bit funny

:age << value labels( {13 = "thirteen"} );

Data Table( "Big Class" ) << Summary( Group( :age ), Link to original data table( 0 ) );

12 REPLIES 12
ron_horne
Super User (Alumni)

Re: summary table sorted in the wrong order if there are value labels

Hi ChungWei,

I don't think so. JMP has the perfect flexibility to offer value labels on top of the values themselves which is complementary and should not be a substitute. this allows for multidimensionality.

table summary is the only case i came across so far in the program that has this behavior of guessing that value labels should be recoded on the fly.

please let me know if you are aware of any other platforms/processes that do that.

in addition i do not find it correct to sort by the labels rather than the values. consider the following: using a variable that takes values from 1-5 where the user has labeled 1 as "Low" and 5 as "High". in this case the summary by that variable will come in an unintuitive order. (i.e. High, Low, 2, 3, 4 instead of low, 2, 3, 4, High). and that is in a case of trivial labeling. if labeling is more "sophisticated" then the difference between intuition and results can increase even further.

Thanks!

chungwei
Staff (Retired)

Re: summary table sorted in the wrong order if there are value labels

The case that you mentioned,  1 labeled as low, 5 as high, comes out as you expected, low is sorted first, high is sorted last in summary.

Other platforms that do that are tabulate and chart.

chungwei
Staff (Retired)

Re: summary table sorted in the wrong order if there are value labels

Grouping the data by labels gives the flexibility of aggregating different values into a group without actually changing your data.

It also removes the ambiguity, what to do when 2 values are mapped to the same label.