Doubly Robust Estimation Using Joffe's Doubly Robust Weighted Least Squares (DR-WLS) Estimator
Source:R/dr_wls.R
dr_wls.RdDoubly robust estimators provide a consistent estimate of their target if either the outcome model or censoring model are correctly specified.
Usage
dr_wls(
data,
outcome_formula,
outcome_family,
treatment_formula,
missing_formula,
missing_family = quasibinomial,
estimand = c("difference", "ratio", "oddsratio")[1],
se_method = c("none", "bootstrap")[1],
alpha = 0.05,
bootstrap_parameters = bootstrap_parameters(),
bootstrap_ci_method = "bca",
verbose = FALSE
)
dr_wls_fit(
data,
outcome_formula,
outcome_family,
treatment_column,
missing_formula,
missing_family = quasibinomial,
missing_column,
predictors,
estimand = c("difference", "ratio", "oddsratio")[1],
verbose = FALSE
)Arguments
- data
A
data.frame- outcome_formula
A
formulafor the outcome model - passed toglm- outcome_family
A
familyfor the outcome model - passed toglm- treatment_formula
A
formula: the left-hand side should be a binary variable indicating assignment to treatment, and the right-hand side should be an intercept (e.g.tx ~ 1)- missing_formula
A
formulafor the censoring model - passed toglm- missing_family
A
familyfor the censoring model - passed toglm- estimand
A
characterscalar specifying the estimate to compute, such as"difference","ratio","oddsratio"- se_method
A
characterscalar indicating how standard errors and confidence intervals should be calculated: "none" only computes the estimate, the "sandwich" method use asymptotic variance estimates.- alpha
A
numericscalar, indicating the Type I error rate (1 - Confidence Level)- bootstrap_parameters
A
listof arguments to be passed tobootfor computing the bootstrap.- bootstrap_ci_method
A
charactervector, indicating the method(s) used for computing confidence intervals. Seeboot.cifor details.- verbose
A
logicalscalar: should just the estimate be returned (FALSE), or should alistbe returned, containing intermediate results (TRUE)? Defaults toFALSE.- treatment_column
A
characterscalar containing the name of the treatment assignment variable- missing_column
A
characterscalar containing the name of the outcome missingness indicator variable- predictors
A
charactervector containing the name of covariates in either the outcome or censoring models.