Skip to content
Prev 268913 / 398502 Next

prcomp

On Aug 17, 2011, at 5:47 PM, David Winsemius wrote:

            
After looking further at the prcomp defaults I see that na.action  
defaults to na.omit so it may not be the missing data, but rather  
collinearity. Do these plotting and descriptive steps to see that your  
data is extremely clustered:

matplot(dat[,-(1:2)] )
  pairs(dat[-(1:2)])
summary(dat[-(1:2)])

So the effort to invert the data matrix is probably failing due to the  
application of inappropriate data reduction to variables which, though  
nominally numeric, are really categorical, and fairly strangely  
distributed ones at that. Also not this advice in ?prcomp:

"Note that scale = TRUE cannot be used if there are zero or constant  
(for center = TRUE) variables." I cpunt four variables that violate  
that restriction. But removing scale=T still does not fix the problem.