covariate_table: Create Covariate Balance Table

Description Usage Arguments

View source: R/covariate_table.R

Description

Create Covariate Balance Table

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
covariate_table(
  trial,
  selection_covariates,
  data,
  weighted_table = FALSE,
  selection_method = "lr",
  sl_library = NULL,
  survey_weights = FALSE,
  trim_weights = FALSE,
  trim_pctile = 0.97,
  is_data_disjoint = TRUE
)

Arguments

trial

variable name denoting binary trial participation (1 = trial participant, 0 = not trial participant)

selection_covariates

vector of covariate names in data set that predict trial participation

data

data frame comprised of "stacked" trial and target population data

weighted_table

should the output be a weighted table? If TRUE, then weighting

selection_method

method to estimate the probability of trial participation. Default is logistic regression ("lr"). Other methods supported are Random Forests ("rf") and Lasso ("lasso"), passed to weighting

sl_library

vector of SuperLearner library methods. If ‘selection_method' = ’super', specify names of methods to include in library. Default is NULL.

survey_weights

variable name of population data's complex survey weights. Default is FALSE: if FALSE, then population data do not come a complex survey and weights do not need to be incorporated in estimation.

trim_weights

logical. If TRUE, then trim the weights to the value specified in 'trim_pctile'. Default is FALSE.

trim_pctile

numeric. If 'trim_weights' is TRUE, then specify what percentile weights should be trimmed to. Default is 0.97.

is_data_disjoint

logical. If TRUE, then trial and population data are considered independent. This affects calculation of the weights - see details for more information.


benjamin-ackerman/generalizeR documentation built on Oct. 7, 2020, 4:38 a.m.