The one-way combination of class variables appears before the two-way combination. PROC MEANS reports only the level values that are listed in the preloaded range of user-defined formats even when the frequency of observations is zero (in this case, citrus). PROC MEANS rejects entire observations based on the exclusion of any single class value in a given observation. Therefore, when the number of layers is unknown, statistics are calculated for only one observation. The other observation is excluded because the flavor chocolate was not included in the preloaded user-defined format for Flavor.
The order of the levels is based on the order of the user-defined formats. PROC FORMAT automatically sorted the Layers format and did not sort the Flavor format.
Taste Score For Number of Layers and Cake Flavors 1 The MEANS Procedure Analysis Variable : TasteScore Layers N Mean Std Dev Minimum Maximum -------------------------------------------------------------- unknown 1 84.000 . 84.000 84.000 single layer 3 83.000 9.849 75.000 94.000 multi-layer 6 81.167 7.548 72.000 91.000 -------------------------------------------------------------- Analysis Variable : TasteScore Flavor N Mean Std Dev Minimum Maximum -------------------------------------------------------------- Vanilla 6 82.167 7.834 73.000 94.000 Citrus 0 . . . . Spice 3 85.000 5.292 81.000 91.000 Other Flavor 1 72.000 . 72.000 72.000 -------------------------------------------------------------- Analysis Variable : TasteScore Flavor Layers N Mean Std Dev Minimum Maximum ------------------------------------------------------------------------------ Vanilla unknown 1 84.000 . 84.000 84.000 single layer 3 83.000 9.849 75.000 94.000 multi-layer 2 80.000 9.899 73.000 87.000 Citrus unknown 0 . . . . single layer 0 . . . . multi-layer 0 . . . . Spice unknown 0 . . . . single layer 0 . . . . multi-layer 3 85.000 5.292 81.000 91.000 Other Flavor unknown 0 . . . . single layer 0 . . . . multi-layer 1 72.000 . 72.000 72.000 ------------------------------------------------------------------------------ |