Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CATMOD Procedure

Ordering of Populations and Responses

By default, populations and responses are sorted in standard SAS order as follows: Suppose you specify the following statements:

   data one;
      length A B $ 6;
      input A $ B $ wt @@;
      datalines;
   low       low  23  low    medium  31 low    high  38
   medium    low  40  medium medium  42 medium high  50
   high      low  52  high   medium  54 high   high  61
   ;

   proc catmod;
      weight wt;
      model A=B / oneway;
   run;

The ordering of populations and responses corresponds to the alphabetical order of the levels of the character variables. You can specify the ONEWAY option to display the ordering of the variables, while the "Population Profiles" and "Response Profiles" tables display the ordering of the populations and the responses, respectively.

Population Profiles Response Profiles
SampleBResponseA
1high1high
2low2low
3medium3medium

However, in this example, you may want to have the levels ordered in the natural order of `low,' `medium,' `high.' If you specify the ORDER=DATA option

   proc catmod order=data;
      weight wt;
      model a=b / oneway;
   run;
then the ordering of populations and responses is as follows.

Population Profiles Response Profiles
SampleBResponseA
1low1low
2medium2medium
3high3high

Thus, you can use the ORDER=DATA option to ensure that populations and responses are ordered in a specific way. But since this also affects the definitions and the ordering of the parameters, you must exercise caution when using the _RESPONSE_ effect, the CONTRAST statement, or direct input of the design matrix.

An alternative method of ensuring that populations and responses are ordered in a specific way is to replace any character variables with numeric variables and to assign formatted values such as `yes' and `no' to the numeric levels. PROC CATMOD orders the populations and responses according to the numeric values but displays the formatted values.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.