Chapter Contents |
Previous |
Next |
The CATMOD Procedure |
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 | ||
Sample | B | Response | A |
1 | high | 1 | high |
2 | low | 2 | low |
3 | medium | 3 | medium |
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 | ||
Sample | B | Response | A |
1 | low | 1 | low |
2 | medium | 2 | medium |
3 | high | 3 | high |
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 |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.