geeDesign
that represents the design of a generalized estimation equation model.
geeDesign(formula, cluster, variance, correlation="independent", random=NULL, ...)
cluster argument for the
gee function.
varDesign
object to specify a variance structure.
For constant variance, variance with weights, heterogeneous
within-cluster variances or overdispersion, enter a
varDesign object.
See the
variance argument
for the
gee function for
simple and common options, and
the
varDesign function for more
complicated options.
corDesign object
to specify correlation structures.
Character string or list options are
the same as those described in the
correlation
argument for the
gee function
for a single-layer correlation structure.
To specify a fixed correlation design or
multi-layer correlation structures in nested designs or unbalanced
block designs, enter a
corDesign object.
For details see the
corDesign help file.
ranDesign specifying
the random effects component of a mixed model.
A mixed model is only permited for the
binomial family
with the
logit and
probit links,
the
poisson family with the
log
link, and the
gaussian family with
the
identity link.
See the documentation for
ranDesign
for details on specifying the random component of a mixed model.
gee function.
For details see the
gee help file.
"geeDesign" is returned.
See
geeDesign.object for details.
glm function.
This
geeDesign is an extension of
gee
function to allow
experienced users to specify more complicated GEE models, including
heterogeneous variance and correlation and mixed models.
All arguments allowed in
gee
are supported in
geeDesign as well.
In order to use
geeDesign, users
must to be familiar with
gee,
varDesign
and
corDesign
.
The output of a
geeDesign is intended mainly
to be used in a call to
gee.fit.
Seizure.Subject <- recordDesign("Subject",data.frame(Seizure,
offset=rep(log(c(8,2,2,2,2)),59)))
gee.out <- geeDesign(y~group+offset(offset),
cluster=cbind(clusterID,recordID),variance="glm.scale",
data=Seizure.Subject, correlation="exchangeable",
family=poisson,link=log,control=geeControl(trace = T),
subset=Subject!=49,contrasts=list(group=contr.treatment))
## Review the design before calling the fitting algorithm.
print(gee.out)
gee.fit(gee.out)
Seizure1.Subject <- data.frame(Seizure.Subject,post=rep(c(0,1,1,1,1),59))
gee.out <- geeDesign(y~-1+group*post+offset(offset),
cluster=cbind(clusterID,recordID),variance="glm.scale",
family="poisson", link="log",data=Seizure1.Subject,
correlation=list(type="AR",x.layer="Time"), subset=Subject!=49)
gee.fit(gee.out)
SpruceGrpd.Subject <- recordDesign("Subject",na.omit(SpruceGrpd))
gee.out <- geeDesign(y~Time+group, cluster=cbind(clusterID,recordID),
variance=0.02, family=Gamma, link="power(1.5)",
correlation=list(type="contAR", x.layer="Time"),
data=SpruceGrpd.Subject,contrasts=list(group=contr.treatment))
gee.fit(gee.out)