rrr {rrpack} | R Documentation |
Multivariate reduced-rank linear regression
Description
Produce solution paths of reduced-rank estimators and adaptive nuclear norm penalized estimators; compute the degrees of freeom of the RRR estimators and select a solution via certain information criterion.
Usage
rrr(
Y,
X,
penaltySVD = c("rank", "ann"),
ic.type = c("GIC", "AIC", "BIC", "BICP", "GCV"),
df.type = c("exact", "naive"),
maxrank = min(dim(Y), dim(X)),
modstr = list(),
control = list()
)
Arguments
Y |
a matrix of response (n by q) |
X |
a matrix of covariate (n by p) |
penaltySVD |
‘rank’: rank-constrainted estimation; ‘ann’: adaptive nuclear norm estimation. |
ic.type |
the information criterion to be used; currently supporting ‘AIC’, ‘BIC’, ‘BICP’, ‘GCV’, and ‘GIC’. |
df.type |
‘exact’: the exact degrees of freedoms based on SURE theory; ‘naive’: the naive degress of freedoms based on counting number of free parameters |
maxrank |
an integer of maximum desired rank. |
modstr |
a list of model parameters controlling the model fitting |
control |
a list of parameters for controlling the fitting process: ‘sv.tol’ controls the tolerence of singular values; ‘qr.tol’ controls the tolerence of QR decomposition for the LS fit |
Details
Model parameters can be specified through argument modstr
. The
available include
gamma: A scalar power parameter of the adaptive weights in
penalty == "ann"
.nlambda: The number of lambda values; no effect if
penalty == "count"
.lambda: A vector of user-specified rank values if
penalty == "count"
or a vector of penalty values ifpenalty == "ann"
.
The available elements for argument control
include
sv.tol: singular value tolerence.
qr.tol: QR decomposition tolerence.
Value
S3 rrr
object, a list consisting of
call |
original function call |
Y |
input matrix of response |
X |
input matrix of covariate |
A |
right singular matri x of the least square fitted matrix |
Ad |
a vector of squared singular values of the least square fitted matrix |
coef.ls |
coefficient estimate from LS |
Spath |
a matrix, each column containing shrinkage factors of the singular values of a solution; the first four objects can be used to recover all reduced-rank solutions |
df.exact |
the exact degrees of freedom |
df.naive |
the naive degrees of freedom |
penaltySVD |
the method of low-rank estimation |
sse |
a vecotr of sum of squard errors |
ic |
a vector of information criterion |
coef |
estimated coefficient matrix |
U |
estimated left singular matrix such that XU/sqrtn is orthogonal |
V |
estimated right singular matrix that is orthogonal |
D |
estimated singular value matrix such that C = UDVt |
rank |
estimated rank |
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 <- with(mydata, rrr(Y, X, maxrank = 10))
summary(rfit)
coef(rfit)
plot(rfit)