knitr::opts_chunk$set( echo = TRUE ) library(knitr) library(dplyr) library(tidyr)
This document describes the use of the Agree package for the data example that was used in the paper on specific agreement on dichotomous outcomes in the situation of more than two raters. The method was fully explained an described in @devet2017.
library(Agree)
For the data example we used data from a study by @dikmans2017. This data is based on photographs of breasts of 50 women after breast reconstruction. The photographs are independently scored by 5 surgeons, the patient, and three mothers. They each rated the quality of the reconstruction on a 5 point ordinal scale with the verbal anchors on the left side ‘very dissatisfied’ on the left end and on the right end ‘very satisfied’ on the right end. They specifically rated the volume, shape, symmetry, scars and nipple. In this paper we use the data of 4 surgeons because one surgeon had some missing values and we look at the rates for symmetry. The satisfaction scores were dichotomised into satisfied (scores 4 and 5) and not satisfied (scores 1,2, and 3).
data(breast) variable <- "symmetry" raters <- c("PCH1", "PCH2", "PCH3", "PCH4") ratersvars <- paste(raters, variable, sep="_") data1 <- data.frame(breast[ratersvars]) for (r in 1:length(ratersvars)){ data1[ratersvars[r]] <- ifelse(data1[ratersvars[r]]=="very satisfied"|data1[ratersvars[r]]=="satisfied","satisfied","not satisfied") } data1 <- data.frame(apply(data1[ratersvars], 2, as.factor), stringsAsFactors = TRUE) head(data1)
First the agreement tables are summed for all rater combinations into one agreement table. Then the off diagonal cells are averaged to obtain symmetry agreement tables. Note that data1 contains a column per rater for the variable of interest.
sumtable(data1,offdiag = FALSE) %>% kable() sumtable(data1,offdiag = TRUE) %>% kable()
From the agreement table we can calculate the agreement. And we can calculate the confidence interval around this agreement.
agreement(data1) agreement(data1, confint = TRUE)
The specific agreement for dichotomous data can be evaluated for the satisfied scores and for the not satisfied scores.
agreement(data1, specific="satisfied", confint = TRUE) agreement(data1, specific="not satisfied", confint = TRUE)
Simulation to compare the Fleis correction
Follows....
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.