7.1 Hypothesis Tests and Confidence Intervals for a Single Coefficient
We first discuss how to compute standard errors, how to test hypotheses and how to construct confidence intervals for a single regression coefficient in a multiple regression model. The basic idea is summarized in Key Concept 7.1.
Key Concept 7.1
Testing the Hypothesis
Against the Alternative
- Compute the standard error of
- Compute the -statistic,
- Compute the -value,
Testing a single hypothesis about the significance of a coefficient in the multiple regression model proceeds as in in the simple regression model.
You can easily see this by inspecting the coefficient summary of the regression model
already discussed in Chapter 6. Let us review this:
model <- lm(score ~ size + english, data = CASchools)
coeftest(model, vcov. = vcovHC, type = "HC1")
##
## t test of coefficients:
##
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 686.032245 8.728225 78.5993 < 2e-16 ***
## size -1.101296 0.432847 -2.5443 0.01131 *
## english -0.649777 0.031032 -20.9391 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
You may check that these quantities are computed as in the simple regression model by computing the -statistics or -values by hand using the output above and R as a calculator.
For example, using the definition of the -value for a two-sided test as given in Key Concept 7.1, we can confirm the -value for a test of the hypothesis that the coefficient , the coefficient on size, to be approximately zero.
# compute two-sided p-value
2 * (1 - pt(abs(coeftest(model, vcov. = vcovHC, type = "HC1")[2, 3]),
df = model$df.residual))
## [1] 0.01130921
Key Concept 7.2
Confidence Intervals for a Single Coefficient in Multiple Regression
A two-sided confidence interval for the coefficient is an interval that contains the true value of with a probability; that is, it contains the true value of in of all repeated samples. Equivalently, it is the set of values of that cannot be rejected by a two-sided hypothesis test. When the sample size is large, the confidence interval for is