Learn R Programming

sca (version 0.9-0)

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) Rd2Sd cov2cor(V)

Arguments

S
correlation/covariance matrix of the $p$ original variables.
P
component matrix of dimension $p x b$.

Value

a square $b x b$ matrix.

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