R/double_ml_data.R
double_ml_data_from_matrix.Rd
Initalization of DoubleMLData from matrix()
objects.
double_ml_data_from_matrix(
X = NULL,
y,
d,
z = NULL,
cluster_vars = NULL,
data_class = "DoubleMLData",
use_other_treat_as_covariate = TRUE
)
(matrix()
)
Matrix of covariates.
(numeric()
)
Vector of outcome variable.
(matrix()
)
Matrix of treatment variables.
(matrix()
)
Matrix of instruments.
(matrix()
)
Matrix of cluster variables.
(character(1)
)
Class of returned object. By default, an object of class DoubleMLData
is
returned. Setting data_class = "data.table"
returns an object of class
data.table
.
(logical(1)
)
Indicates whether in the multiple-treatment case the other treatment
variables should be added as covariates. Default is TRUE
.
Creates a new instance of class DoubleMLData
.
matrix_list = make_plr_CCDDHNR2018(return_type = "matrix")
obj_dml_data = double_ml_data_from_matrix(
X = matrix_list$X,
y = matrix_list$y,
d = matrix_list$d)