I want to do an oblique PCA using Promax on my data. It looks like many famous packages only handle orthogonal rotations or no rotation at all.
I somehow managed to do it using "Principal" from the "Psych" package:
pca <- principal(DataN[,2:6], nfactors=2, rotate="promax")
I have exactly what I need, 2 components, correlated to each other, with 5 variables. Using biplot(pca)
I got almost exactly the graph I want... except I'd like to color my points based on a categorical variable (Men vs. women).
Basically using ggplot I could go on (DataN, groups = DataN$Gender) and it would automatically color my data depending on the sex.
But here nothing works. I have tried many different things, but promax rotation only seems to be doable using "psych", which is not compatible with ggbiplot etc.
I'm really new to R, and I found no way to do it using the traditional "biplot". Could somebody help ? Thank you very much.
Edit : Well my data goes like this :
Sex numericvar1 numvar2 numvar3 numvar4 numvar5
M 5 7 8 3 2
F 4 4 3 2 5
M 7 5 6 4 3
F 4 6 5 4 3
My code was pretty simple :
library(psych)
biplot(principal(myData,nfactors = 2, rotate = "promax"))