Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The CATMOD Procedure

Specification of Effects

By default, the CATMOD procedure treats all variables as classification variables. As a result, there is no CLASS statement in PROC CATMOD. The values of a classification variable can be numeric or character. PROC CATMOD builds a set of effects-coded variables to represent the levels of the classification variable and then uses these to fit the model (for details, see the "Generation of the Design Matrix" section). You can modify the default by using the DIRECT statement to treat numeric independent continuous variables as continuous variables. The classification variables, combinations of classification variables, and continuous variables are then used in fitting linear models to data.

The parameters of a linear model are generally divided into subsets that correspond to meaningful sources of variation in the response functions. These sources, called effects, can be specified in the MODEL, LOGLIN, FACTORS, REPEATED, and CONTRAST statements. Effects can be specified in any of the following ways:

The variables for crossed and nested effects remain in the order in which they are first encountered. For example, in the model

   model R=B A A*B C(A B);

the effect A*B is reported as B*A since B appeared before A in the statement. Also, C(A B) is interpreted as C(A*B) and is therefore reported as C(B*A).

Bar Notation

You can shorten the specification of multiple effects by using bar notation. For example, two methods of writing a full three-way factorial model are

   proc catmod;
      model y=a b c a*b a*c b*c a*b*c;
   run;
and
   proc catmod;
      model y=a|b|c;
   run;

When you use the bar (|) notation, the right- and left-hand sides become effects, and the interaction between them becomes an effect. Multiple bars are permitted. The expressions are expanded from left to right, using rules 1 through 4 given in Searle (1971, p. 390):

You can also specify the maximum number of variables involved in any effect that results from bar evaluation by specifying that maximum number, preceded by an @ sign, at the end of the bar effect. For example, the specification A | B | C @ 2 would result in only those effects that contain 2 or fewer variables; in this case, the effects A, B, A*B, C, A*C, and B*C are generated.

Other examples of the bar notation are

A | C(B)is equivalent toA C(B) A*C(B)
A(B) | C(B)is equivalent toA(B) C(B) A*C(B)
A(B) | B(D E)is equivalent toA(B) B(D E)
A | B(A) | Cis equivalent toA B(A) C A*C B*C(A)
A | B(A) | C@2is equivalent toA B(A) C A*C
A | B | C | D@2is equivalent toA B A*B C A*C B*C D A*D B*D C*D

For details on how the effects specified lead to a design matrix, see the "Generation of the Design Matrix" section.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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