drgeeData extracts the model
variables and matrices from a data.frame or an environment
object. It also performs some data cleaning and error checking.drgeeData(outcome, exposure,
oformula, eformula, iaformula = formula(~1),
olink = c("identity", "log", "logit"),
elink = c("identity", "log", "logit"),
data, estimation.method = c("dr", "o", "e"),
cond = FALSE, clusterid)data argument. If it is not found in the data
argument, it will be searched for in the calling frame. If missing,
the outcome is assumed to bdata argument. If it is not found in the data
argument, it will be searched for in the calling frame. If missing,
the outcome is assumed to "identity", "log" or
"logit". Default is "identity"."identity", "log" or
"logit". Default is "identity". When
olink="logit" this is replaced byiaformula,
oformula and eformula. If missing, variables are
expected to be found in the calling frame."o" for O-estimation,
"e" for E-estimation or
"dr" for DR-estimation. Default is "dr".cond=TRUE the design matrices
for the nuisance models do not have an intercept. Requires a
clusterid argument.data argument. If it is not found in the data
argument, it will be searched for in the calling frame. If missing,
each observdrgee.data returns an object of class drgeeData
containingiaformula.
This matrix will always contain a column with 1's.a and
each column in x.y and each
column in x.TRUE, the is no column for the intercept in
v and z. Outcome concordant will also be removed.terms object corresponding to the outcome
nuisance model.terms object corresponding to the exposure
nuisance model.drgeeData is called by drgee and gee to extract
data from a data.frame or environment
object. The data can then be used to for O-estimation, E-estimation or
DR-estimation. drgeeData uses
model.frame and model.matrix to remove incomplete
observations and to convert factors to dummy variables. It also
performs check the supplied data for errors or inconsistencies. The class method summary.drgeeData produces strings for the
formulas with terms referring to the columns in the produced design
matrices.
drgee, gee, model.frame and model.matrix.