On Jan 11, 2015, at 1:59 PM, David Winsemius <dwinsemius at comcast.net> wrote:
On Jan 11, 2015, at 3:55 AM, ??? wrote:
Hi,
I tried to run "principal" function in the 'psych' package, but it failed
to do..
here is both my code and error message.
I searched on the web, but couldn't find the exact answer I wanted.
airpca<-principal(data,nfactors=33,rotate="none")
Error in solve.default(model, r) :
system is computationally singular: reciprocal condition number =
7.05776e-17
In addition: Warning messages:
1: In cor.smooth(model) :
Matrix was not positive definite, smoothing was done
2: In cor.smooth(r) : Matrix was not positive definite, smoothing was done
Looks like your data is highly correlated in some of those columns:
[1] 0.0 19.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
[25] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
[1] 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[1] 0 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[42] 0 0 0
[1] 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[42] 0 0 0
I'd retry after removing the problem columns.
Thank you for your help.
[[alternative HTML version deleted]]