pingouin.intraclass_corr

pingouin.intraclass_corr(data=None, items=None, raters=None, scores=None, ci=0.95)[source]

Intra-class correlation coefficient.

Parameters
datapd.DataFrame

Dataframe containing the variables

itemsstring

Name of column in data containing the items (targets).

ratersstring

Name of column in data containing the raters (scorers).

scoresstring

Name of column in data containing the scores (ratings).

cifloat

Confidence interval

Returns
iccfloat

Intraclass correlation coefficient

cilist

Lower and upper confidence intervals

Notes

The intraclass correlation (ICC) assesses the reliability of ratings by comparing the variability of different ratings of the same subject to the total variation across all ratings and all subjects. The ratings are quantitative (e.g. Likert scale).

Shrout and Fleiss (1979) describe six cases of reliability of ratings done by \(k\) raters on \(n\) targets. Pingouin only returns ICC1, which consider that each target is rated by a different rater and the raters are selected at random. (This is a one-way ANOVA fixed effects model and is found by (MSB - MSW)/(MSB + (nr - 1) * MSW)). ICC1 is sensitive to differences in means between raters and is a measure of absolute agreement.

This function has been tested against the ICC function of the R psych package.

References

1

Shrout, P. E., & Fleiss, J. L. (1979). Intraclass correlations: uses in assessing rater reliability. Psychological bulletin, 86(2), 420.

2

https://cran.r-project.org/web/packages/psych/psych.pdf

3

http://www.real-statistics.com/reliability/intraclass-correlation/

Examples

ICC of wine quality assessed by 4 judges.

>>> import pingouin as pg
>>> data = pg.read_dataset('icc')
>>> pg.intraclass_corr(data=data, items='Wine', raters='Judge',
...                    scores='Scores', ci=.95)
(0.727526, array([0.434, 0.927]))