0

I want to do a factor analysis for a data frame (41x32) from a questionary. Each variable can go from 1 to 5. I had missing data defined as "NA". The cortest.bartlett and the KMO test can't work with any missing data. Following a YoutTube tutorial, I removed all rows (participants) with missing data with Udata_c <- Udata[complete cases[Udata],], which left me with Udata_c dimensions of 32 x 32.

The Bertlett test I could pass with this data frame. But the MSA of the KMO was only 0.12. I tried the KMO Test again with Udata fata frame in which I turned all NAs into 0s. This time the MSA reached 0.45. This wasn't sufficient either as I need at least 0.5 for the MSA to reach the conditions for the factor analysis (Also I've read that turning NAs onto 0s is falsifying data). But since it is very close to 0.5 I feel the need to test the KMO again, without turning NAs into 0s and without eliminating incomplete rows. I've heard of practices of using the mean which is also problematic depending on the test. Does anyone know of a way I can test the KMO while keeping the NAs or replacing them with something fitting?

I've also been sent a link to the lslx package. With this I should be able to run a factor analysis with missing data. Now this lslx solution is only for the factor analysis itself. What I still need is to do a KMO with missing data unless the lslx solution automatically tells me if the conditions for a factor analysis are met in the same way the KMO does. Has anyone lslx experience and knows if it is possible to test the KMO with it?

Many thanks for reading.

  • 1
    If you are asking for analysis advice, you should ask instead at [stats.se]. Stack Overflow is for specific programming questions. It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jul 28 '23 at 20:00

0 Answers0