实际上,您已经正确列出了协方差模式模型和 GEE 模型之间的主要区别。我想补充的一件事是,对于 Hedeker 和 Gibbons (2006) 的第 6.2.5 节“随机效应结构”,这两个模型将被描述为特定主题(条件)模型和总体平均(边际)模型分别,尽管两者在线性情况下是一致的。在这里查看我的答案:随机效应、固定效应和边际模型有什么区别?
我想说这两者在数值上是等价的,尽管它们使用不同的估计方法。请参见Stata
下面的示例。请注意,协方差模式模型可以用命令拟合mixed
,但随机效应会被选项抑制noconstant
。当然,我们可以转向REML
而不是ML
获得无偏方差估计。
. webuse pig
. mixed weight week || id:, noconstant
residuals(exchangeable)
Mixed-effects ML regression Number of obs = 432
Group variable: id Number of groups = 48
Obs per group: min = 9
avg = 9.0
max = 9
Wald chi2(1) = 25337.48
Log likelihood = -1014.9268 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
weight | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
week | 6.209896 .0390124 159.18 0.000 6.133433 6.286359
_cons | 19.35561 .5974056 32.40 0.000 18.18472 20.52651
------------------------------------------------------------------------------
. xtset id week
. xtgee weight week, corr(exchangeable)
GEE population-averaged model Number of obs = 432
Group variable: id Number of groups = 48
Link: identity Obs per group: min = 9
Family: Gaussian avg = 9.0
Correlation: exchangeable max = 9
Wald chi2(1) = 25337.48
Scale parameter: 19.20076 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
weight | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
week | 6.209896 .0390124 159.18 0.000 6.133433 6.286359
_cons | 19.35561 .5974055 32.40 0.000 18.18472 20.52651
------------------------------------------------------------------------------
但是在 GEE 中,我们经常使用稳健的(经验性的)标准误,而不是基于模型的标准误。当我们添加选项robust
时,只有标准错误会发生变化。
. xtgee weight week, corr(exchangeable) robust
GEE population-averaged model Number of obs = 432
Group variable: id Number of groups = 48
Link: identity Obs per group: min = 9
Family: Gaussian avg = 9.0
Correlation: exchangeable max = 9
Wald chi2(1) = 4552.32
Scale parameter: 19.20076 Prob > chi2 = 0.0000
(Std. Err. adjusted for clustering on id)
------------------------------------------------------------------------------
| Robust
weight | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
week | 6.209896 .0920382 67.47 0.000 6.029504 6.390287
_cons | 19.35561 .4038676 47.93 0.000 18.56405 20.14718
------------------------------------------------------------------------------