BookmarkSubscribeRSS Feed

Hey guys;

I am planning on using the SAS mAGREE macro to calculate Kappa statistics for four raters and four categories. However, the mAGREE macro only accepts one variable for the rater identities and one variable for the ratings.

Ex. %mAGREE (data=<input dataset> items=<subject identifier variable> raters=<rater identifier variable> response=<ratings variable>)

In my data set, my raters' identities are represented by each of four variables' names and the ratings are the values for that variable. For example:

Observation           Rater 1          Rater 2          Rater 3          Rater 4

1                         1                    1                    2               2

2                         3                    2                    2               3

3                         4                    2                    3               4

4                         2                    1                    3               2

.

.

.

So my question is, how do I set it up so that the ratings provided by each rater for each observation is included in one variable's values (or more simply, how do I collapse the ratings from each of the four raters into one response variable)? Thanks.

6 REPLIES 6
art297
Opal | Level 21

Sounds like the following might be a better choice: http://www2.sas.com/proceedings/sugi30/155-30.pdf

Hi, thanks for replying. Unfortunately, I tried using that macro and had trouble running it as well. I thought the macro provided by SAS may have been easier...

Ksharp
Super User

Not sure. If it could work:

array x{*}  Rater 1          Rater 2          Rater 3          Rater 4 ;

do i=1 to dim(x);

rater=vname(x{i});

ratings=x{i};

output;

end;

art297
Opal | Level 21

Here is one more paper you might want to look at: http://analytics.ncsu.edu/sesug/2012/PO-05.pdf

They show a data layout, and macros, for calculating a Kappa for 4 raters with each subject having a number of observations.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 6 replies
  • 4318 views
  • 6 likes
  • 3 in conversation