Announcement

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

  • spearman matrix in factorial analysis

    Dear friends

    How can I perform a factorial analysis using the spearman matrix in stata? Thanks

  • #2
    See the help for -spearman- and -factormat-. The -spearman- command puts the spearman coefficient matrix into the return list as r(Rho), which can directly be fed to -factormat-. Note that r(Rho) and r(rho) are different things. You want the former. For example:
    Code:
    sysuse auto
    spearman price-foreign
    return list // not necess, but shows you what is available
    factormat r(Rho), n(74)
    However, I'm not sure that spearman coefficients are the best choice, depending on why you choose to use them.

    Comment


    • #3
      Originally posted by Mike Lacy View Post
      See the help for -spearman- and -factormat-. The -spearman- command puts the spearman coefficient matrix into the return list as r(Rho), which can directly be fed to -factormat-. Note that r(Rho) and r(rho) are different things. You want the former. For example:
      Code:
      sysuse auto
      spearman price-foreign
      return list // not necess, but shows you what is available
      factormat r(Rho), n(74)
      However, I'm not sure that spearman coefficients are the best choice, depending on why you choose to use them.
      Thank you a lot. Your answer solved my problem. The analysis is for an archaeological research and I am comparing the results between spearman matrix and pearson matrix in factorial analysis. Thank you a lot.

      Comment


      • #4
        It is known, though not well as well as it should be, that the Spearman correlation is the same as the Pearson correlation calculated on the two variables converted to ranks (presuming no ties.) That might or might not make it interesting in your situation.

        Anyway, sometimes I see people choosing Spearman because the variable is ordinal, for which there are better alternatives.

        Comment


        • #5
          The restriction "presuming no ties" is not really a restriction. Stata's spearman command calculates ranks using egen rank's default according to which tied values get the same rank and the sum of the ranks is preserved (so 12, 13, 13, 14, 14, 14, ... would be assigned ranks 1, 2.5, 2.5, 4, 4, 4, ...) This iis precisely the method usually explained in explanations of Spearman correlation (I say "usually" because I can't think of an exception).

          I think ties only bite hard if you're relying on the sampling distribution for P-values. That could be badly off with many, many ties. You can still look at a scatter plot with some means of showing multiple values as such or use some other method to get at P-values.

          Comment

          Working...
          X