I have a matrix with 267 columns, all rows of which have at least one
column missing (NA).
All three methods i've tried (pcs, princomp, and prcomp) fail with either
"Error in svd(zsmall) : infinite or missing values in 'x'" (latter two)
"Error in cov.wt(z) : 'x' must contain finite values only"
The last one happens because of the check
Q: is there a way to do princomp or another method where every row has at
least one missing column?
I guess if missing values are thrown out, that leaves me with a zero row
I could find the maximal set of columns such that there exists a subset of
rows with non NA values for every column in the set - what is an efficient
way to do that?
> Q: is there a way to do princomp or another method where every row has at
> least one missing column?
You have several options. Try function nipals in packages ade4 and plspm. Also look at package pcaMethods (on Bioconductor), where you will find a full range of options for carrying out principal component analysis using matrices with missing values.
Mark Difford (Ph.D.)
Nelson Mandela Metropolitan University
Port Elizabeth, South Africa