Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Abishekaa
Obsidian | Level 7

This is my sample dataset:

PTID _NAME_ COL1

1           M1        11     

1           M2        20

1           M3         . 

2           M1        15 

2           M2        25

2           M3        12

3           M1        10

3           M2        9

3           M3        15

 

 

I want to calculate the intraclass correlation coefficient to assess the correlation of (m1-m3) within each patient..so basically an icc for each patient.

I have tried to use the %intracc macro:

 %intracc(data=trans,target=PtID,
               depvar=COL1,rater=_NAME_,print=3);

But this only outputs one overall icc values, while I want one icc for each patient..Any help is appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I don't think the ICC gives you a statistic for each patient. The ICC is a scalar value that combines information across all groups. You get one statistic that describes how closely the measurements within a group agree with each other. In your example, you have specified that the patients are the groups. If all the patients have ratings that are close together (like {10, 9, 11}) you will conclude that the correlation within classes is strong.

 

Think of the analogy with the usual (Pearson correlation). You don't get a correlation for each observation, you get one correlation for the whole data set.

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

I don't think the ICC gives you a statistic for each patient. The ICC is a scalar value that combines information across all groups. You get one statistic that describes how closely the measurements within a group agree with each other. In your example, you have specified that the patients are the groups. If all the patients have ratings that are close together (like {10, 9, 11}) you will conclude that the correlation within classes is strong.

 

Think of the analogy with the usual (Pearson correlation). You don't get a correlation for each observation, you get one correlation for the whole data set.

StatDave
SAS Super FREQ

Actually, it is possible to obtain within-subjects measures if your data represent the ratings from a set of raters on a set of subjects (or items) and your interest is the agreement between raters or within subjects. The generalized linear mixed models (GLMM) approach available with the MAGREE macro can provide estimates of the random effects for subjects as well as raters. For each subject or rater, the macro can provide measures of the departure from agreement. Example 2 in the Results tab of the macro documentation illustrates how rater- and subject-specific agreement statistics can be obtained and interpreted. If your PTID variable represents the subjects and your _NAME_ variable represents the raters, then the following macro call requests the GLMM-based statistics. However, to avoid problems in fitting the model required for this method, you will probably need more than three subjects. But more subjects does not guarantee that model fitting problems won't occur.

%magree(data=trans, items=ptid, raters=_name_, response=col1,
        stat=glmm, options=ratereffects itemeffects )

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2 replies
  • 2844 views
  • 4 likes
  • 3 in conversation