Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PCdist

correlation between a reduced space and the original space


Description

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

Usage

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

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

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.