Learn R Programming

sca (version 0.9-2)

corcomp: Covariance and Correlation Matrix of Components P on S

Description

covcomp returns the variance-covariance matrix of the components P on S, and corcomp returns the correlation matrix.

Usage

corcomp(S, P)
covcomp(S, P)
cov2cor(V)

Value

a square \(b \times b\) matrix.

Arguments

S

correlation/covariance matrix of the \(p\) original variables.

P

component matrix of dimension \(p \times b\).

V

symmetric numeric matrix, usually positive definite such as a covariance matrix.

Author

Valentin Rousson rousson@ifspm.unizh.ch and Martin Maechler maechler@stat.math.ethz.ch.

See Also

sca, also for references

Examples

Run this code
data(USJudgeRatings)
S.jr <- cor(USJudgeRatings)
sca.jr <- sca(S.jr, b=4, inter=FALSE)
Vr <- covcomp(S.jr, P = sca.jr$simplemat)
Vr
Cr <- corcomp(S.jr, P = sca.jr$simplemat)
Cr

Run the code above in your browser using DataLab