Build a validated dp object from raw user inputs
Usage
make_did_dp(
data = NULL,
y,
d,
post,
covariates = NULL,
dim_covariates = NULL,
continuous = NULL,
unordered = NULL,
ordered = NULL,
na_action = c("fail", "omit"),
validate = TRUE
)Arguments
- data
Optional data frame or matrix containing the analysis variables.
- y
Outcome vector, or a single column name/index when
datais supplied.- d
Binary treatment indicator, or a single column name/index when
datais supplied.- post
Binary post-period indicator, or a single column name/index when
datais supplied.- covariates
Optional preassembled covariate matrix. If omitted, the covariates are built from
datausing the block selectors below.- dim_covariates
Optional length-3 dimension vector. This must be supplied when
covariatesis already assembled and the block selectors are not used.- continuous
Character or integer vector identifying continuous covariates in
dataor incovariates.- unordered
Character or integer vector identifying unordered discrete covariates in
dataor incovariates.- ordered
Character or integer vector identifying ordered discrete covariates in
dataor incovariates.- na_action
How to handle missing values in the variables used to build
dp."fail"stops, and"omit"drops incomplete rows.- validate
Logical; if
TRUE, validate the output withvalidate_did_dp().