Hi!
I have binary outcome data clustered in individuals and want to use the xtgee command to adjust for correlated residuals within individuals.
I have however problems understanding how using cluster-robust standard errors (in xtgee vce(robust)) and specifying the working correlation matrix in xtgee relate to each other.
According to Stata help:
1. I am wondering if there is any use of specifying a within-group correlation structure (the default is exchangeable) if vce(robust) produces "valid standard errors even if the correlations within group are not as hypothesized by the specified correlation structure"?
2. I am also wondering, what Stata does if an independent correlation structure is specified together with vce (robust). Does Stata just "ignore" my specification and allow for within-group correlation anyway?
3. Also, is there any reason why someone would want to run a gee with independent working correlation structure? In my understanding, gee is used to adjust for within-group correlation structure, so if one thinks that within-group residuals are uncorrelated (=independent), on could just use OLS?
4. And lastly, couldn't - instead of xtgee - a glm with vce(cluster clustvar) be used? In my data, glm with vce(cluster clusterid) and gee with vce(robust) and independent working correlation structure yield exactly the same coefficients. Do both models in this case just estimate a within-group correlation?
Thank you!
I have binary outcome data clustered in individuals and want to use the xtgee command to adjust for correlated residuals within individuals.
I have however problems understanding how using cluster-robust standard errors (in xtgee vce(robust)) and specifying the working correlation matrix in xtgee relate to each other.
According to Stata help:
vce(robust) specifies that the Huber/White/sandwich estimator of
variance is to be used in place of the default conventional variance
estimator (see Methods and formulas in [XT] xtgee). Use of this
option causes xtgee to produce valid standard errors even if the
correlations within group are not as hypothesized by the specified
correlation structure. Under a noncanonical link, it does, however,
require that the model correctly specifies the mean. The resulting
standard errors are thus labeled "semirobust" instead of "robust" in
this case. Although there is no vce(cluster clustvar) option,
results are as if this option were included and you specified
clustering on the panel variable.
variance is to be used in place of the default conventional variance
estimator (see Methods and formulas in [XT] xtgee). Use of this
option causes xtgee to produce valid standard errors even if the
correlations within group are not as hypothesized by the specified
correlation structure. Under a noncanonical link, it does, however,
require that the model correctly specifies the mean. The resulting
standard errors are thus labeled "semirobust" instead of "robust" in
this case. Although there is no vce(cluster clustvar) option,
results are as if this option were included and you specified
clustering on the panel variable.
2. I am also wondering, what Stata does if an independent correlation structure is specified together with vce (robust). Does Stata just "ignore" my specification and allow for within-group correlation anyway?
3. Also, is there any reason why someone would want to run a gee with independent working correlation structure? In my understanding, gee is used to adjust for within-group correlation structure, so if one thinks that within-group residuals are uncorrelated (=independent), on could just use OLS?
4. And lastly, couldn't - instead of xtgee - a glm with vce(cluster clustvar) be used? In my data, glm with vce(cluster clusterid) and gee with vce(robust) and independent working correlation structure yield exactly the same coefficients. Do both models in this case just estimate a within-group correlation?
vce(cluster clustvar ) specifies that the standard errors allow for
intragroup correlation, relaxing the usual requirement that the
observations be independent. That is to say, the observations are
independent across groups (clusters) but not necessarily within
groups . clustvar specifies to which group each observation belongs,
for examples, vce (cluster personid) in data with repeated
observations on individuals. vce (cluster clustvar ) affects the
standard errors and variance-covariance matrix of the estimators but
not the estimated coefficients; see [U] 20.22 Obtaining robust
variance estimates.
intragroup correlation, relaxing the usual requirement that the
observations be independent. That is to say, the observations are
independent across groups (clusters) but not necessarily within
groups . clustvar specifies to which group each observation belongs,
for examples, vce (cluster personid) in data with repeated
observations on individuals. vce (cluster clustvar ) affects the
standard errors and variance-covariance matrix of the estimators but
not the estimated coefficients; see [U] 20.22 Obtaining robust
variance estimates.
Comment