Closed johnnybonney closed 5 years ago
I have added this as an option to ES()
.
I will add a description of this option to the front page, but the gist is that the argument is never_treat_action
and it takes on values in c('none', 'exclude', 'keep', 'only')
. It is meant to work with the case where, by assumption, units missing onset_time_var
are considered to be never treated.
A bit more detail:
none
-- (default) no action is to be taken, implying that there is no never-treated group. If it turns out that there exist units in long_data
with missing onset_time_var
, using never_treat_action = 'none'
will throw an informative error and ES()
will break.
exclude
-- exclude any observations with missing onset_time_var
.
keep
-- keep units with missing onset_time_var
and include them together with the not-yet treated when forming control groups.
only
-- keep units with missing onset_time_var
and only use them (i.e., exclude the not-yet treated) when forming control groups.
For never_treat_action %in% c('exclude', 'keep', 'only')
, if there are no units with missing onset_time_var
, ES()
will throw an informative error, suggest never_treat_action = 'none'
, and break.
Allow option in
ES()
to use never-treated individuals as a control group.