The vce(robust) option allows SE to be derived that are robust to misspecification. But does the regression output give clues as to when it should be applied?
Here, I have run the same regression, with and without the option. The margins themselves are unchanged. But there are two changes to the SE: firstly, they get larger with the option included; secondly, the repeated-measures SE are no longer the same. Intuitively, the latter observation makes sense, since the SE of the measured data are not equal.
But, with robust analysis I get:
Which is correct, and why?
Here, I have run the same regression, with and without the option. The margins themselves are unchanged. But there are two changes to the SE: firstly, they get larger with the option included; secondly, the repeated-measures SE are no longer the same. Intuitively, the latter observation makes sense, since the SE of the measured data are not equal.
Code:
. mixed hr ib179.sb10##time c.ph || id: Performing EM optimization: Performing gradient-based optimization: Iteration 0: log likelihood = -435.33309 Iteration 1: log likelihood = -435.33077 Iteration 2: log likelihood = -435.33077 Computing standard errors: Mixed-effects ML regression Number of obs = 106 Group variable: id Number of groups = 53 Obs per group: min = 2 avg = 2.0 max = 2 Wald chi2(6) = 84.12 Log likelihood = -435.33077 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ hr | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- sb10 | 0 | 54.66829 35.83739 1.53 0.127 -15.57171 124.9083 15 | 37.3623 23.2042 1.61 0.107 -8.117095 82.84169 | 1.time | -4.075213 2.822213 -1.44 0.149 -9.606648 1.456223 | sb10#time | 0 1 | -36.44387 8.415938 -4.33 0.000 -52.93881 -19.94894 15 1 | -37.57096 7.329471 -5.13 0.000 -51.93646 -23.20546 | ph | 35.28616 20.87117 1.69 0.091 -5.620595 76.19291 _cons | -70.74118 152.6358 -0.46 0.643 -369.9019 228.4196 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ id: Identity | var(_cons) | 80.96055 33.8667 35.66206 183.7979 -----------------------------+------------------------------------------------ var(Residual) | 149.8417 29.23925 102.2196 219.65 ------------------------------------------------------------------------------ LR test vs. linear model: chibar2(01) = 6.85 Prob >= chibar2 = 0.0044 . margins time, over(sb10) Predictive margins Number of obs = 106 Expression : Linear prediction, fixed portion, predict() over : sb10 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- sb10#time | 0 0 | 186.5453 6.270516 29.75 0.000 174.2553 198.8352 0 1 | 146.0262 6.270516 23.29 0.000 133.7362 158.3162 15 0 | 188.8231 5.858661 32.23 0.000 177.3403 200.3059 15 1 | 147.1769 5.858661 25.12 0.000 135.6941 158.6597 179 0 | 187.7299 2.447076 76.72 0.000 182.9337 192.5261 179 1 | 183.6547 2.447076 75.05 0.000 178.8585 188.4509 ------------------------------------------------------------------------------
Code:
. mixed hr ib179.sb10##time c.ph || id:, vce(robust) Performing EM optimization: Performing gradient-based optimization: Iteration 0: log pseudolikelihood = -435.33309 Iteration 1: log pseudolikelihood = -435.33077 Iteration 2: log pseudolikelihood = -435.33077 Computing standard errors: Mixed-effects regression Number of obs = 106 Group variable: id Number of groups = 53 Obs per group: min = 2 avg = 2.0 max = 2 Wald chi2(6) = 37.04 Log pseudolikelihood = -435.33077 Prob > chi2 = 0.0000 (Std. Err. adjusted for 53 clusters in id) ------------------------------------------------------------------------------ | Robust hr | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- sb10 | 0 | 54.66829 44.73779 1.22 0.222 -33.01618 142.3527 15 | 37.3623 27.34913 1.37 0.172 -16.24101 90.9656 | 1.time | -4.075213 1.627908 -2.50 0.012 -7.265855 -.8845707 | sb10#time | 0 1 | -36.44387 11.91491 -3.06 0.002 -59.79666 -13.09109 15 1 | -37.57096 14.48491 -2.59 0.009 -65.96086 -9.181053 | ph | 35.28616 24.87588 1.42 0.156 -13.46967 84.04198 _cons | -70.74118 182.1527 -0.39 0.698 -427.7539 286.2715 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Robust Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ id: Identity | var(_cons) | 80.96055 34.62092 35.01682 187.1846 -----------------------------+------------------------------------------------ var(Residual) | 149.8417 49.85253 78.06149 287.6263 ------------------------------------------------------------------------------ . margins time, over(sb10) Predictive margins Number of obs = 106 Model VCE : Robust Expression : Linear prediction, fixed portion, predict() over : sb10 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- sb10#time | 0 0 | 186.5453 5.986489 31.16 0.000 174.812 198.2786 0 1 | 146.0262 8.348447 17.49 0.000 129.6635 162.3888 15 0 | 188.8231 4.486814 42.08 0.000 180.0291 197.6171 15 1 | 147.1769 12.58497 11.69 0.000 122.5108 171.843 179 0 | 187.7299 2.196496 85.47 0.000 183.4249 192.035 179 1 | 183.6547 2.058484 89.22 0.000 179.6201 187.6893 ------------------------------------------------------------------------------
Comment