文档介绍:
puting > Stata > Web Books > Logistic
Logistic Regression with Stata
Chapter 1: Introduction to Logistic Regression with Stata
We will begin our discussion of binomial logistic regression paring it to regular ordinary least squares (OLS) regression. Perhaps
the most obvious difference between the two is that in OLS regression the dependent variable is continuous and in binomial logistic
regression, it is dichotomous, usually coded as 0 and 1. Because the dependent variable is dichotomous, different assumptions are made
in logistic regression than are made in OLS regression, and we will discuss these assumptions later. Logistic regression is similar to OLS
regression in that it is used to determine which predictor variables are statistically significant, diagnostics are used to check for outliers, a
test-statistic is calculated that indicates if the overall model is statistically significant, and coefficients for each of the predictor variables
are calculated.
To illustrate the difference between OLS and logistic regression, let's see what happens when data with a binary e variable is
analyzed using OLS regression. For this example and many of the examples in this chapter, we will use a set of data collected by the
state of California from 1200 high schools measuring academic achievement. Our dependent variable is called hiqual. This variable was
created from a continuous variable using a cut-off point of 745. Hence, values below 744 were coded as 0 (with a label of
"not_high_qual") and values above 745 were coded as 1 (with a label of "high_qual"). Our predictor variable will be a continuous
variable called avg_ed, which is a measure of the average education obtained by the parents of the students in the participating high
schools (ranging from 1 to 5). After running the regression, we will obtain the fitted values and then graph them against observed
variables.
NOTE: You wi