5
$\begingroup$

With $X$ being the design matrix, calculate the diagonal elements of the matrix $(X^TX)^{-1}$ using only the R output.

enter image description here

I found the diagonal elements to be $$\frac{1}{n SSX} \bigg[n,\sum X_{i1}^2, \sum X_{i2}^2 \bigg]$$ but I don´t see any way of calculating this based on the R output.

$\endgroup$

1 Answer 1

6
$\begingroup$

Hint: Find the formula for the standard errors of the coefficient estimators. Notice also that these standard errors are given to you in the output.

$\endgroup$
5
  • $\begingroup$ So $Var(\hat{\beta}) = \sigma^2 (X^TX)^{-1}$ But I don't see how to extract diagonal elements this way? Also, isn't $\hat{\beta}$ a $px1$ matrix, while $(X^TX)^{-1}$ is an $nxn$ matrix? $\endgroup$
    – Pame
    Commented Apr 8, 2020 at 14:10
  • $\begingroup$ It's a $p \times p$ matrix $\endgroup$
    – JTH
    Commented Apr 8, 2020 at 14:24
  • $\begingroup$ Still doesen´t make much sense if the left hand side is a $px1$ matrix and the right hand side a $pxp$ matrix. $\endgroup$
    – Pame
    Commented Apr 9, 2020 at 7:11
  • $\begingroup$ Please have a look here. $\endgroup$
    – Ben
    Commented Apr 9, 2020 at 7:18
  • $\begingroup$ Okay, so then the diagonal elements of $(X^TX)^{-1}$ are given by $\frac{Var(\beta_i)}{\sigma^2}$ ? $\endgroup$
    – Pame
    Commented Apr 9, 2020 at 9:01

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.