varDesign(type="glm.scale", fixed, scale, weights, levels, group)
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:
weight
variable
must be specified in
terms
argument to
varDesign
.
hetero
argument to
varDesign
must be specified.
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.
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
).
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.
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.
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.
"varDesign"
is returned.
See
varDesign.object
for 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
.
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")