generalize: Generalize Average Treatment Effect from Randomized Trial to...

Description Usage Arguments Value

View source: R/generalize.R

Description

Generalize Average Treatment Effect from Randomized Trial to Population

Usage

1
2
3
generalize(outcome, treatment, trial, selection_covariates, data,
  method = "weighting", selection_method = "lr",
  is_data_disjoint = TRUE, trim_pop = FALSE, seed)

Arguments

outcome

variable name denoting outcome

treatment

variable name denoting binary treatment assignment (ok if only available in trial, not population)

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

method

method to generalize average treatment effect to the target population. Default is "weighting" (weighting by participation probability). Other methods supported are "BART" (Bayesian Additive Regression Trees - NOT READY YET) and "TMLE" (Targeted Maximum Likelihood Estimation)

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")

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.

trim_pop

logical. If TRUE, then population data are subset to exclude individuals with covariates outside bounds of trial covariates.

seed

numeric. By default, the seed is set to 13783, otherwise can be specified (such as for simulation purposes).

Value

generalize returns an object of the class "generalize"


Generalizer/thegeneralizer documentation built on July 10, 2020, 3:53 p.m.