ggbiplot

PCA Scaling with ggbiplot

妖精的绣舞 提交于 2019-11-27 01:41:38
问题 I'm trying to plot a principal component analysis using prcomp and ggbiplot . I'm getting data values outside of the unit circle, and haven't been able to rescale the data prior to calling prcomp in such a way that I can constrain the data to the unit circle. data(wine) require(ggbiplot) wine.pca=prcomp(wine[,1:3],scale.=TRUE) ggbiplot(wine.pca,obs.scale = 1, var.scale=1,groups=wine.class,ellipse=TRUE,circle=TRUE) I tried scaling by subtracting mean and dividing by standard deviation before