【发布时间】:2015-11-03 09:08:26
【问题描述】:
使用coord.ellipse(来自FactoMineR 包)和ordiellipse(来自vegan 包)在R 中处理单个因子映射时计算的椭圆之间有什么区别?
下面是一些可重现的代码:
library(FactoMineR)
library(vegan)
data(decathlon)
res.pca = PCA(decathlon[,1:10], scale.unit=TRUE, ncp=5, graph=T)
pcarda <- rda(decathlon[,1:10],scale=T)
来自example here的FactomMineR。
concat = cbind.data.frame(decathlon[,13],res.pca$ind$coord)
ellipse.coord = coord.ellipse(concat,bary=T)
plot.PCA(res.pca,ellipse=ellipse.coord,cex=0.8)
带椭圆形:
ordiplot(pcarda)
ordiellipse(pcarda,groups = decathlon[,13])
这些省略号提供了完全不同的结果...
我想直观地评估这些变量是否可以真正区分我的群体。使用 coord.ellipse 时,椭圆几乎是分开的(接受假设),而使用 ordiellipse 时,它们大多是重叠的(拒绝假设)。
【问题讨论】: