Skip to contents

Doubly robust estimators provide a consistent estimate of their target if either the outcome model or censoring model are correctly specified.

Usage

dr_joffe(
  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_joffe_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 formula for the outcome model - passed to glm

outcome_family

A family for the outcome model - passed to glm

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 formula for the censoring model - passed to glm

missing_family

A family for the censoring model - passed to glm

estimand

A character scalar specifying the estimate to compute, such as "difference", "ratio", "oddsratio"

se_method

A character scalar indicating how standard errors and confidence intervals should be calculated: "none" only computes the estimate, the "sandwich" method use asymptotic variance estimates.

alpha

A numeric scalar, indicating the Type I error rate (1 - Confidence Level)

bootstrap_parameters

A list of arguments to be passed to boot for computing the bootstrap.

bootstrap_ci_method

A character vector, indicating the method(s) used for computing confidence intervals. See boot.ci for details.

verbose

A logical scalar: should just the estimate be returned (FALSE), or should a list be returned, containing intermediate results (TRUE)? Defaults to FALSE.

treatment_column

A character scalar containing the name of the treatment assignment variable

missing_column

A character scalar containing the name of the outcome missingness indicator variable

predictors

A character vector containing the name of covariates in either the outcome or censoring models.

Value

A numeric scalar, a data.frame, or a list, depending on the options se_method and verbose.

Examples

# To be added