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.
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()
)
a matrix of response (n by q)
a matrix of covariate (n by p)
`rank': rank-constrainted estimation; `ann': adaptive nuclear norm estimation.
the information criterion to be used; currently supporting `AIC', `BIC', `BICP', `GCV', and `GIC'.
`exact': the exact degrees of freedoms based on SURE theory; `naive': the naive degress of freedoms based on counting number of free parameters
an integer of maximum desired rank.
a list of model parameters controlling the model fitting
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
S3 rrr
object, a list consisting of
original function call
input matrix of response
input matrix of covariate
right singular matri x of the least square fitted matrix
a vector of squared singular values of the least square fitted matrix
coefficient estimate from LS
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
the exact degrees of freedom
the naive degrees of freedom
the method of low-rank estimation
a vecotr of sum of squard errors
a vector of information criterion
estimated coefficient matrix
estimated left singular matrix such that XU/sqrtn is orthogonal
estimated right singular matrix that is orthogonal
estimated singular value matrix such that C = UDVt
estimated rank
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 if penalty ==
"ann"
.
The available elements for argument control
include
sv.tol: singular value tolerence.
qr.tol: QR decomposition tolerence.
Chen, K., Dong, H. and Chan, K.-S. (2013) Reduced rank regression via adaptive nuclear norm penalization. Biometrika, 100, 901--920.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab