ordgee(formula = formula(data), ooffset = NULL, id, waves = NULL,
data = parent.frame, subset = NULL, na.action = na.omit,
contrasts = NULL, weights = NULL, z = NULL,
mean.link = "logit", corstr = "independence",
control = geese.control(...), b = NA, alpha = NA,
scale.fix = TRUE, scale.val = 1, int.const = TRUE,
rev = FALSE,...)glm, of the form
response ~ predictors. See the documentation of lm and
formula for details. As for glm, this specifies the linear predictor
for modelling the mean. A term of the form waves should be the same as the
number of observation. components with the same waves value
will have the same link functions.formula, along with the id and n variables.gee only na.omit
should be used here.weights should be the
same as the number of observations."logit", "probit", and "cloglog"."independence", "exchangeable", "unstructured",
and "userdefined".geese.control for their names and default
values. These can also be set as arguments to geese itself."geese" representing the fit.glm, lm, geese.data(respdis)
resp.l <- reshape(respdis, varying =list(c("y1", "y2", "y3", "y4")),
v.names = "resp", direction = "long")
resp.l <- resp.l[order(resp.l$id, resp.l$time),]
fit <- ordgee(ordered(resp) ~ trt, id=id, data=resp.l, int.const=FALSE)
summary(fit)
data(ohio)
ohio$resp <- ordered(as.factor(ohio$resp))
fit <- ordgee(resp ~ age + smoke + age:smoke, id = id, data=ohio)
summary(fit)Run the code above in your browser using DataLab