Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Factor analysis

    Dear all,

    I am running a factor analysis where all my variables are ordinal variables.

    I determined the matrix of polychoric correlations and then I did the factor analysis.

    I obtained the following error:

    "r not positive (semi)definite"

    I forced the matrix to be positive semidefinite but I still getting the same error.

    Follows the command I am using:

    Code:
    polychoric Q1 Q2 Q3 Q4 Q5
    
    display r(sum_w)
    
    253
    
    global N = r(sum_w)
    
    matrix r = r(R)
    
    factormat r, n(253) pcf blanks(0.3) forcepsd(1)


    Thanks in advance!

  • #2
    I think you need to show us the exact code you ran and the exact output copy/pasted from the Results window or your log file. What you are saying does not seem possible.

    The -forcepsd- option does not take any arguments, so that (1) in your -factormat- command is illegal syntax. You should be getting an error message that tells you "option forcepsd() not allowed," not another message about "r not positive (semi)definite."

    Once you correct that command, it should run. You might get a warning message that the original correlation matrix was not positive semidefinite, and perhaps saying that it has been modified to make it so, but you should still get results from that.

    Comment


    • #3
      Dear Schechter,

      Many thanks.

      I fixed the problem, now it is working properly.

      Comment


      • #4
        Originally posted by Liza View Post
        Dear Schechter,

        Many thanks.

        I fixed the problem, now it is working properly.
        Hi Liza:
        Because I am facing the same issue, I am about to use the forcepsd option. In your response to Dr. Schechter, you do not mention how you fixed your problem. Did you do it as Dr. Schechter advised, i.e., by removing (1) after the forcepsd option? Or did you use another method.
        Thanks and regards.
        ND.

        Comment

        Working...
        X