Thelrtestcommand can be used to perform likelihood ratio tests. For example, to
perform a likelihood ratio test on the two interaction terms, CH and CC, in the
preceding model, we can save the2 log likelihood statistic of the full model in the
computer’s memory by using the commandestimates storefollowed by a user
defined name calledfullin this example:
estimates store full
Now the reduced model (without the interaction terms) can be run (output omitted):
logit chd cat age chl ecg smk hpt
After the reduced model is run, type the following command to obtain the results of
the likelihood ratio test comparing the full model (with the interaction terms) to the
reduced model:
Lrtest full
The resulting output follows:
Logit: likelihood-ratio test chi2(2) ¼ 53.16
(Assumption. nested in full) Prob>chi2¼0.0000
The chi-square statistic with 2 degrees of freedom is 53.16, which is statistically
significant as thep-value is close to zero.
Thelincomcommand can be used to calculate a linear combination of parameters. As
with thevceandlrtestcommands, thelincomcommand is used directly after running
a model. Recall, the code to run the full model with the two interaction terms is:
logit chd cat age chl ecg smk hpt ch cc, or
Now suppose we wish to estimate the odds ratio for CAT¼1 vs. CAT¼0 among
those with HPT¼1 and CHOL¼220. This odds ratio isexp(b 1 þ 1 b 6 þ 220 b 7 ), and
can be estimated using thelincomcommand as follows:
lincom cat*1þch*1þcc*220, or
Theoroption requests that the linear combination of parameter estimates be expo-
nentiated. The output containing the odds ratio estimate using thelincomcommand
follows:
chd Odds Ratio Std. Err. z P>jzj [95% Conf. Interval]
(1) 1.216568 .5808373 0.41 0.681 .4772429 3.101226
The Evans County dataset contains individual level data. In the SAS section of this
appendix, we illustrated how to run a logistic regression on summarized binomial
data in which each observation contained a count of the number of events and trials
652 Appendix: Computer Programs for Logistic Regression