Create a Variance Design for a Generalized Estimating Equation Model

DESCRIPTION:

Creates a variance design object with homogeneous, heterogeneous or overdispersed variance structure.

USAGE:

varDesign(type="glm.scale", fixed, scale, weights, levels, group)
 

REQUIRED ARGUMENTS:

type
a character string to specifying variance structure. In GEE modeling, variance structures are usually of the GLM class, which means that the variance is assumed to be a known function of the mean multiplied by a scaling factor. The scaling factor may consist of additive terms involving constant or unknown scale parameters, as well as weights. If type = "glm.1", type = "glm.disp" or type = "glm.scale", no other arguments to varDesign need be specified when terms are unweighted. If type = "glm.hetero", arguments levels and group must also be specified. Options for the type argument are:

"glm.1"
GLM class, scale is exactly 1.
"glm.scale"
GLM class, scale is an unknown scalar (default).
"glm.fixed"
GLM class, a fixed scale.
"glm.disp"
GLM class, scale is 1 plus an overdispersion term.
"glm.mixed"
GLM class, scale is a mixture of two or more weighted known or unknown scale parameters.
In this case a weight variable must be specified in terms argument to varDesign .
Weights are assumed have full column rank over all terms.
"glm.hetero"
GLM class, scale varies between clusters or strata.
The hetero argument to varDesign must be specified.
"poly"
The variance is a polynomial function of the mean with constant or unknown scale parameters. The polynomial must be of degree 3 or less.

OPTIONAL ARGUMENTS:

fixed
(required for type="glm.fixed", type="glm.mixed", type="glm.hetero", type="poly") A logical variable or vector with having a one-to-one correspondence with the variance terms indicating whether or not the scale is fixed.
scale
(required for type="glm.fixed", type="glm.mixed", type="glm.hetero", type="poly") A numeric vector having a one-to-one correspondence with the variance terms giving the fixed value of the scale if the scale is fixed, and otherwise either NA or a default starting value for the scale. If NA is given (no starting value) a moment estimate is computed using the residuals computed from the initial coefficient estimates (typically computed from the S-PLUS function glm).
weights
a vector of character strings having a one-to-one correspondence with the variance terms giving the name of the weight for weighted terms and otherwise NA. A weight is required for each term if type = "glm.mixed". When type = "glm.hetero", only one weight is allowed. The weights argument can be omitted in cases where there are no weights.
levels
(required for type="glm.hetero", not used for other variance types) A vector of character strings having a one-to-one correspondence with the variance terms giving the associated level of the grouping variable.
group
(required for type="glm.hetero", not used for other variance types) A character string giving the name of a factor variable that serves as an indicator for heterogeneous groups.

VALUE:

an object of class "varDesign" is returned. See varDesign.object for details.

DETAILS:

The output of varDesign is used mainly for the variance argument in geeDesign. It checks for consistency of the other arguments with type , creates a data frame describing the variance terms, and gives a formula for the variance model.
For type = "poly", there must be a row for terms order 0 up to the degree of the polynomial even if they vanish in the polynomial formula. Vanishing terms are specified by setting fixed = T and scale = 0.
When weights or a grouping variable are specified, the variables named in those arguments must be either in the search path or in the data associated when used in a call to geeDesign.
It is recommended that users review varDesign objects before using them in calls to geeDesign.

SEE ALSO:

, .

EXAMPLES:

varDesign(type="glm.1")

varDesign(type="glm.scale")

varDesign(type="glm.fixed", fixed = T, scale = .5)

varDesign(type="glm.mixed", fixed = c(F,F,T), scale = c(1,1,1), 
  weights = c("u","v","w"))

varDesign(type="poly", fixed = c(F,F,F,F), scale = c(1,1,1,1))

varDesign(type="poly", fixed = c(T,T,T,F), scale = c(0,1,0,-2), 
  weights = c(NA, "x", NA, "z"))

varDesign(type="glm.hetero", fixed = c(T,F,F), scale = c(1,1,1),
  levels = c("alpha", "beta", "gamma"), group = "x", weights = "w")