In this video, you learn to perform binary logistic
regression using SAS Studio. When you open SAS Studio, click
the Tasks tab at the left side of the window. Then you expand
the Tasks category by left- clicking the triangle to the
left of the word. Then expand the Statistics subcategory.
Open the Binary Logistic Regression task by double-
clicking, or by right-clicking and selecting Open. The task
menu appears to the right. The default name for the task file
is Binary Logistic Regression. You can save the task file
under any name that you want. You can expand your work area
by clicking the Maximize View Button. Under the tab for the
task, make sure that the Data tab is selected. Select the SAS
data by navigating to it. I click the Select the Data icon
next to the Data box and find the LIBSAS library that I've
created, and then I click on the triangle to the left to
expand that library. I'm going to use BIRTH for this example.
I double-click that data set to use it. The red stars show the
required input. I need one response and an event of
interest for it. This variable should have two levels. I click
the + sign next to Response and select LOW for this role. Then
click OK. This variable is coded 1 for Yes and 0 for No,
for the occurrence of low birth weight. When I click the
triangle for Event of Interest, I see 0 and 1 populated. I
select 1 as my event of interest. I want to use two
explanatory variables, one categorical and one numeric.
Below Explanatory Variables, next to Classification
Variables, I click the + sign to select my categorical
predictor. In this case, it's FTV for the count of visits by
the mother to a physician during the first trimester.
Then, I click OK. I can change the parameterization of this
variable from the default of GLM coding by clicking on the
triangle next to Parameterization of Effects,
but I will leave it as it is. Next I click the + sign next to
Continuous Variables and select AGE, which is the mother's age,
and then click OK. The next tab I want to open is the Model
tab. Here I will create my logistic regression model using
the variables that I have just defined. I can expand the task
area to allow a better view of the building of the model. I
want to use both AGE and FTV in the model, in addition to the
interaction between them. I can select both terms by holding
down my Ctrl key while I select each one. Notice that several
more effect types are made available when I do this. I
will select Full Factorial, which adds the main and
interaction effects in one step. Notice at this point that
SAS code appears in the code pane at the right side of the
window. Each option selected modifies the code. If I want to
have SAS select my best subset model, I could request that
using the Selection tab. I would like to display some
plots for my model. I click the Options tab to choose the plots
I would like. I will select Default & Additional Plots to
select those plots that I need. I click the check boxes next to
my selections. I want an effect plot. I'm ready to run my
model. I do that by clicking the running person icon. The
results appear in the rightmost panel. To expand that area, I
can click the Code/Results button. You can see the tables
and plots that were selected using the menus in the tasks. I
have information about the model, the sample size used,
the frequency of each level of my response variable and my
classification variable. Next I see the note that my model
converged. I can see my model fit statistics, including AIC
and SC. These could be used to compare models if I were
running more than one. Next I see tests of the global null
hypothesis. At a 0.05 alpha level, all three tests reject
the null hypothesis of no effect. My type 3 analysis of
effects table shows that there is a statistically significant
interaction between age and number of visits to a physician
during the first trimester. The Analysis of Maximum Likelihood
Estimates table goes into detail about each parameter in
the model. I get a table of association of predicted
probabilities and observed responses to measure the
predictive power of the model. The default influence
diagnostics plots come next, followed by the effect plot
that I requested. Remember that you can always modify your
selections and re-run tasks. You can save each task to a
file so that you have a history of your work. I have shown you
how to perform binary logistic regression using SAS Studio.