rrr.fit: Fitting reduced-rank regression with a specific rank

View source: R/rrr.R

rrr.fitR Documentation

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 documentation built on June 16, 2022, 9:05 a.m.

Related to rrr.fit in rrpack...