Date: Tue, 13 Apr 2010 13:22:53 -0500
Reply-To: Robin R High <rhigh@UNMC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robin R High <rhigh@UNMC.EDU>
Subject: Re: INTRACC Macro -ICC
In-Reply-To: <y2qaa565c5a1004130838wa583fa0ezbba519a4a5c16ef9@mail.gmail.com>
Content-Type: text/plain; charset="US-ASCII"
Josh,
To understand parts of the macro, it pays to study what PROC MIXED is
doing for the analogous situations:
options NOdate ls=100;
title 'computing icc';
* data from Table 2, Shrout and Fleiss, 1979;
DATA tst(KEEP= id rater rating);
ARRAY rr{4} r1-r4 ;
INPUT id r1-r4;
DO i = 1 to 4 ;
rater=i; rating=rr{i}; OUTPUT;
END;
cards;
1 9 2 5 8
2 6 1 3 2
3 8 4 6 8
4 7 1 2 6
5 10 5 6 9
6 6 2 4 7
;
proc plot data=tst;
plot rating * id = rater / haxis = 0 to 7 by 1;
options ps=40 ls=72;
run; quit;
/*
In Shrout and Fleiss notation, 3 of the correlations and their uses are as
follows:
ICC(1,1): 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): all subjects are rated by the same raters who are assumed to be
a random subset of all possible raters
ICC(3,1): all subjects are rated by the same raters who are assumed to be
the entire population of raters
REFERENCES:
Shrout, P.E., and Fleiss, J.L (1979), "Intraclass correlations: uses
in assessing rater reliability," Psychological Bulletin, 86, 420-428.
*/
options ls=100;
%INCLUDE "u:\sas\macros\intracc.mac";
%intracc(data=tst,depvar=rating,target=id,rater=rater,nrater=4);
* ICC(1,1) rcorr= Shrout-Fleiss reliability: single score;
* only id treated as random;
ods select covparms rcorr;
PROC MIXED DATA=tst NOitPrint;
CLASS rater id;
MODEL rating = ;
REPEATED / subject=id type=cs rcorr;
TITLE 'ICC(1,1) rcorr= Shrout-Fleiss reliability: single score';
Run;
ODS OUTPUT CovParms=cov_prm1 v=v1 vcorr=vcr1;
ods listing close;
PROC MIXED DATA=tst NOitPrint;
CLASS rater id;
MODEL rating = ;
RANDOM id / v vcorr ; * for ICC(1,1) with positive covariance computes
same result as REPEATED stmnt with rcorr option;
TITLE 'ICC(1,1) rcorr= Shrout-Fleiss reliability: single score';
Run;
ods listing;
PROC PRINT DATA=vcr1(obs=8) NOobs n; var row col1-col8; format col: 7.5;
title2 'var/cov matrix'; run;
* vcorr= ICC(2,1)
Shrout-Fleiss reliability: random set;
* both rater and id as random;
ODS OUTPUT CovParms=cov_prm2 v=v2 vcorr=vcr2;
ods listing close;
PROC MIXED DATA=tst NOitPrint;
CLASS rater id;
MODEL rating = ;
RANDOM rater id / v vcorr ;
title 'ICC(2,1) Shrout-Fleiss reliability: random set';
Run;
ods listing ;
PROC PRINT DATA=v2(obs=8) NOobs n; var row col1-col8; format col: 7.5;
title2 'var/cov matrix'; run;
PROC PRINT DATA=vcr2(obs=8) NOobs n; var row col1-col8; format col: 7.5;
title2 'correlation matrix'; run;
* compute ICC(2,1) with variance components;
PROC PRINT DATA=cov_prm2 NOobs; *format estimate 9.5; run;
PROC TRANSPOSE DATA=cov_prm2 OUT=vc2(drop= _type_ _name_) prefix=_ ;
VAR estimate; ID covparm;
run;
PROC PRINT DATA=vc2 NOobs ; run;
DATA vc2; SET vc2;
icc_rater = _rater / (_rater + _id + _Residual);
icc_subjct = _id / (_rater + _id + _Residual);
RUN;
proc print data=vc2 NOobs; title2 'covariance params with ICC(2,1)'; run;
* vcorr= ICC(3,1) Shrout-Fleiss reliability: fixed set;
ODS OUTPUT CovParms=cov_prm3 v=v3 vcorr=vcr3;
ods listing close;
PROC MIXED DATA=tst NOitPrint;
CLASS rater id;
MODEL rating = rater; * add rater as fixed effect;
RANDOM id / v vcorr ;
title 'ICC(3,1) Shrout-Fleiss Reliability Fixed set';
Run;
ods listing ;
PROC PRINT DATA=vcr3(obs=8) NOobs n; var row col1-col8; format col: 7.5;
title2 'var/cov matrix'; run;
*PROC PRINT DATA=cov_prm3 NOobs; *format estimate 9.5; run;
PROC TRANSPOSE DATA=cov_prm3 OUT=vc3(drop= _type_ _name_) prefix=_ ;
VAR estimate; ID covparm;
run;
*PROC PRINT DATA=vc3 NOobs ; run;
DATA vc3; SET vc3;
icc_id=_id / (_id + _Residual);
RUN;
proc print data=vc3 NOobs; title2 'var/cov with ICC(3,1)'; run;
Robin High
UNMC
From:
Josh Di Gennaro <digennjp@GMAIL.COM>
To:
SAS-L@LISTSERV.UGA.EDU
Date:
04/13/2010 10:44 AM
Subject:
INTRACC Macro -ICC
Sent by:
"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Hi SAS-L,
I was curious if there were anyone out there that has experience with the
INTRACC Macro developed by Dr. Hamer.
It can be found here: http://support.sas.com/kb/25/031.html .
If you do I would like to setup a over the phone coversation do discuss
some
broad overview questions and background statistics that the macro
computes.
Thanks,
Josh DiGennaro