Learn R Programming

plasso (version 0.1.3)

fitted_values_cv: 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)

Value

Fitted values in the prediction sample.

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