Skip to content

Commit

Permalink
typo in homoskedastic variance estimator (fixes #62)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattblackwell committed Jun 9, 2024
1 parent 25e64c9 commit 563914a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions _freeze/ols_properties/execute-results/html.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _freeze/ols_properties/execute-results/tex.json

Large diffs are not rendered by default.

Binary file modified _freeze/ols_properties/figure-pdf/fig-wald-1.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion ols_properties.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ $$
$$
where we use $n-k-1$ in the denominator instead of $n$ to correct for the residuals being slightly less variable than the actual errors (because OLS mechanically attempts to make the residuals small). For consistent variance estimation, $n-k -1$ or $n$ can be used, since either way $\widehat{\sigma}^2 \inprob \sigma^2$. Thus, under homoskedasticity, we have
$$
\widehat{\mb{V}}_{\bfbeta}^{\texttt{lm}} = \widehat{\sigma}^{2}\left(\Xmat'\Xmat\right)^{{-1}},
\widehat{\mb{V}}_{\bfbeta}^{\texttt{lm}} = \widehat{\sigma}^{2}\left(\frac{1}{n}\Xmat'\Xmat\right)^{{-1}} = n\widehat{\sigma}^{2}\left(\Xmat'\Xmat\right)^{{-1}},
$$
This is the standard variance estimator used by `lm()` in R and `reg` in Stata.
Expand Down
Loading

0 comments on commit 563914a

Please sign in to comment.