Multicollinearity

Inference for Linear Regression in R

Jo Hardin

Professor, Pomona College

Regressing dollar amount on coins

head(change)
 A tibble: 6 x 7
  Coins  Qrts Dimes Nickels Pennies Small Amount
  <int> <int> <int>   <int>   <int> <int>  <dbl>
1     2     1     1       0       0     1   0.35
2     3     3     0       0       0     0   0.75
3     2     0     0       2       0     2   0.10
4     4     4     0       0       0     0   1.00
5     2     2     0       0       0     0   0.50
6    13     3     4       2       4    10   1.29
Inference for Linear Regression in R

Amount vs. coins - plot

Inference for Linear Regression in R

Amount vs. coins - linear model

lm(Amount ~ Coins, data = change) %>% tidy()
           term estimate std.error statistic  p.value
1 (Intercept)   0.1449    0.0902      1.61 1.13e-01
2       Coins   0.0945    0.0063     14.99 6.01e-22
Inference for Linear Regression in R

Amount vs. small coins - plot

Inference for Linear Regression in R

Amount vs. small coins - linear model

lm(Amount ~ Small, data = change) %>% tidy()
         term estimate std.error statistic  p.value
1 (Intercept)   0.4225    0.1244      3.40 1.22e-03
2       Small   0.0989    0.0118      8.38 1.10e-11
Inference for Linear Regression in R

Amount vs. coins and small coins

$\hat{\text{Amount}} = -0.00554 + 0.25862 \cdot \text{Coins} - 0.21611 \cdot \text{Small Coins}$

lm(Amount ~ Coins + Small, data = change) %>% tidy()
           term estimate std.error statistic  p.value
1 (Intercept) -0.00554   0.02735    -0.202 8.40e-01
2       Coins  0.25862   0.00682    37.917 3.95e-43
3       Small -0.21611   0.00864   -25.021 4.17e-33
Inference for Linear Regression in R

Let's practice!

Inference for Linear Regression in R

Preparing Video For Download...