Description Usage Arguments Value
View source: R/fit_first_stage_elasticity.R
Prep data for first stage estimation by subsettig based on binary "keep" variables and defining "high_risk" if requested
1 | prep_fs_elasticity_data(DT, keep_vars, cont_risk_var = NULL, n_quant = 5)
|
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. |
subsetted data.table with new variables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.