Chapter 2 Linear Regression Analysis (LRA)

Following packages and functions are used in this chapter:

## basic packages
library(knitr)
library(kableExtra)
library(tidyverse)
library(conflicted)
library(magrittr)
library(broom)
## paticular packages for this project
library(lmtest)
library(corrr)
library(tseries)
library(corrplot)
library(car)
library(perturb)
library(modelr)
source("../src/funcs.R")
source("../src/tests.R")
## Data and PSMs
source("../docs/census.R")
#> Warning: Missing column names filled in: 'X1' [1]
source("../docs/recs.R")
source("../docs/part.R")
#> Warning: Missing column names filled in: 'X1' [1]

Data

The dataset delivery is from (Montgomery, Peck, and Vining 2012):

dat_delivery <- 
  readxl::read_xls("../data/delivery.xls", col_names = c("i", "time", "case",
    "dist"), skip = 1)

The dataset acetylene is from (Montgomery, Peck, and Vining 2012):

dat_acetylene <-
  readxl::read_xls("../data/acetylene.xls", col_names = c("i", "p", "t_raw",
    "h_raw", "c_raw"), skip = 1) %>%
  mutate(t = (t_raw - 1212.5) / 80.623) %>%
  mutate(h = (h_raw - 12.44) / 5.662) %>%
  mutate(c = (c_raw - 0.0403) / 0.03164) %>%
  select(i, p, t, h, c)

To-Learn

  • confidence interval
  • MSA
  • Likelihood Ratio Test
  • strong exogeneity
  • ANOVA
  • Orthogonalization

References

Montgomery, Douglas C, Elizabeth A Peck, and G Geoffrey Vining. 2012. Introduction to Linear Regression Analysis. Vol. 821. John Wiley & Sons.