Announcement

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

  • item-rest correlation using Spearman?

    Hi, I'm wondering if there is a way to get item-rest correlation, as you get from the command

    alpha item1-10, item

    but using spearman? I'm assuming alpha uses pearson?

    Do I need to do it manually?

    Thanks

  • #2
    Since the Spearman correlation is just a Pearson correlation of the ranks of the variables, you could calculate the rank-scores of the variables and then run -alpha- on those.

    Comment


    • #3
      Thanks Clyde, sorry don't quite understand, what would be the code to do that?

      Comment


      • #4
        Code:
        forval j = 1/10 {
             egen rank`j' = rank(item`j')
        }
        
        alpha rank*, item
        This code assumes that you have item1 item2 ... item10 and no existing variable rank. or whose name starts with rank. If that is wrong, use different variable names.

        The syntax

        Code:
        alpha item1-10, item
        looks illegal to me, while something like

        Code:
        alpha item1-item10, item

        may be what you really used.

        Comment


        • #5
          Awesome thank you!

          Comment

          Working...
          X