PCdist: correlation between a reduced space and the original space

Description Usage Arguments Value Author(s) Examples

View source: R/PCdist.r

Description

Calculates the correlation between distances in a reduced space and the original space

Usage

1
PCdist(PCs, PCscores, x = 5, plot.type = "b")

Arguments

PCs

m x k matrix of Principal Components where m is the k is the number of PCs.

PCscores

n x m matrix of Principal Component scores where n is the number of observations.

x

integer: increment for every x-th PC the subspace to fullspace correlation will be calculated.

plot.type

"b"=barplot of correlation values, "s"=line between correlation values.

Value

a vector of R-squared values between subspace and fullspace distances and a barplot depicting the correlations belonging to the subspace.

Author(s)

Stefan Schlager

Examples

1
2
3
4
if (require(shapes)) {
a <- procSym(gorf.dat)
PCdist(a$PCs, a$PCscores, x = 2)
}

Morpho documentation built on Sept. 9, 2021, 9:07 a.m.