UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SAS Code Fragment: 
Computing Intraclass Correlation

* This is based on the example from Winer Page 288
data test;
 input score1 score2 score3 score4 pid;
cards;
2 4 3 3 1
5 7 5 6 2
1 3 1 2 3
7 9 9 8 4
2 4 6 1 5
6 8 8 4 6
;
run;

proc glm data=test;
  class pid;
  model score1 score2 score3 score4 = pid / nouni;
  repeated judge 4;
run;
----------------------------------
The GLM Procedure
Repeated Measures Analysis of Variance
Tests of Hypotheses for Between Subjects Effects

Source                      DF     Type III SS     Mean Square    F Value    Pr > F

pid                          5     122.5000000      24.5000000        .       .
Error                        0        .               .
The GLM Procedure
Repeated Measures Analysis of Variance
Univariate Tests of Hypotheses for Within Subject Effects

                                                                                    Adj Pr > F
Source                     DF    Type III SS    Mean Square   F Value   Pr > F    G - G    H - F

judge                       3    17.50000000     5.83333333       .      .        .        .
judge*pid                  15    18.50000000     1.23333333       .      .        .        .
Error(judge)                0     0.00000000      .
----------------------------------------
* You can then take the output from above and use the
* formulas on page 288 and 289 for computing the intraclass correlation.
You may also wish to see http://ftp.sas.com/techsup/download/stat/intracce.html 

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.