Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rrr.fit

Fitting reduced-rank regression with a specific rank


Description

Given a response matrix and a covariate matrix, this function fits reduced rank regression for a specified rank. It reduces to singular value decomposition if the covariate matrix is the identity matrix.

Usage

rrr.fit(Y, X, nrank = 1, weight = NULL, coefSVD = FALSE)

Arguments

Y

a matrix of response (n by q)

X

a matrix of covariate (n by p)

nrank

an integer specifying the desired rank

weight

a square matrix of weight (q by q); The default is the identity matrix

coefSVD

logical indicating the need for SVD for the coeffient matrix in the output; used in ssvd estimation

Value

S3 rrr object, a list consisting of

coef

coefficient of rrr

coef.ls

coefficient of least square

fitted

fitted value of rrr

fitted.ls

fitted value of least square

A

right singular matrix

Ad

a vector of sigular values

rank

rank of the fitted rrr

Examples

Y <- matrix(rnorm(400), 100, 4)
X <- matrix(rnorm(800), 100, 8)
rfit <- rrr.fit(Y, X, nrank = 2)
coef(rfit)

rrpack

Reduced-Rank Regression

v0.1-11
GPL (>= 3)
Authors
Kun Chen [aut, cre] (<https://orcid.org/0000-0003-3579-5467>), Wenjie Wang [ctb] (<https://orcid.org/0000-0003-0363-3180>), Jun Yan [ctb] (<https://orcid.org/0000-0003-4401-7296>)
Initial release
2019-11-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.