Standardizes input column names to id, age, D,
female, and Y; coerces types; validates basic conditions; and
returns a keyed data.table ready for the estimators.
Usage
prep_data_table(
data,
Y_name = "Y",
age_name = "age",
D_name = "D",
id_name = "id",
female_name = "female"
)Arguments
- data
A
data.frameordata.table.- Y_name
Character. Column in
dataholding the outcome. Default"Y".- age_name
Character. Column holding age. Default
"age".- D_name
Character. Column holding the treatment group (e.g., age-at-treatment). Will be renamed to
D. Default"D".- id_name
Character. Column holding the cluster identifier. Default
"id".- female_name
Character. Column holding the binary female indicator (1=female). Default
"female".
