fitted_values_cv extracts the active set from \(X^TX\) and
\(X^Ty\) to get out-of-sample predictions
for a matrix already containing only the active variables.
The function is only relevant for cases where at least one variable is selected.
fitted_values_cv(XtX_all, Xty_all, x_pred, nm_act)Fitted values in the prediction sample.
Cross product of all covariates
Cross product of covariates and outcome
Covariates matrix of the prediction sample
Names of active variables