Page 417 - Applied Statistics with R
P. 417

Chapter 17




                      Logistic Regression







                      Note to current readers: This chapter is slightly less tested than previous
                      chapters. Please do not hesitate to report any errors, or suggest sections that
                      need better explanation! Also, as a result, this material is more likely to receive
                      edits.

                      After reading this chapter you will be able to:

                         • Understand how generalized linear models are a generalization of ordinary
                           linear models.
                         • Use logistic regression to model a binary response.
                         • Apply concepts learned for ordinary linear models to logistic regression.
                         • Use logistic regression to perform classification.

                      So far we have only considered models for numeric response variables. What
                      about response variables that only take integer values? What about a response
                      variable that is categorical? Can we use linear models in these situations? Yes!
                      The model that we have been using, which we will call ordinary linear regression,
                      is actually a specific case of the more general, generalized linear model. (Aren’t
                      statisticians great at naming things?)



                      17.1     Generalized Linear Models


                      So far, we’ve had response variables that, conditioned on the predictors, were
                      modeled using a normal distribution with a mean that is some linear combi-
                      nation of the predictors. This linear combination is what made a linear model
                      “linear.”


                                                                            2
                                                                       
                                       ∣ X = x ∼   (   +       + … +      −1   −1 ,    )
                                                   0
                                                        1 1
                                                       417
   412   413   414   415   416   417   418   419   420   421   422