Hi everyone
I was recently looking for a method to impute missing data, and found missMDA.
I've read the paper and the code provided works as a charm.
I've also performed the same exact code on one of my datasets and it also works.
The dataset I'm currently using throws some errors, however.
The first I get is : Error in eigen(crossprod(X, X), symmetric = TRUE) : infinite or missing values in 'x'
I should really read up about the math behind PCA, but since there's a column consisting of only 0 and NA I assume the method doesn't work on such columns.
I assume this because, when I perform na.omit on my data (there's some columns left consisting of 0 only) and run the prcomp function it throws a similar error:
Error in prcomp.default(frame_pca, scale = T, center = T) : cannot rescale a constant/zero column to unit variance
So when removing that column and running ncpPCA again, I get the error:
Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : length of 'dimnames' [2] not equal to array extent
Googling the error I stumble upon a lot of problems involving matrix operations, and mainly people trying to perform operations with unequal matrices etc.
So why does this pop up here? I've seen a couple of these posts in this group already, but I know I haven't got any columns that represent the rownames or ids or anything, and I checked that all my data is numeric.
I don't know how I can copy an example, but I would rather like to know what this error means, than have a direct solution, although that is also very helpful ofcourse!
Thanks!