View source: R/average_effects.R
DML_partial_linear | R Documentation |
This function estimates the parameter of interest in a partially linear model using the residual-on-residual representation of Robinson (1988) and flexibly estimated nuisance parameters following Chernozukov et al. (2018).
DML_partial_linear(
y,
w,
x,
ml_w = list(create_method("forest_grf")),
ml_y = list(create_method("forest_grf")),
cf = 5,
cv = 5,
weights = FALSE,
path = NULL,
quiet = TRUE,
e_hat = NULL,
m_hat = NULL,
cf_mat = NULL
)
y |
Numeric vector containing the outcome variable. |
w |
Treatment vector (binary or continuous). |
x |
Covariate matrix. |
ml_w |
List of methods to be used in ensemble estimation of treatment regression.
Methods can be created by |
ml_y |
List of methods to be used in ensemble estimation of outcome regression.
Methods can be created by |
cf |
Number of cross-fitting folds for DML (default 5). |
cv |
Number of cross-validation folds when estimating ensemble if more than one method is defined
in |
weights |
If TRUE, prediction weights of the outcome nuisance extracted and saved (requires to provide a path). |
path |
Optional path to save the |
quiet |
If FALSE, ensemble estimators print method that is currently running. |
e_hat |
Optional vector of predicted treatment outside of the function. |
m_hat |
Optional vector of predicted outcome outside of the function. |
cf_mat |
Optional prespecified logical matrix with k columns of indicators representing the different folds
(for example created by |
Returns a DML_partial_linear
object:
results |
Point estimate, standard error, t- and p-value of estimated effect. |
e_hat |
Predicted treatment |
m_hat |
Predicted outcomes |
w |
Treatment vector used in estimation. |
y |
Vector of outcomes used in estimation. |
cf_mat |
Matrix with k columns of indicators representing the different folds used in estimation. |
path |
Path where results are stored if specified, otherwise NULL. |
Robinson, P. M. (1988). Root-N-consistent semiparametric regression. Econometrica, 931-954.
Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., & Robins, J. (2018). Double/Debiased machine learning for treatment and structuralparameters.The Econometrics Journal,21(1), C1-C68
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.