fitted_values_cv {plasso}R 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.


[Package plasso version 0.1.2 Index]