Learn R Programming

wgeesel (version 1.5)

drgee: Fit Doubly Robust Weighted Generalized Estimating Equations

Description

Analyzes longitudinal data with doubly robust augmented GEE approach.

Usage

drgee(model,outcomemodel, data, id, family, corstr, scale = NULL, 
       mismodel = NULL, nameTRT, maxit=200, tol=0.001)

Arguments

model

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

outcomemodel

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the ouctome model

data

a data frame containing the variables in the model.

id

a vector which identifies the clusters. The length of "id" should be the same as the number of observations. Data are assumed to be sorted so that observations on a cluster are contiguous rows for all entities in the formula.

family

a description of the error distribution and link function to be used in the model. This is a character string naming a family function. The following are permitted: "gaussian", "binomial", "poisson".

corstr

a character string specifies the working correlation structure. The following are permitted: "independence", "exchangeable", "ar1","unstructured".

nameTRT

name of the variable containing information for the treatment

scale

a numeric variable giving the value to which the scale parameter should be fixed; if NA, the scale parameter is not fixed.

mismodel

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the missingness model to be fitted.

maxit

maximum iteration number for Newton-Raphson algorithm.

tol

the tolorance for the Newton-Raphson algorithm to converge.

Value

An object of type 'CRTgeeDR'

Details

Analyzes longitudinal data with doubly robust augmented GEE approach.

References

Augmented GEE for improving efficiency and validity of estimation in cluster randomized trials by leveraging cluster-and individual-level covariates -2012-Stephens A., Tchetgen Tchetgen E. and De Gruttola V. : Stat Med 31(10)-915-930.

See Also

https://cran.r-project.org/web/packages/CRTgeeDR/index.html

Examples

Run this code
# NOT RUN {
data(imps)
fit <- drgee(IMPS79 ~ Drug+Sex+Time, IMPS79 ~ Drug+Sex+Time,
      data=imps, id=imps$ID, family="gaussian",nameTRT="Drug",
       corstr="exchangeable", scale=NULL, mismodel= R ~ Drug+Time)
# }

Run the code above in your browser using DataLab