| Intercept | Slope | SSE |
|---|---|---|
| 3.00 | 0.50 | 0.06 |
| 3.15 | 0.20 | 0.14 |
| 3.15 | 0.50 | 0.21 |
| 3.00 | 0.20 | 0.27 |
| 2.96 | 0.56 | 0.06 |
Spring 2025
lm()summary() (for now)| Intercept | Slope | SSE |
|---|---|---|
| 3.00 | 0.50 | 0.06 |
| 3.15 | 0.20 | 0.14 |
| 3.15 | 0.50 | 0.21 |
| 3.00 | 0.20 | 0.27 |
| 2.96 | 0.56 | 0.06 |
The “predicted” or “expected” change in the outcome variable associated with a one-unit change in the explanatory variable, i.e. if rainfall increases by one unit, how will yield change?
The “predicted” or “expected” value of the outcome variable when the explanatory variable equals zero, i.e. what are yields when there’s no rain?
General equation \[\begin{aligned} \text{Outcome} &= \beta_0 + \beta_1 \times \text{Explanatory} + \varepsilon \end{aligned}\]
Using variables from quiz example \[\begin{aligned} \text{Yield} &= \beta_0 + \beta_1 \times \text{Rainfall} + \varepsilon \end{aligned}\]
General equation \[\begin{aligned} \text{Outcome} &= \beta_0 + \beta_1 \times \text{Explanatory} + \varepsilon \end{aligned}\]
Using variables from quiz example \[\begin{aligned} \text{Yield} &= \beta_0 + \beta_1 \times \text{Rainfall} + \varepsilon \end{aligned}\]
Making predictions with estimated values of \(\beta_0, \beta_1\) \[\begin{aligned} \mathbf{E}(\text{Yield}) &= 2.96 + 0.563 \times \text{Rainfall} \end{aligned}\]
[NEW OBJECT] <- lm(data = [OBJECT NAME], formula = [OUTCOME] ~ [EXPLANATORY]
rain_yield_ols <- lm(data = rain_yield, formula = Yield ~ Rain)summary([OBJECT NAME]), e.g. summary(rain_yield_ols)
Regression with multiple explanatory variables
How would the relationship between height and earnings change if we accounted for gender somehow in the same analysis?