1.2. doubleml.data.DoubleMLClusterData#
- class doubleml.data.DoubleMLClusterData(data, y_col, d_cols, cluster_cols, x_cols=None, z_cols=None, t_col=None, s_col=None, use_other_treat_as_covariate=True, force_all_x_finite=True)#
Backwards compatibility wrapper for DoubleMLData with cluster_cols. This class is deprecated and will be removed in a future version. Use DoubleMLData with cluster_cols instead.
Methods
from_arrays(x, y, d, cluster_vars[, z, t, ...])Initialize
DoubleMLClusterDatafromnumpy.ndarray's.set_x_d(treatment_var)Function that assigns the role for the treatment variables in the multiple-treatment case.
Attributes
all_variablesAll variables available in the dataset.
binary_outcomeLogical indicating whether the outcome variable is binary with values 0 and 1.
binary_treatsSeries with logical(s) indicating whether the treatment variable(s) are binary with values 0 and 1.
cluster_colsThe cluster variable(s).
cluster_varsArray of cluster variable(s).
dArray of treatment variable; Dynamic! Depends on the currently set treatment variable; To get an array of all treatment variables (independent of the currently set treatment variable) call
obj.data[obj.d_cols].values.d_colsThe treatment variable(s).
dataThe data.
force_all_d_finiteIndicates whether to raise an error on infinite values and / or missings in the treatment variables
d.force_all_x_finiteIndicates whether to raise an error on infinite values and / or missings in the covariates
x.is_cluster_dataFlag indicating whether this data object is being used for cluster data.
n_cluster_varsThe number of cluster variables.
n_coefsThe number of coefficients to be estimated.
n_instrThe number of instruments.
n_obsThe number of observations.
n_treatThe number of treatment variables.
use_other_treat_as_covariateIndicates whether in the multiple-treatment case the other treatment variables should be added as covariates.
xArray of covariates; Dynamic! May depend on the currently set treatment variable; To get an array of all covariates (independent of the currently set treatment variable) call
obj.data[obj.x_cols].values.x_colsThe covariates.
yArray of outcome variable.
y_colThe outcome variable.
zArray of instrumental variables.
z_colsThe instrumental variable(s).
- classmethod DoubleMLClusterData.from_arrays(x, y, d, cluster_vars, z=None, t=None, s=None, use_other_treat_as_covariate=True, force_all_x_finite=True)#
Initialize
DoubleMLClusterDatafromnumpy.ndarray’s. This method is deprecated and will be removed with version 0.12.0, use DoubleMLData.from_arrays with cluster_vars instead.