Reputation: 29
I have a character matrix for some different plant species, in which most species are missing data for at least a few characters. I want to do a principal components analysis, so I tried to impute the missing values, but when I try to do that I get the error message:
Error in eigen(crossprod(X, X), symmetric = TRUE) : infinite or missing values in 'x'
I thought having missing values was kind of the point! Does anyone know what I'm doing wrong?
Upvotes: 2
Views: 904
Reputation: 1
I have the same issues when I try to impute dataset digits with missing values. One reason that could lead to the above Error is that you have features with 0 standard deviations (because their values are the same). Check this discussion: https://community.rstudio.com/t/problem-with-missmda/90809/7
Upvotes: 0
Reputation: 141
You should use the function imputePCA available in the package missMDA.
For more information: http://factominer.free.fr/missMDA/index.html
Best
Francois
Upvotes: 3