Description Usage Arguments Value
View source: R/subset_sample.R
Subset to analystic sample
1 2 3 4 5 6 7 | subset_sample(
DT,
subset_vars,
progress = F,
balance_vars = NULL,
inst = "first_mo"
)
|
DT |
a data.table |
subset_vars |
variables to subset |
progress |
logical, if TRUE prints where in subsetting process the function is |
balance_vars |
string character, if non-NULL, then estimates balance |
inst |
chatacter, name of instrument to check balance on |
a list with three elements
DT_subset |
Subsetted data.table |
obs |
data.table with observations at each subsetting step |
dt_bal |
data.table with first stage on balance variables at each subset |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.