A utility function to map input data to abstractions useful for estimation.
This procedure makes a single copy of the input data, storing it as a
data.table for internal usage in later methods.
set_est_data(data_obs, baseline, exposure, outcome, segment_by, ids = NULL,
treatment_cost = NULL)
Arguments
| data_obs |
Rectangular input data object, whether a data.frame,
data.table, or tibble. |
| baseline |
A character vector specifying the column names in
data_obs that correspond to the baseline covariates (conditioning
set). These variables should temporally precede the exposure and outcome. |
| exposure |
A character string (of length one) specifying the
column in data_obs corresponding to the exposure or treatment. This
variable should follow those in baseline in time but precede the
response variable outcome. |
| outcome |
A character string (of length one) specifying the
column in data_obs corresponding to the response variable. |
| segment_by |
A character vector specifying the column names in
data_obs that correspond to the covariates over which segmentation
should be performed. This should be a strict subset of baseline. |
| ids |
A character string (of length one) specifying the column
in data_obs that gives observation-level IDs. The default value of
NULL assumes that all rows of data_obs are independent. |
| treatment_cost |
A character string (of length one) specifying the column
in data_obs that gives observation-level treatment cost. The default value of
NULL indicates that this is not a cost constrained
problem or that cost is constant for all units. |