**Learning Objectives**

- Interpret main coefficients in logistic regression
- Interpret interaction terms in logistic regression
- Define and interpret model matrices for (generalized) linear models

**Outline**

- Review of GLM
- Interpretation of logistic regression coefficients
- Introduction to model matrices

**Learning objectives**

- perform and interpret logistic regression
- interpret logistic regression coefficients
- make predictions based on a logistic regression model

- perform and interpret likelihood ratio test

**Exercises**

- What is the mean fraction of women using birth control for each age group? Each education level? For women who do or don’t want more children?
- Hint: look at the “data wrangling” cheat sheet functions
`mutate`

,`group_by`

, and`summarize`

- Hint: look at the “data wrangling” cheat sheet functions
- Based on
`fit1`

, write on paper the model for expected probability of using birth control. Don’t forget the logit function. - Based on
`fit1`

, what is the expected probability of an individual 25-29 years old, with high education, who wants more children, using birth control? Calculate it manually, and using`predict(fit1)`

- Based on
`fit1`

: Relative to women under 25 who want to have children, what is the predicted increase in odds that a woman 40-49 years old who does*not*want to have children will be taking birth control? - Using a likelihood ratio test, is there evidence that a model with interactions improves on
`fit1`

(no interactions)? - Which, if any, variables have the strongest interactions?
- Looking at the effect of age only, consider contrasts between
*every pair*of age groups. Between which age groups is the contrast significant?