prepare_data: One-stop function for data preparation

Description Usage Arguments Value

View source: R/01_prepare_data.R

Description

Takes a data_frame and

Usage

1
2
prepare_data(data, formula1, formula2, family, ps_prefix1, ps_prefix2,
  df_trim_thres, A_name, levels)

Arguments

data

data_frame

formula1

PS model formula for the entire cohort estimation.

formula2

PS model formula for the trimmed cohort estimation.

family

PS model family

ps_prefix1

PS variable prefix for the entire cohort estimation

ps_prefix2

PS variable prefix for the trimmed cohort estimation

df_trim_thres

data_frame with columns trim_method_name and thres to indicate

A_name

Treatment indicator name in data.

levels

Character vector holding three elements corresponding to levels in A

ps0_name

Name of the column in data for the PS for the first level.

ps1_name

Name of the column in data for the PS for the second level.

ps2_name

Name of the column in data for the PS for the third level.

Value

nested data_frame containing


kaz-yos/trim3 documentation built on May 3, 2019, 7:40 p.m.