Skip to main content
. Author manuscript; available in PMC: 2012 Jul 23.
Published in final edited form as: Tutor Quant Methods Psychol. 2012;8(1):23–34. doi: 10.20982/tqmp.08.1.p023

Table 6.

Syntax for computing ICCs in SPSS and R.

SPSS Syntax
 RELIABILITY
  /VARIABLES=Emp_Rater1 Emp_Rater2 Emp_Rater3
  /SCALE(‘ALL VARIABLES’) ALL
  /MODEL=ALPHA
  /ICC=MODEL(RANDOM) TYPE(CONSISTENCY) CIN=95 TESTVAL=0.
R Syntax
 library(irr) #Load the irr package (must already be installed)
 hist(myRatings[,1])) #Examine histogram for rater 1 for violations of normality
 hist(myRatings[,2])) #Examine histogram for rater 2
 print(icc(myRatings, model=“twoway”, type=“consistency”, unit=“average”))
#Specify the ICC model, type, and unit as appropriate.
#Use help(icc) for keywords

Note: R syntax assumes that data are in a matrix or data frame called “myRatings.” In SPSS, model may be MIXED, RANDOM, or ONEWAY, type may be CONSISTENCY or ABSOLUTE. Single- and average-measures units will be included in SPSS output. In R, model may be twoway or oneway, type may be consistency or absolute, and unit may be average or single.