0
$\begingroup$

I have this regression model,

$$\hat{Y}=\hat{a}X_1+\hat{b}X_2+\hat{c}$$

Both $X_1$ and $X_2$ are significant at 0.01 level. $X_1$ and $X_2$ have a same unit. Now I want to find a test that tells me whether $\hat{a}$ is significantly higher than $\hat{b}$ or not? Can I use a simple t-test for this comparison?

$\endgroup$

1 Answer 1

4
$\begingroup$

Yes, you can use a t-test!

Since regression coefficients are asymptotically Normal, their linear combination is also asymptotically Normal. First, notice that the test $H_0: \hat{a} = \hat{b}$ is equivalent to $H_0: \hat{a} - \hat{b} = 0$. Then you can get a null distribution on $\hat{a}-\hat{b}$,

$$\hat{a} - \hat{b} \sim N(0, Var(\hat{a}) + Var(\hat{b}) - 2Cov(\hat{a},\hat{b}))$$

Which means you can use a t-test with $n-3$ degrees of freedom on the test statistic,

$$\frac{\hat{b} - \hat{a}}{\sqrt{Var(\hat{a}) + Var(\hat{b}) - 2Cov(\hat{a},\hat{b}))}}$$.

$\endgroup$
4
  • $\begingroup$ It may be a dump question but how can I find Cov of these two? $\endgroup$ Aug 25, 2015 at 17:32
  • 3
    $\begingroup$ That's not the correct result in R: cov.unscaled equals $(X^\prime X)^{-1}$. That matrix needs to be multiplied by an estimate of the residual variance in order to be an estimated covariance matrix. Instead, use vcov(object) to extract the variance-covariance matrix of the parameter estimate contained in object. If you would like to confirm this, compare sqrt(diag(vcov(fit))) to the "Std. Error" column produced by summary. $\endgroup$
    – whuber
    Aug 25, 2015 at 18:13
  • $\begingroup$ You can do this in R. If object is the name of your lm object, vcov(object). $\endgroup$ Aug 25, 2015 at 18:15
  • $\begingroup$ @TrynnaDoStat thank you for your help. just one more question. 'n' is the number of original observations? $\endgroup$ Aug 26, 2015 at 7:13

Your Answer

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

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