Whereas the dataset EVANS2 contains eight data lines, the dataset EVANS3 contains
sixteen data lines. The first observation of EVANS2 indicates that out of 274 subjects
with CAT¼0, AGEGRP¼0, and ECG¼0, there are 17 CHD cases in the cohort.
EVANS3 uses the first two observations to produce the same information. The first
observation indicates that there are 17 subjects with CHD¼1, CAT¼0, AGEGRP¼
0 and ECG¼0, while the second observation indicates that there are 257 subjects
with CHD¼0, CAT¼0, AGEGRP¼0, and ECG¼0.
We restate the model:
logit PðCHD¼ 1 jXÞ¼b 0 þb 1 CATþb 2 AGEGRPþb 3 ECG
The code to run the model in PROC LOGISTIC using the dataset EVANS3 is:
PROC LOGISTIC DATA¼EVANS3 DESCENDING;
MODEL CHD¼CAT AGEGRP ECG;
FREQ COUNT;
RUN;
The FREQ statement is used to identify the variable (e.g., COUNT) in the input
dataset that contains the frequency counts. The output is omitted.
The FREQ statement can also be used with PROC GENMOD. The code follows:
PROC GENMOD DATA¼EVANS3 DESCENDING;
MODEL CHD¼CAT AGEGRP ECG / LINK¼LOGIT DIST¼BINOMIAL;
FREQ COUNT;
RUN;
E. The Analyst Application
The procedures described above are run by entering the appropriate code in the
Program (or Enhanced) Editor window and then submitting (i.e., running) the
program. This is the approach commonly employed by SAS users. Another option
for performing a logistic regression analysis in SAS is to use the Analyst Application.
In this application, procedures are selected by pointing and clicking the mouse
through a series of menus and dialog boxes. This is similar to the process commonly
employed by SPSS users.
The Analyst Application is invoked by selecting Solutions!Analysis!Analyst from
the toolbar. Once in Analyst, the permanent SAS datasetevans.sas7bdatcan be
opened into the spreadsheet. To perform a logistic regression, select Statistics!
Regression!Logistic. In the dialog box, select CHD as the Dependent variable.
There is an option to use a Single trial or an Events/Trials format. Next, specify
which value of the outcome should be modeled using the Model Pr{} button. In this
case, we wish to model the probability that CHD equals 1. Select and add the covariates
to the Quantitative box. Various analysis and output options can be selected under the
Model and Statistics buttons. For example, under Statistics, the covariance matrix for