BookmarkSubscribeRSS Feed
janex
Calcite | Level 5

There are two raters to code a text differently as in annotatepic.pdf. The output are the test1.txt and test2.txt. 

The two raters may annotate different strings of text and may use different taggers (the code scheme is the same, but can choose different levels and different sub-tags). These tags are shown in the first line.

I want to use Cohen's kappa to calculate the reliability of the two raters. I'm new to SAS, and I need the help urgently. I highly appreciate if anybody could help me with it. 

8 REPLIES 8
janex
Calcite | Level 5

I read articles about the calculation of k, but I don't know how to deal with the data, how should I transform the data into a suitable one for cohen's kappa so as to compare the tokens of two different texts (two different raters)

Norman21
Lapis Lazuli | Level 10

Welcome to the SAS Community!

 

You mind find the answer to your question in this document:

 

https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/180-30.pdf

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

janex
Calcite | Level 5

Thank you ^^ 

I read this article, but the question is I don't know how should I transform my data into an approapriate form to do that.

Norman21
Lapis Lazuli | Level 10

I'm not sure how to interpret the test text, but it looks like you have to assign the data to each variable. However, the variable names will need to be changed. For example, "in/security" is not a valid SAS variable name; you might want to change this to "in_security". Here are a couple of examples of what needs to be done:

 

https://documentation.sas.com/?docsetId=lestmtsref&docsetTarget=p0114gachtut3nn1and4ap8ke9nf.htm&doc...

 

FYI, I managed to find the meeting from where the transcription was made:

 

https://www.c-span.org/video/?327062-2/president-obama-remarks-2015-white-house-conference-

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

janex
Calcite | Level 5
Subcorp_FilenameIDStartEndTextCommentRoleParentIDdoc_completenessappraisalengagementgraduationattitudejudgementaffectappreciationauthorial_evaluationnon_authorial_evaluationdis_satisfactionun_happinessin_securitydis_inclinationantipathy_affectionmisery_cheerennui_interestdis_pleasuredis_quietdis_trusttenacitycapacitynormalityunclearveracityproprietycompositionsocial_valuationreactionqualityimpactbalancecomplexityinscribedinvokedambiguouspositive_attitudenegative_attitudemono_glossichetero_glossicexpandcontractproclaimdisclaimdenycounterpronouncejustifyendorseconcurconcedeaffirmentertainattributedistanceacknowledgeforcefocusintensificationquantificationdegreevigourextentnumbermassdistributionproximityspacetimedistrib_spacedistrib_timedownscaleupscaleinfusingisolatingsoftensharpen
Textstest1.txt1566576challenges    1001001000000000000000000010000010001000000000000000000000000000000000000000
Textstest2.txt2317327privileged    1001010101000000100000000000000010010000000000000000000000000000000000000000
Textstest2.txt1566576challenges    1001001000000000000000000001010010001000000000000000000000000000000000000000

 

I've chosen a couple of sentences online for example. Now I've read them into a sas data as shown in the above. It seems I need to transform the table into another form according to the previous pdf, right? In this case, the test1 is coderA and the test2 is the coderB.

janex
Calcite | Level 5

I just ran through all the steps and codes in https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/180-30.pdf . I kind of knew what it is now. The most important thing is to transform my data into the correct form for the calculation of kappa.

Norman21
Lapis Lazuli | Level 10

You might find PROC TRANSPOSE useful for this task:

 

https://support.sas.com/resources/papers/proceedings09/060-2009.pdf

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

janex
Calcite | Level 5

Thank you very much ^^ 

NZ got locked down again. I might try it next week.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 1153 views
  • 0 likes
  • 2 in conversation