getMeaningfulPCs {Morpho} | R Documentation |
get number of meaningful Principal components
Description
get number of meaningful Principal components
Usage
getMeaningfulPCs(values, n, expect = 2, sdev = FALSE)
Arguments
values |
eigenvalues from a PCA |
n |
sample size |
expect |
expectation value for chi-square distribution of df=2 |
sdev |
logical: if TRUE, it is assumed that the values are square roots of eigenvalues. |
Details
This implements the method suggested by Bookstein (2014, pp. 324), to determine whether a PC is entitled to interpretation. I.e. a PC is regarded meaningful (its direction) if the ratio of this PC and its successor is above a threshold based on a log-likelihood ratio (and dependend on sample size).
Value
tol |
threshold of ratio specific for |
good |
integer vector specifying the meaningful Principal Components |
References
Bookstein, F. L. Measuring and reasoning: numerical inference in the sciences. Cambridge University Press, 2014
See Also
Examples
data(boneData)
proc <- procSym(boneLM)
getMeaningfulPCs(proc$eigenvalues,n=nrow(proc$PCscores))
## the first 3 PCs are reported as meaningful
## show barplot that seem to fit the bill
barplot(proc$eigenvalues)
[Package Morpho version 2.12 Index]