Announcement

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

  • Two indices share the same variable

    I have two indices, A and B, and they share a variable, age.
    Is there any way that I can determine the positive correlation of A with B has nothing to do with the age variable in Stata.

    Thank you.

  • #2
    Sounds like you want the partial correlation of A and B, partialing out age. -help pcorr-

    Code:
    pcorr A B age

    Comment


    • #3
      Is there difference between Pearson and Spearman when I use the 'pcorr' command?
      I couldn't find it in the reference manual.

      Thank you very much.

      Comment


      • #4
        pcorr gives a Pearson-type correlation. If you want a Spearman-type analogue, I think you need to rank your variables first and feed the ranks to pcorr. Bets are off on whether that is a really useful thing to do.

        Comment

        Working...
        X