8
$\begingroup$

Say I estimate the following multivariate linear regression $$ y = \beta_0 +\beta_1 x_1 +\beta_2 x_2+\beta_3x_3+\beta_4x_4 + \epsilon$$ How can I test that $\beta_1=\beta_2=\beta_3$?

I know that to test if $\beta_1=\beta_2$ you can simply construct a $Z$ test with $$ Z = \frac{\beta_1-\beta_2}{\sqrt{se_{\beta_1}^2+se_{\beta_2}^2}}$$

Is there an analogue for multiple coefficient estimates?

$\endgroup$
2
  • 3
    $\begingroup$ The test for equality of $\beta_1$ and $\beta_2$ implicitly assumes the estimates of the $\beta_i$ are uncorrelated. In general it will be incorrect; the denominator needs to include a term for their covariance. $\endgroup$
    – whuber
    Nov 16, 2017 at 15:32
  • $\begingroup$ If your X variables are in different units, then the beta coefficients are also in different units. In that case, I don’t see how it would make sense to compare them. $\endgroup$ Nov 21, 2017 at 19:17

1 Answer 1

9
$\begingroup$

You can use the $F$ test to test any linear restrictions $L$ on your coefficients.

Let your null hypothesis be $H_0:L\beta = c$ and your design matrix $X$ with rank $k$. Then the $F$ statistic will be:

$$ F = \frac{(L\hat{\beta}- c)'(\hat{\sigma}^2L(X'X)^{-1}L')^{-1}(L\hat{\beta} - c)}{q} $$

where $q$ is the number of restrictions you are testing. Under the null this will have an $F$ distribution with degrees of freedom $q$ and $n-k$.

In R you can easily do that with the function linearHypothesis of the car package. For example:

library(car) 
lm.model <- lm(mtcars)
linearHypothesis(lm.model, c("cyl = 0", "disp = 0", "hp = 0")) # all 3 zero
linearHypothesis(lm.model, c("cyl = disp", "disp = hp")) # all 3 equal
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.