cv.rrr | R Documentation |
Reduced-rank regression with rank selected by cross validation
cv.rrr( Y, X, nfold = 10, maxrank = min(dim(Y), dim(X)), norder = NULL, coefSVD = FALSE )
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 |
a list containing rr estimates from cross validation
Chen, K., Dong, H. and Chan, K.-S. (2013) Reduced rank regression via adaptive nuclear norm penalization. Biometrika, 100, 901–920.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.