Back to OpenIntro Statistics

Multiple and logistic regression

Multiple predictors, model selection, checking regression assumptions with diagnostic plots, and logistic regression for a binary outcome.

OpenIntro Statistics, Multiple and logistic regression

Status
FlagsLoading your progress…

10 exercises

Exercise 1

Baby weights, Part I. The Child Health and Development Studies investigate a range of topics. One study considered all pregnancies between 1960 and 1967 among women in the Kaiser Foundation Health Plan in the San Francisco East Bay area. Here, we study the relationship between smoking and weight of the baby. The variable smoke is coded 1 if the mother is a smoker, and 0 if not. The summary table b…

3.0

Exercise 3

Baby weights, Part III. We considered the variables smoke and parity, one at a time, in modeling birth weights of babies in Exercises 9.1 and 9.2. A more realistic approach to modeling infant weights is to consider all possibly related variables at once. Other variables of interest include length of pregnancy in days (gestation), mother’s age in years (age), mother’s height in inches (height), and…

3.0

Exercise 5

GPA. A survey of 55 Duke University students asked about their GPA, number of hours they study at night, number of nights they go out, and their gender. Summary output of the regression model is shown below. Note that male is coded as 1.

  1. Calculate a 95% confidence interval for the coefficient of gender in the model, and interpret it in the context of the data.

  2. Would you expect a 95% confidenc…

3.0

Exercise 7

Baby weights, Part IV. Exercise 9.3 considers a model that predicts a newborn’s weight using several predictors (gestation length, parity, age of mother, height of mother, weight of mother, smoking status of mother). The table below shows the adjusted R-squared for the full model as well as adjusted R-squared values for all models we evaluate in the first step of the backwards elimination process.

…
3.0

Exercise 9

Baby weights, Part V. Exercise 9.3 provides regression output for the full model (including all explanatory variables available in the data set) for predicting birth weight of babies. In this exercise we consider a forward-selection algorithm and add variables to the model one-at-a-time. The table below shows the p-value and adjusted R2R^{2} of each model where we include only the corresponding predicto…

3.0

Exercise 11

Movie lovers, Part I. Suppose a social scientist is interested in studying what makes audiences love or hate a movie. She collects a random sample of movies (genre, length, cast, director, budget, etc.) as well as a measure of the success of the movie (score on a film review aggregator website). If as part of her research she is interested in finding out which variables are significant predictors…

3.0

Exercise 17

Possum classification, Part II. A logistic regression model was proposed for classifying common brushtail possums into their two regions in Exercise 9.15. The outcome variable took value 1 if the possum was from Victoria and 0 otherwise.

  1. Write out the form of the model. Also identify which of the variables are positively associated when controlling for other variables.

  2. Suppose we see a brusht…

3.0

Exercise 19

Multiple regression fact checking. Determine which of the following statements are true and false. For each statement that is false, explain why it is false.

  1. If predictors are collinear, then removing one variable will have no influence on the point estimate of another variable’s coefficient.

  2. Suppose a numerical variable xx has a coefficient of b1=2.5b_{1}=2.5 in the multiple regression model. Suppose also t…

3.0

Exercise 21

Spam filtering, Part I. Spam filters are built on principles similar to those used in logistic regression. We fit a probability that each message is spam or not spam. We have several email variables for this problem: to_ multiple, cc, attach, dollar, winner, inherit, password, format, re_ subj, exclaim_ subj, and sent_ email. We won’t describe what each variable means here for the sake of brevity,…

3.0

Exercise 23

Spam filtering, Part II. In Exercise 9.21, we encountered a data set where we applied logistic regression to aid in spam classification for individual emails. In this exercise, we’ve taken a small set of these variables and fit a formal model with the following output:

  1. Write down the model using the coefficients from the model fit.

  2. Suppose we have an observation where to_multiple=0\texttt{to\_\hskip 0.85358pt{}multiple}=0, winner=1\texttt{winner}=1, format=0\texttt{format}=0, and re_subj=0\texttt{re\_\hskip 0.85358pt{}subj}=0. What is…

3.0

Adapted from OpenIntro Statistics © 2019 David Diez, Mine Çetinkaya-Rundel & Christopher D. Barr. Licensed under CC BY-SA 3.0. Source: OpenIntro Statistics. Imported at revision fee2509.