|
Chapter Contents |
Previous |
Next |
| The LOGISTIC Procedure |
In a seed germination test, seeds of two cultivars were planted in pots of two soil conditions. The following SAS statements create the data set seeds, which contains the observed proportion of seeds that germinated for various combinations of cultivar and soil condition. Variable n represents the number of seeds planted in a pot, and variable r represents the number germinated. The indicator variables cult and soil represent the cultivar and soil condition, respectively.
data seeds;
input pot n r cult soil;
datalines;
1 16 8 0 0
2 51 26 0 0
3 45 23 0 0
4 39 10 0 0
5 36 9 0 0
6 81 23 1 0
7 30 10 1 0
8 39 17 1 0
9 28 8 1 0
10 62 23 1 0
11 51 32 0 1
12 72 55 0 1
13 41 22 0 1
14 12 3 0 1
15 13 10 0 1
16 79 46 1 1
17 30 15 1 1
18 51 32 1 1
19 74 53 1 1
20 56 12 1 1
;
PROC LOGISTIC is used to fit a logit model to the data, with cult, soil, and cult × soil interaction as explanatory variables. The option SCALE=NONE is specified to display goodness-of-fit statistics.
proc logistic data=seeds;
model r/n=cult soil cult*soil/scale=none;
title 'Full Model With SCALE=NONE';
run;
Output 39.8.1: Results of the Model Fit for the Two-Way Layout
Results of fitting the full factorial model are shown in
Output 39.8.1. Both Pearson
and deviance are
highly significant (p < 0.0001), suggesting that the model
does not fit well. If the link function and the model
specification are correct and if there are no outliers, then
the lack of fit may be due to overdispersion. Without
adjusting for the overdispersion, the standard errors are
likely to be underestimated, causing the Wald tests to be
too sensitive. In PROC LOGISTIC, there are three SCALE=
options to accommodate overdispersion. With unequal sample
sizes for the observations, SCALE=WILLIAMS is preferred. The
Williams model estimates a scale parameter
by
equating the value of Pearson
for the full model to
its approximate expected value. The full model considered
here is the model with cultivar, soil condition, and their
interaction. Using a full model reduces the risk of
contaminating
with lack of fit due to incorrect model
specification.
proc logistic data=seeds;
model r/n=cult soil cult*soil / scale=williams;
title 'Full Model With SCALE=WILLIAMS';
run;
Output 39.8.2: Williams' Model for Overdispersion|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
proc logistic data=seeds;
model r/n=soil / scale=williams(0.075941);
title 'Reduced Model With SCALE=WILLIAMS(0.075941)';
run;
Output 39.8.3: Reduced Model with Overdispersion Controlled
| ||||||||||||||||||||||||
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.