intracc.sas -- calculate reliabilities from Intraclass correlations

This SAS macro (written by R. Hamer) calculates the six intraclass correlations discussed in Shrout, P.E., and Fleiss, J.L "Intraclass correlations: uses in assessing rater reliability," Psychological Bulletin, 1979, 86, 420-428.

Additionally it calculates two intraclass correlations using formulae from Winer, B.J. Statistical Principles in Experimental Design, which are identical to two of the six from Shrout and Fleiss. Additionally it calculates the reliability of the mean of nrater ratings where nrater is a parameter of the macro, using the Spearmen-Brown prophecy formula, so that one can examine the effect obtaining more raters would have on the reliability of a mean.

Notation used in calculating the three correlations via the Winer formulae is taken from Winer while notation used in calculating the six correlations using the Shrout and Fleiss formulae is taken from Shrout and Fleiss. That means that in some cases I used two differently named variables to hold the same thing so I could use a variable with the same name as the reference when calculating a correlation taken from that reference. In Shrout and Fleiss notation, these six correlations and their uses are as follows:

ICC(1,1):
used when each subject is rated by multiple raters, raters assumed to be randomly assigned to subjects, all subjects have the same number of raters.
ICC(2,1):
used when all subjects are rated by the same raters who are assumed to be a random subset of all possible raters.
ICC(3,1):
used when all subjects are rated by the same raters who are assumed to be the entire population of raters.
ICC(1,k):
Same assumptions as ICC(1,1) but reliability for the mean of k ratings.
ICC(2,k):
Same assumptions as ICC(2,1) but reliability for the mean of k ratings.
ICC(3,k):
Same assumptions as ICC(3,1) but reliability for the mean of k ratings. Assumes additionally no subject by judges interaction.

Usage:

The INTRACC macro is available on the phoenix, and Arts servers (Hebb lab) To use the program, include a %intracc( .... ) statement in your SAS program.

The macro arguments are as follows, where required arguments are shown like this.

   %intracc(data=_LAST_,target=,rater=,
            depvar=,nrater=0,out=_DATA_,print=1);
where,
data=
SAS dataset containing data. Default is _LAST_.
target=
variable indexing the experimental units, often subjects or persons, each of whom is rated several times.
rater=
variable indexing judge, or whatever is producing multiple ratings for each subject.
depvar=
dependent variable list, or list of variables for which each target was rated by each rater.
nrater=
For use in Spearman-Brown Prophecy formula to estimate the reliability of the mean of nrater ratings, where nrater is different than the number of raters actually used in the data. Default is 0, which omits this computation.
out=
Name of output data set to contain the statistics. Default is _DATA_.
print=
0 for no printout, 1 to print the intraclass correlations and related statistics, 2 to print the summary statistics from GLM as well, 3 to print all the GLM results as well. Default is 1.
If there are n targets and k ratings for each target, each target- rating occupies one observation, or in other words, there are n*k observations in the dataset. The macro uses GLM to break the total variability into that due to between targets, between judges, and residual. For the formulae which assume a one-way design, the SS and DF for between judges and residual are added to give simply a within-targets SS.

This macro assumes that all targets are rated by judges numbered with the same judge numbers, even if they are not the same judges. In other words, each subject is rated by k judges, labeled, say, 1,2,...,k, even if they are not the same judges for each subject. That is so GLM can break out a between judges SS.

Example:

 data ratings;
   do product=1 to 5;
     do judge=1 to 3;
       input rating @@;
       output;
     end;
   end;
 datalines;
 1 1 5
 3 2 6
 5 3 7
 7 4 8
 9 5 9
 ;

 %intracc(depvar=rating,target=product,rater=judge,nrater=10);
 %intracc(data=ratings,depvar=rating,target=product,rater=judge,
          print=3,out=intclcor);

Robert M. Hamer, Ph.D., Associate Professor of Psychiatry and Biostatistics, Virginia Commonwealth University, 2-7-1991. Copyright (C) 1990 by Robert M. Hamer, all rights reserved. This macro may be distributed freely as long as all comments are included.