cv.rrr {rrpack} | R Documentation |
Reduced-rank regression with rank selected by cross validation
Description
Reduced-rank regression with rank selected by cross validation
Usage
cv.rrr(
Y,
X,
nfold = 10,
maxrank = min(dim(Y), dim(X)),
norder = NULL,
coefSVD = FALSE
)
Arguments
Y |
response matrix |
X |
covariate matrix |
nfold |
number of folds |
maxrank |
maximum rank allowed |
norder |
for constructing the folds |
coefSVD |
If TRUE, svd of the coefficient is retuned |
Value
a list containing rr estimates from cross validation
References
Chen, K., Dong, H. and Chan, K.-S. (2013) Reduced rank regression via adaptive nuclear norm penalization. Biometrika, 100, 901–920.
Examples
library(rrpack)
p <- 50; q <- 50; n <- 100; nrank <- 3
mydata <- rrr.sim1(n, p, q, nrank, s2n = 1, sigma = NULL,
rho_X = 0.5, rho_E = 0.3)
rfit_cv <- with(mydata, cv.rrr(Y, X, nfold = 10, maxrank = 10))
summary(rfit_cv)
coef(rfit_cv)
[Package rrpack version 0.1-13 Index]