doubleml.utils.DoubleMLBLP#
- class doubleml.utils.DoubleMLBLP(orth_signal, basis, is_gate=False)#
Best linear predictor (BLP) for DoubleML with orthogonal signals. Manily used for CATE and GATE estimation for IRM models.
- Parameters:
orth_signal (
numpy.array
) – The orthogonal signal to be predicted. Has to be of shape(n_obs,)
, wheren_obs
is the number of observations.basis (
pandas.DataFrame
) – The basis for estimating the best linear predictor. Has to have the shape(n_obs, d)
, wheren_obs
is the number of observations andd
is the number of predictors.is_gate (bool) – Indicates whether the basis is constructed for GATEs (dummy-basis). Default is
False
.
Methods
confint
([basis, joint, level, n_rep_boot])Confidence intervals for the BLP model.
fit
()Estimate DoubleMLBLP models.
Attributes
basis
Basis.
blp_model
Best-Linear-Predictor model.
blp_omega
Covariance matrix.
orth_signal
Orthogonal signal.
summary
A summary for the best linear predictor effect after calling
fit()
.
- DoubleMLBLP.confint(basis=None, joint=False, level=0.95, n_rep_boot=500)#
Confidence intervals for the BLP model.
- Parameters:
basis (
pandas.DataFrame
) – The basis for constructing the confidence interval. Has to have the same form as the basis from the construction. IfNone
is passed, if the basis is constructed for GATEs, the GATEs are returned. Else, the confidence intervals for the basis coefficients are returned (with pointwise cofidence intervals). Default isNone
.joint (bool) – Indicates whether joint confidence intervals are computed. Default is
False
.level (float) – The confidence level. Default is
0.95
.n_rep_boot (int) – The number of bootstrap repetitions (only relevant for joint confidence intervals). Default is
500
.
- Returns:
df_ci – A data frame with the confidence interval(s).
- Return type:
pd.DataFrame