ordinalrct: Create RCT Ordinal Metadata

Description Usage Arguments Value Examples

View source: R/estimator.R

Description

Compute metadata to be used for estimation of model-robust covariate adjusted average log odds ratio, Mann-Whitney statistic, and counterfactual marginal CDF and PMF in a two-arm randomized controlled trial using targeted maximum likelihood estimation.

Usage

1
2
3
4
5
6
7
ordinalrct(
  outcome.formula,
  trt.formula,
  data,
  algo = c("glm", "lasso", "rf", "xgboost"),
  crossfit = TRUE
)

Arguments

outcome.formula

An object of class "formula". The left hand side should be the outcome variable. The right hand side should contain the target variable of interest and baseline prognostic covariates.

trt.formula

An object of class "formula". The left hand side should be the name of the binary (coded as 0 and 1) treatment variable. The right hand side should specify the names of variables used to estimate the propensity.

data

A data frame containing the variables in the model.

algo

Method to be used for fitting nuisance parameters. Automatically set to "glm" if less than two covariates for adjustment are specified in formula.

crossfit

Should the estimator be crossfit? Ignored if algo is "glm" or "lasso"

Value

An R6 object of class "Ordinal".

Examples

1
ordinalrct(state_ordinal ~ A + age, A ~ 1, data = c19.ordinal)

nt-williams/survrct documentation built on July 29, 2021, 7:46 a.m.