Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to obtain heteroscedasticity robust standard errors?

    Hello everyone,

    Since my error terms are heteroscedastic, I am trying to figure out how I can obtain heteroskedasticity-robust standard errors in Stata. I found some examples on this forum, but these don't exactly match my situation.

    I have longitudinal data; my dependent variable was measured at 3 different time points. Thereby, I have a continuous outcome variable. I am analyzing my data with a linear mixed model analysis. Therefore, my command is:

    mixed [dependent variable] [independent variables] || id:

    I can obtain robust standard errors by adding ", vce(robust)" to this command or ", vce(cluster id)" (both options give the exact same output). However, I understand that these are the HC1 type of robust standard errors, which are not the heteroskedasticity-robust standard errors. Unfortunately, if I add ", vce(hc2)" or ", vce (h3)" to my command, I receive an error.

    How do I obtain heteroskedasticity-robust standard errors in my situation?

    Thanks for any help.


  • #2
    Wes:
    the standard errors produced by the -hc- available from -regress- (but not for -mixed-) are not that different.
    In addition,
    vce(hc2) and vce(hc3) specify alternative bias corrections for the robust variance calculation.
    (see -regress- helpfile), that does not imply that the default robust option is flawed.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      You should use vce(robust) so the standard errors are robust to the assumed error correlation structure, which is a restrictive exchangeable structure. You get automatic robustness to heteroskedasticity, too.

      Comment

      Working...
      X