Wrong PCA results

5 views
Skip to first unread message

Sergio Martínez

unread,
Mar 10, 2021, 7:10:15 AMMar 10
to FactoMineR users
Hi,

I want to report an unexpected behaviour: 

pca.res <- PCA(X1, scale.unit = T, ncp = 10, graph = F)

> mean(pca.res$ind$coord[,3]) 
[1] -38.10683

As you can see, the mean of the pca score is not even close to 0. The mean should be 0 for standardized PCA (scale.unit = T). For now, I cannot send you the data to reproduce this for confidenciality reasons, but I can tell you that it probably has to do with the fact that some of the input variables are constant. The issue was solved when I filtered constant variables.

Perhaps a warning or an error should be raised when constant variables are found in the input matrix, I would have messed downstream analysis if I had not noticed.

Thank you in advance,
Sergio



Reply all
Reply to author
Forward
0 new messages