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