
Double machine learning for the partially linear model
Source:R/caus_native.R
morie_caus_dml_partial_lin.RdY = theta D + g(X) + eps, D = m(X) + nu, estimated by
theta = (Dtilde'Dtilde)^-1 Dtilde'Ytilde with both residuals
CROSS-FITTED: each observation's nuisance prediction comes from a
model fitted without it.
Value
list: theta, se, ci, y_residual, d_residual, theta_in_sample, cross_fitted, n_folds, first_stage_r2, n, p, method.
Details
Two ingredients, neither optional. Residualising BOTH Y and D
on X makes the score Neyman-orthogonal, so first-order errors in
the nuisance estimates do not contaminate theta; residualising
only Y and regressing on raw D is not orthogonal and the bias
returns. And cross-fitting removes a regularisation bias that
otherwise does not vanish at root-n. theta_in_sample is computed
alongside precisely so the gap is visible.