Week 2: Regression Review

Review of Regression

Week Learning Objectives

By the end of this module, you will be able to

  • Describe the statistical model for regression
  • Write out the model equations
  • Simulate data based on a regression model
  • Plot interactions

Slides

PDF version

Check your learning
In the example in the video, why do we need a random component?



Check your learning
What is the coding for the sex variable?




Note

Take a pause and look at the scatterplot matrix. Ask yourself the following:

  • How does the distribution of salary look?
  • Are there more males or females in the data?
  • How would you describe the relationship between number of publications and salary?

Sample regression line

Check your learning
How would you translate the regression line \(y = \beta_0 + \beta_1 \text{predictor1}\) into R?



Centering

Check your learning
The mean of the pub variable is 18.2. If we call the mean-centered version of it as pub_c, what should be the value of pub_c for someone with 10 publications?

Categorical Predictor

Check your learning
In a regression analysis, assume that there is a binary predictor that indicates whether a school is public (coded as 0) or private (coded as 1). If the coefficient for that predictor is 1.5, which category has a higher predicted score?

Think more

The coefficient of pub_c becomes smaller after adding time into the equation. Why do you think that is the case?

Interaction

Practice yourself

From the interaction model, obtain the regression line when pub = 50.