Hello,
I am trying to perform a PCA on a basic set of 30 configurations, 3
specimens each with 10 configurations of landmarks. I was wondering why I
am getting different PCA results between plotTangentSpace() and prcomp().
When I perform plotTangentSpace(), it gives me a comprehensive list of 30
PCs and their importance (PC1 and PC2 make up 99% of the variance). But
when I perform the prcomp() (which is the function most recommended in the
literature), the summary says PC1 explains 100% of the variance, and
because of this I cannot perform the screeplot() or plot().
Am I missing something? I have copied my coding below. Any help would be
much appreciated.
lpALL.super <- gpagen(lpALL, Proj=TRUE, ProcD=TRUE, PrinAxes=TRUE,
ShowPlot=TRUE, curves=NULL, surfaces=NULL)
lpALL.shape <- lpALL.super$coords
lpALL.size <- lpALL.super$Csize
names(lpALL.super)
plotTangentSpace(lpALL.shape, axis1=1, axis2=2, warpgrids=TRUE, mesh=NULL,
label=TRUE, verbose=TRUE) <- PC1 and PC2 99%
max(lpALL.shape[ ,1, ]); min(lpALL.shape[ ,1, ]); max(lpALL.shape[ ,2, ]);
min(lpALL.shape[ ,2, ])
plot(lpALL.shape[ ,1,1:10], lpALL.shape[ ,2,1:10], asp=1, pch=21, bg="red",
xlab="x", ylab="y", cex=.8, xlim=c(-0.295,0.252), ylim=c(-0.234,0.224))
points(lpALL.shape[ ,1,11:20], lpALL.shape[ ,2,11:20], asp=1, pch=21,
bg="blue", cex=.8)
points(lpALL.shape[ ,1,21:30], lpALL.shape[ ,2,21:30], asp=1, pch=21,
bg="green", cex=.8)
legend('bottomright', legend=c("CochaC", "CochaD", "DorbrA"), fill=c("red",
"blue", "green"), cex=1)
lpALLPC <- prcomp(lpALL.shape, center=TRUE, scale=TRUE)
names(lpALLPC)
lpALLPC$x
lpALLPC$sdev
lpALLPC$rotation
summary(lpALLPC, scale=TRUE) <- PC1 100%
require(vegan)
screeplot(lpALLPC, npcs=15, type="lines", bstick=TRUE)
plot(lpALLPC$x[ ,1:2], asp=1, pch=21, cex=2.5, bg="black") <- subscript [
1:2] out of bounds
--
MORPHMET may be accessed via its webpage at http://www.morphometrics.org
---
You received this message because you are subscribed to the Google Groups
"MORPHMET" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].