Hello,

I'm trying to run an exploratory factor analysis with ordinal variables, using the "polychoric" command. I followed the instructions on the UCLA Stata website. My code was as below:

polychoric varlist
display r(sum_w)
global N = r(sum_w)
matrix r = r(R)
factormat r, n($N) factors(3)

When I do this after the last line of code I get the error message "r not positive (semi)definitive," when I run it again I get "matrix r has missing values." Is there a way to get around this issue?
Happy to post data example using dataex if needed.

Thank you,
Nur