prep_fs_elasticity_data: Prep Data

Description Usage Arguments Value

View source: R/fit_first_stage_elasticity.R

Description

Prep data for first stage estimation by subsettig based on binary "keep" variables and defining "high_risk" if requested

Usage

1
prep_fs_elasticity_data(DT, keep_vars, cont_risk_var = NULL, n_quant = 5)

Arguments

DT

a data.table

keep_vars

character vector, column names for the binary keep variables

cont_risk_var

character (default = NULL), name of the continuous predicted risk variable

n_quant

integer (default = 5), number of quntiles to break predicted risk in to. High risk is defined as being in the top quantile.

Value

subsetted data.table with new variables


evanjflack/cfo.behavioral documentation built on Oct. 10, 2020, 11:52 p.m.