+ - 0:00:00
Notes for current slide
Notes for next slide

Models with Multiple Predictors 1

Bora Jin

1 / 14

Today's Goal

  • Use functions in R to fit a linear model with multiple predictors
  • Interpret coefficients of the model
  • Understand and compare R2 and adjusted R2
  • Model interactions between variables
3 / 14

Quiz

Q - Which of the following is the correct code to fit a linear model for y with x1 and x2 from mydata?

a. linear_reg(engine = "lm") %>% fit(y ~ x1 & x2, data = mydata)

b. linear_reg(engine = "lm") %>% fit(y ~ x1 ~ x2, data = mydata)

c. linear_reg(engine = "lm") %>% fit(y ~ x1 + x2, data = mydata)

d. linear_reg(engine = "lm") %>% fit(y ~ x1 * x2, data = mydata)

4 / 14

Quiz

Q - Which of the following is the correct code to fit a linear model for y with x1 and x2 from mydata?

a. linear_reg(engine = "lm") %>% fit(y ~ x1 & x2, data = mydata)

b. linear_reg(engine = "lm") %>% fit(y ~ x1 ~ x2, data = mydata)

c. linear_reg(engine = "lm") %>% fit(y ~ x1 + x2, data = mydata)

d. linear_reg(engine = "lm") %>% fit(y ~ x1 * x2, data = mydata)

5 / 14

Quiz

Q - What is the biggest difference in interpreting regression coefficients of a model with multiple predictors compared to a model with a single predictor?

a. "all else at 0"

b. "all else held constant"

c. "all increased by 1 unit"

d. no difference

6 / 14

Quiz

Q - What is the biggest difference in interpreting regression coefficients of a model with multiple predictors compared to a model with a single predictor?

a. "all else at 0"

b. "all else held constant"

c. "all increased by 1 unit"

d. no difference

7 / 14

Quiz

Q - What does Occam's razor state in terms of model selection?

a. "choose the simplest model"

b. "choose the model with more predictors"

c. "choose the model with the highest predictive power"

d. "choose the parsimonious model"

8 / 14

Quiz

Q - What does Occam's razor state in terms of model selection?

a. "choose the simplest model"

b. "choose the model with more predictors"

c. "choose the model with the highest predictive power"

d. "choose the parsimonious model"

9 / 14

Quiz

Q - What does Occam's razor state in terms of model selection?

a. "choose the simplest model"

b. "choose the model with more predictors"

c. "choose the model with the highest predictive power"

d. "choose the parsimonious model" the simplest best model

9 / 14

Quiz

Q - Which of the following is the value to consider when comparing multiple models? Select all that apply.

a. Type I error

b. Adjusted R-squared

c. Coefficients

d. R-squared

10 / 14

Quiz

Q - Which of the following is the value to consider when comparing multiple models? Select all that apply.

a. Type I error

b. Adjusted R-squared

c. Coefficients

d. R-squared

11 / 14

Questions?

12 / 14

Let's Practice Together!

Go to AE 21: Models with Multiple Predictors 1

13 / 14

Bulletin

  • Watch videos for Prepare: June 13

  • Lab07 due tonight at 11:59pm

  • Project draft due Monday, June 13 at 11:59pm

  • HW02 due Thursday, June 16 at 11:59pm.

  • HW04 due Thursday, June 16 at 11:59pm

  • Submit ae20 and ae21

14 / 14
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow