On Fri, 2009-08-07 at 19:07 -0700, Arup wrote: > Hi I am trying to run Factor Analysis using R...I am using the syntax > factanal(m1, factors=3) but it's giving me an message Error in cov.wt(z) : > 'x' must contain finite values only > ...I am using a data set which is having only numeric variables and have > some NA's also in it..What should I do next..Someone please help me out with > the syntax..Thanks in advance
NA's are *not* finite, we don't know what value they are. Read ?factanal If you specify the model with a formula, you can use the 'na.action' argument to tell it what to do with missing values. Something like, factanal(~ ., data = m1, factors = 3, na.action = na.omit) or do this yourself with factanal(na.omit(m1), factors = 3) HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.