Announcement

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

  • Inter-rater reliability

    Hello,

    I have 50 survey questions: q1 - q50
    I would like to perform inter-rater reliability between two raters for each of these questions using
    Code:
     kap varname1 varname2 if in weight , options Weights
    The problem I am facing now is that I need to reshape the data first because the data recorded the observations like the below.
    ID Q1 Q2 Q3
    11 1 1 1 patient1 recorded by rater1
    12 1 1 2 patient1 recorded by rater2
    21 1 1 2 patient2 recorded by rater 1
    22 1 1 1 patient 2 recorded by rater1



    Could you please advise me how I can reshape this data to the format (question number.rater number) so that I can perform the test
    Code:
     kap q1.1 q1.2
    ID Q1.1 Q1.2 Q2.1 Q2.2 Q3.1 Q3.2
    1 1 1 1 1 1 2
    2 1 1 1 1 2 1


    Or is there any way that I can test inter-reliability test without reshaping?


    Thank you so much for your comments.
    I really appreciate your help.
    Last edited by jykim; 28 Aug 2017, 11:03.

  • #2
    You need to show us an excerpt of your real data. Is the ID a string or numeric variable? For reshaping you need one variable that identifies the subjects and one that identifies the raters. How to create such a variable depends on the details of your data.

    Best
    Daniel

    Comment


    • #3
      Thank you so much for your feedback.

      Here is the excerpt.
      I just reduced the variables up to 5 variables. but there are 50 variables (questions).

      ​​​​​​
      uniquerecordnumber record rater q1_colonoscopy q2_antibiotics q3_admission date q4_infection q5_status
      11 1 1 Yes Yes 19-Jan-16 Yes Stable
      12 1 2 Yes Yes 19-Jan-16 Yes Stable
      21 2 1 Yes Yes 15-Feb-16 Yes Stable
      22 2 2 Yes Yes 15-Feb-16 Yes Stable
      31 3 1 Yes Yes 1-Mar-16 Yes Stable
      32 3 2 Yes Yes 1-Mar-16 No Stable
      Thank you so much for your help Daniel!
      Last edited by jykim; 28 Aug 2017, 13:24.

      Comment


      • #4
        Better to use dataex (from SSC, also see the Statalist FAQs) for posting example data. Anyway, you want

        Code:
        drop uniquerecordnumber
        unab vars : q*
        reshape wide `vars' , i(record) j(rater)
        If your variables are strings (which would have been obvious had you used dataex) you want to encode them before calculating inter-rater agreement.

        Also see kappaetc (SSC) for alternative measures to the kappa coefficient.

        Best
        Daniel

        Comment


        • #5
          Thank you so much, Daniel.
          I will use dataex in the future.

          Comment

          Working...
          X