#PCAMIX:
data(wine)
X.quanti <- wine[,c(3:29)]
X.quali <- wine[,c(1,2)]
pca<-PCAmix(X.quanti,X.quali,ndim=4, graph=FALSE)
#Scores on dim 1-2
plot(pca,choice="ind",quali=wine[,1],
posleg="bottomleft",main="Scores")
#Scores on dim 2-3
plot(pca,choice="ind",axes=c(2,3),quali=wine[,1],
posleg="bottomleft",main="Scores")
#Other graphics
plot(pca,choice="var",main="Squared loadings")
plot(pca,choice="categ",main="Categories")
plot(pca,choice="cor",xlim=c(-1.5,2.5),
main="Correlation circle")
rot<-PCArot(pca,3,graph=FALSE)
plot(rot,choice="ind", main="Rotated scores",label=FALSE)
plot(rot,choice="var",main="Squared loadings after rotation")
plot(rot,choice="categ",main="Categories after rotation")
plot(rot,choice="cor",main="Correlation circle after rotation")
#PCA:
data(decathlon)
quali<-decathlon[,13]
pca<-PCAmix(decathlon[,1:10], graph=FALSE)
plot(pca,choice="ind",quali=quali,stand=TRUE,cex=0.8,
posleg="topright",main="Standardized scores")
plot(pca, choice="cor", stand=TRUE,main="Correlation circle")
Run the code above in your browser using DataLab