Entering edit mode
2.3 years ago
Kumar
▴
170
I am trying to run logisticPCA in R on my binary data. I tried the following method (prcomp) for PCA. Please suggest a code how to use logisticPCA instead.
dd_pca_full <- read.csv("final.csv", sep=",")
dd.pca.full <- prcomp(dd_pca_full[c(2:20251)],
center = TRUE)
dd.pca.full.plot <- autoplot(dd.pca.full,
data = dd_pca_full,
colour = 'country')
Example:
code ppc aga dmsC hyaA mgtB
AL2 1 1 1 1 1
AL2 0 1 1 0 1
AL2 1 1 1 1 1
AL3 1 1 0 1 1
AL3 0 0 1 1 1
AL3 1 1 1 1 1
AL3 1 1 1 1 1