|
Chapter Contents |
Previous |
Next |
| The CATMOD Procedure |
PROC CATMOD requires a MODEL statement. You can specify the following in a MODEL statement:
Design-effects can be any of those described in the section "Specification of Effects", or they can be defined by specifying the actual design matrix, enclosed in parentheses (see the "Specifying the Design Matrix Directly" section). In addition, you can use the keyword _RESPONSE_ alone or as part of an effect. Effects cannot be nested within _RESPONSE_, so effects of the form A(_RESPONSE_) are invalid.
For more information, see the "Log-Linear Model Analysis" section and the "Repeated Measures Analysis" section.
Some examples of MODEL statements are
model r=a b; | main effects only |
model r=a b a*b; | main effects with interaction |
model r=a b(a); | nested effect |
model r=a|b; | complete factorial |
model r=a b(a=1) b(a=2); | nested-by-value effects |
model r*s=_response_; | log-linear model |
model r*s=a _response_(a); | nested repeated measurement factor |
model _f_=_response_; | direct input of the response functions |
The relationship between these specifications and the structure of the design matrix X is described in the "Generation of the Design Matrix" section.
The following table summarizes the options available in the MODEL statement.
| Task | Options |
| Specify details of computation | |
| Generates maximum likelihood estimates | ML |
| Generates weighted least-squares estimates | GLS |
| WLS | |
| Omits intercept term from the model | NOINT |
| Adds a number to each cell frequency | ADDCELL= |
| Averages main effects across response functions | AVERAGED |
| Specifies the convergence criterion for maximum likelihood | EPSILON= |
| Specifies the number of iterations for maximum likelihood | MAXITER= |
| Request additional computation and tables | |
| Estimated correlation matrix of estimates | CORRB |
| Covariance matrix of response functions | COV |
| Estimated covariance matrix of estimates | COVB |
| Two-way frequency tables | FREQ |
| One-way frequency tables | ONEWAY |
| Predicted values | PRED= |
| PREDICT | |
| Probability estimates | PROB |
| Crossproducts matrix | XPX |
| Title | TITLE= |
| Suppress output | |
| Design matrix | NODESIGN |
| Iterations for maximum likelihood | NOITER |
| Parameter estimates | NOPARM |
| Population and response profiles | NOPROFILE |
| _RESPONSE_ matrix | NORESPONSE |
The following list describes these options in alphabetical order.
The OUT= data set always contains the predicted probabilities. If the response functions are the generalized logits, the predicted cell probabilities are output unless the option PRED=FREQ is specified, in which case the predicted cell frequencies are output.
proc catmod;
model R=(1 0,
1 1,
1 2,
1 3);
run;
These statements are appropriate for the case of one population and for R with five levels (generating four response functions), so that 4 ×1 = 4. These statements are also appropriate for a situation with two populations and two response functions per population; giving 2 ×2 = 4 rows of the design matrix. (To induce more than one population, the POPULATION statement is needed.)
When you input the design matrix directly, you also have the option of specifying that any subsets of the parameters be tested for equality to zero. Indicate each subset by specifying the appropriate column numbers of the design matrix, followed by an equal sign and a label (24 characters or less, in quotes) that describes the subset. Adjacent subsets are separated by a comma, and the entire specification is enclosed in parentheses and placed after the design matrix. For example,
proc catmod;
population Group Time;
model R=(1 1 0 0,
1 1 0 1,
1 1 0 2,
1 0 1 0,
1 0 1 1,
1 0 1 2,
1 -1 -1 0,
1 -1 -1 1,
1 -1 -1 2) (1 ='Intercept',
2 3='Group main effect',
4 ='Linear effect of Time');
run;
The preceding statements are appropriate when Group and Time each have three levels, and R is dichotomous. The POPULATION statement induces nine populations, and q=1 (since R is dichotomous), so q ×s = 1 ×9 = 9.
If you input the design matrix directly but do not specify any subsets of the parameters to be tested, then PROC CATMOD tests the effect of MODEL | MEAN, which represents the significance of the model beyond what is explained by an overall mean. For the previous example, the MODEL | MEAN effect is the same as that obtained by specifying
(2 3 4='model|mean');
at the end of the MODEL statement.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.