I have data set with binary responses. I would like to conduct polychoric principal component analysis (pPCA). I know there are several packages used in PCA but I could not find one that directly estimate pPCA and graph the individuals and variables maps. I will appreciate any help that expand these reproducible scripts. #How to conduct polychoric principal component analysis pPCA using #either of these packages library(psych) library(FactoMineR) library(nsprcomp)
#Bock and Liberman (1970) data set of 1000 observations of the LSAT #from psych data(bock) responses <- table2df(bock.table[,2:6],count=bock.table[,7], labs= paste ("lsat6.",1:5,sep="")) fix(responses) describe(responses) #Estimate the polychoric correlation matrix to be used in #PCA using psych W <- polychoric(responses, smooth=TRUE,global=TRUE,polycor=F, ML = FALSE, std.err=FALSE,progress=TRUE) #Regular PCA using stat, psych and FactoMiner, respectively #There is no option for including the matrix princomp(responses, cor=TRUE) #What kind of correlation is used here? principal(r = responses, nfactors = 3, rotate = "Promax") principal(r = W, nfactors = 3, rotate = "Promax") #Do not work PCA(responses, scale.unit=TRUE, ncp=3, graph=T) #How to conduct polychoric principal component analysis using either of #the above package and producing individual and variable factor maps as #above Peter Maclean Department of Economics UDSM ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.