Design a Generalized Estimation Equation Model

DESCRIPTION:

Returns an object of class geeDesign that represents the design of a generalized estimation equation model.

USAGE:

geeDesign(formula, cluster, variance, correlation="independent", random=NULL, ...) 

REQUIRED ARGUMENTS:

formula
a formula object, with the response on the left of a ~ operator, and the terms, separated by + operators, on the right.
cluster
a matrix or a vector of integers to identify cluster and record id's. See the description of the cluster argument for the gee function.
variance
a character string, a numeric value or a 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.

OPTIONAL ARGUMENTS:

correlation
a character string, a list or a 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.
random
an object of class 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.
...
additional arguments, which also correspond to arguments for the gee function. For details see the gee help file.

VALUE:

An object of class "geeDesign" is returned. See geeDesign.object for details.

SIDE EFFECTS:

Offsets must be specified in the model formula, as in the glm function.

DETAILS:

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.

SEE ALSO:

, , , , , , , .

EXAMPLES:

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)