rrrbycov: Reduced rank regression using covariance matrices.

Description Usage Arguments Value Examples

View source: R/rrrbycov.R

Description

Reduced rank regression solves the problem of estimating the matrices A and B in the linear model

y = A B' x + ε

where y is a p-vector of response variables, x is a q-vector of regressors and A and B are coefficient matrices with dimensions p x r and q x r, respectively (1 ≤ r ≤ min(p, q)). The function is used internally by the package and so the passed arguments are not checked.

Usage

1
rrrbycov(Syy, Syx, Sxx, r = 1)

Arguments

Syy

variance-covariance matrix of the y vector.

Syx

covariance matrix of y and x.

Sxx

variance-covariance matrix of the x vector.

r

rank of reduced rank regression.

Value

A list with the following slots:

A

Matrix A

B

Matrix B

eigenvalues

Eigenvalues of the first r canonical correlations between y and x.

Examples

1
2
3
4
5
6
7
8
9
S <- matrix(c(
  1.0, 0.2, 0.8, 0.0, 0.9, 0.9,
  0.2, 1.0, 0.0, 0.0, 0.2, 0.2,
  0.8, 0.0, 1.0, 0.2, 0.8, 0.8,
  0.0, 0.0, 0.2, 1.0, 0.1, 0.1,
  0.9, 0.2, 0.8, 0.1, 1.0, 0.8,
  0.9, 0.2, 0.8, 0.1, 0.8, 1.0),
  6,6,byrow=TRUE)
rrrbycov(S[4:6, 4:6], S[4:6, 1:3], S[1:3, 1:3], 1)

matteopelagatti/pathmod documentation built on May 29, 2019, 4:41 a.m.