# NOT RUN {
## generate data
X = aux.gensamples(n=496)
## 1. use centered data
output1 <- do.fa(X,ndim=2)
## 2. use decorrelated data
output2 <- do.fa(X,ndim=2,preprocess="decorrelate")
## 3. use whitened data
output3 <- do.fa(X,ndim=2,preprocess="whiten")
## Visualize three different projections
par(mfrow=c(1,3))
plot(output1$Y[,1],output1$Y[,2],main="centered")
plot(output2$Y[,1],output2$Y[,2],main="decorrelated")
plot(output3$Y[,1],output3$Y[,2],main="whitened")
# }
Run the code above in your browser using DataLab