Description Usage Arguments Details Value
Iterate estimation of the 2SLS mortality model over multiple specificiations.
1 | iterate_2sls(DT, grid, max_cores)
|
DT |
a data.table with relevant model/sample option variables. Must have all the "keep" variables in grid, as well as the variables for all the options specified in grid. For example, if outcome = "mort" and outcome_period = 30, DT must have a column named "mort_30". |
grid |
a data.table with estimation options (see below) |
max_cores |
integer, maximum number of parallels cores allowed to run at once |
grid
outcome: character, name of outcome variable, ex: "mort"
outcome_period: integer, period of outcome, ex: 30
x_var: character, name of the endogenous variable
instrument: character, name of instumental variable, ex: "first_mo"
deg: integer, degree polynomial of instrument to include, ex: 2
cut_int: numeric, size of predicted spending bins, ex: 500
pred_type: character, type of spending prediction to use, ex: "ensemble
time_interact: character, name of the time variable to interact with #' instrument and predicted spending, ex: "rfrnc_yr"
initial_days: integer, number of initial_days used in prediction
se_type: character, type of SEs to calculate, inherits from estimatr iv_robust, ex: "stata"
keep_age: boolean, if 1 then subsets sample to only those enrolling at age 65
keep_jan: boolean, if 1 then removes January enrollees from sample
keep_join_month: boolean, if 1 then restricts sample to those enrolling in initial enrollment period (IEP)
keep_same: boolean, if 1 then restricts sample to those enrolling in theor birth month
data.table with the estimation options (from grid), 2SLS estimates, SEs, p-values, CIs, etc...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.