stdGee {stdReg} | R Documentation |
Regression standardization in conditional generalized estimating equations
Description
stdGee
performs regression standardization in linear and log-linear
fixed effects models, at specified values of the exposure, over the sample
covariate distribution. Let ,
, and
be the outcome,
the exposure, and a vector of covariates, respectively. It is assumed that data
are clustered with a cluster indicator
.
stdGee
uses
fitted fixed effects model, with cluster-specific intercept
(see
details
), to estimate the standardized mean
, where
is a specific value of
,
and the outer expectation is over the marginal distribution of
.
Usage
stdGee(fit, data, X, x, clusterid, subsetnew)
Arguments
fit |
an object of class |
data |
a data frame containing the variables in the model. This should be the same
data frame as was used to fit the model in |
X |
a string containing the name of the exposure variable |
x |
an optional vector containing the specific values of |
clusterid |
an mandatory string containing the name of a cluster identification variable. Must be identical to the clusterid variable used in the gee call. |
subsetnew |
an optional logical statement specifying a subset of observations to be used in the standardization. This set is assumed to be a subset of the subset (if any) that was used to fit the regression model. |
Details
stdGee
assumes that a fixed effects model
has been fitted. The link function is assumed to be the identity link
or the log link. The conditional generalized estimating equation (CGGE)
estimate of
is used to obtain estimates of the cluster-specific
means:
where
if is the identity link, and
if is the log link, and
is the value of
for subject
in cluster
,
,
. The CGEE estimate of
and the estimate of
are used to estimate the mean
:
For each in the
x
argument, these estimates are averaged across
all subjects (i.e. all observed values of and all estimated values of
) to produce estimates
where . The variance for
is
obtained by the sandwich formula.
Value
An object of class "stdGee"
is a list containing
call |
the matched call. |
input |
|
est |
a vector with length equal to |
vcov |
a square matrix with |
Note
The variance calculation performed by stdGee
does not condition on
the observed covariates . To see how this
matters, note that
The usual parameter in a generalized linear model does not depend
on
. Thus,
is
independent of
as well (since
),
so that the term
in the corresponding
variance decomposition for
becomes equal to 0. However,
depends on
through the average over the sample
distribution for
, and thus the term
is not 0, unless one conditions on
.
Author(s)
Arvid Sjolander.
References
Goetgeluk S. and Vansteelandt S. (2008). Conditional generalized estimating equations for the analysis of clustered and longitudinal data. Biometrics 64(3), 772-780.
Martin R.S. (2017). Estimation of average marginal effects in multiplicative unobserved effects panel models. Economics Letters 160, 16-19.
Sjolander A. (2019). Estimation of marginal causal effects in the presence of confounding by cluster. Biostatistics doi: 10.1093/biostatistics/kxz054
Examples
require(drgee)
n <- 1000
ni <- 2
id <- rep(1:n, each=ni)
ai <- rep(rnorm(n), each=ni)
Z <- rnorm(n*ni)
X <- rnorm(n*ni, mean=ai+Z)
Y <- rnorm(n*ni, mean=ai+X+Z+0.1*X^2)
dd <- data.frame(id, Z, X, Y)
fit <- gee(formula=Y~X+Z+I(X^2), data=dd, clusterid="id", link="identity",
cond=TRUE)
fit.std <- stdGee(fit=fit, data=dd, X="X", x=seq(-3,3,0.5), clusterid="id")
print(summary(fit.std, contrast="difference", reference=2))
plot(fit.std)