|
Chapter Contents |
Previous |
Next |
| The CATMOD Procedure |
Suppose you have the following data, and you want to use IPF to fit the "no three-factor effect" model:
data pathological;
input X Y Z count @@;
datalines;
1 1 1 0 1 1 2 15
1 2 1 15 1 2 2 24
2 1 1 17 2 1 2 14
2 2 1 16 2 2 2 0
;
For this model, it turns out that n111=n222=0 implies the
cell frequency estimates
. This means
that the table has only 6 degrees of freedom (non-structural zero
cells) available, while the model requires 7 degrees of freedom (one
degree for each of the mean, X, Y, Z, XY, XZ, and YZ). Therefore,
in order to analyze the data appropriately, these two cells should
be dropped from the table and treated as structural zeros, and the
model should be reduced. You may be able to identify cases like
this with PROC CATMOD by observing convergence problems or by noting
that the predicted frequency of a cell seems to be converging to
zero:
proc catmod data=pathological;
weight count;
model X*Y*Z=_response_ / ml=ipf zero=sampling;
loglin X|Y|Z@2;
run;
Output 1.2.1: ML=IPF with ZERO=SAMPLING
|
proc catmod data=pathological;
weight count;
model X*Y*Z=_response_ / ml=ipf;
loglin X|Y|Z@2;
run;
Output 1.2.2: ML=IPF with Structural Zeros
proc catmod data=pathological;
weight count;
model X*Y*Z=_response_ / ml=nr;
loglin X|Y|Z@2;
run;
Output 1.2.3: ML=NR with Structural Zeros
| ||||||||||||||||||||||||||||||||||||||||
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 2000 by SAS Institute Inc., Cary, NC, USA. All rights reserved.