fitted_values: This helper function extracts a subset of active variables...

fitted_valuesR Documentation

This helper function extracts a subset of active variables (nm_act) of the relavant variables from X'X and X'y to get out-of-sample predictions for a matrix containing only the active variables This speeds up the cross-validation for post-Lasso to a large extent

Description

This helper function extracts a subset of active variables (nm_act) of the relavant variables from X'X and X'y to get out-of-sample predictions for a matrix containing only the active variables This speeds up the cross-validation for post-Lasso to a large extent

Usage

fitted_values(XtX_all, Xty_all, x_pred, nm_act)

Arguments

XtX_all

Crossproduct of all covariates

Xty_all

Crossproduct of covariates and outcome

x_pred

Covariates matrix of the PREDICTION sample

nm_act

names of active variables

Value

Fitted values in the prediction sample


MCKnaus/causalDML documentation built on Aug. 19, 2023, 5:47 p.m.