The Essentials of Biostatistics for Physicians, Nurses, and Clinicians

(Ann) #1
7.6 Logistic Regression 119

exp(( α + β x )) to both sides, we have π ( x ) + π ( x )exp(( α + β x )) =
exp(( α + β x )). Now, we factor out π ( x ) from the left - hand side of the
equation and get π ( x )[1 + exp(( α + β x ))] = exp(( α + β x )). Finally, we
divide both sides by [1 + exp(( α + β x ))] and get


παβ αβ( ) exp((xx=+ ++)) /[ 1 exp(( x))].


Our objective in logistic regression is to estimate the parameters α
and β to provide the “ best fi t ” in some statistical sense. Now, in ordinary
linear regression, when the error terms are normally distributed with
mean equal to zero and a constant variance, least squares, and maximum
likelihood are the same. In the logistic regression model, however,
maximum likelihood and least squares are not equivalent because the
error term is not normally distributed. Now we proceed to see where
maximizing the likelihood will take us.
Suppose the data consists of the pair ( x i , y i ) for i = 1, 2,... , n.
The x i s are the observed values for X , and the y i s are the observed Y -
values. Remember that the y i s are dichotomous and only can be 0 or 1.
The likelihood function is then


The solution is obtained by taking partial derivatives with respect
to α and β to obtain the two equations Σ [ y i − π ( x i )] = 0 and
Σ x i [ y i − π ( x i )] = 0. The parameters α and β enter these equations
through the relationship π ( x i ) = exp(( α + β x i ))/[1 + exp(( α + β x i ))].
These equations must be solved numerically since they are not linear
in α and β. It is also not obvious that the solution is unique.
For the fi ne details, see Hosmer and Lemeshow ( 2000 ) or Hilbe
( 2009 ). The logistic regression model is a special case of the general-
ized linear model due to Nelder. The generalized linear model is linear
in the regression parameters but replaces the response Y with a function
called the link function. In the case of logistic regression, the logit
function is the link function. If you want to learn more about general-
ized linear model, including other examples, consult McCullagh and
Nelder ( 1989 ).
The data in Table 7.4 was adapted from Campbell and Machin
( 1999 ) by Chernick and Friis ( 2003 ), and is used here to illustrate a


Lx y x y x y

xxx x

nn
y y y

11 2 2

11

1
22

1111 2


(), , , , ... , =


()[]− () () − ()


πππ π−
[[]()[]− ()

11 −−y (^21)
n
y
n
...ππxxn yn.

Free download pdf