fitted_values_cv: Fitted values for a subset of active variables

fitted_values_cvR Documentation

Fitted values for a subset of active variables

Description

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.

Usage

fitted_values_cv(XtX_all, Xty_all, x_pred, nm_act)

Arguments

XtX_all

Cross product of all covariates

Xty_all

Cross product 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.


plasso documentation built on May 29, 2024, 6:46 a.m.