For cross-validation, compute MSE for different ranks of the coefficient Bhat and lambda.
Usage
MSE_lambda_rank(Bhat_comp_1L, X, Y, nrank)
Arguments
- Bhat_comp_1L
A list containing components of Bhat.
- X
A numeric matrix of explanatory variables.
- Y
A numeric matrix of response variables.
- nrank
A numeric vector indicating the rank(s) of Bhat.
Value
A numeric vector of MSE values for each rank.