Schour y Massler ——–
icc_sm <- select(icc, sm1, sm2)
head(icc_sm)
## sm1 sm2
## 1 10 10
## 2 15 15
## 3 7 7
## 4 10 10
## 5 15 15
## 6 5 5
icc(icc_sm, model="oneway", type="agreement")
## Single Score Intraclass Correlation
##
## Model: oneway
## Type : agreement
##
## Subjects = 30
## Raters = 2
## ICC(1) = 0.853
##
## F-Test, H0: r0 = 0 ; H1: r0 > 0
## F(29,30) = 12.6 , p = 3.28e-10
##
## 95%-Confidence Interval for ICC Population Values:
## 0.716 < ICC < 0.927
Demirjian
icc_d <- select(icc, d1, d2)
head(icc_d)
## d1 d2
## 1 16.0 16.0
## 2 8.0 8.0
## 3 8.0 8.0
## 4 8.3 8.3
## 5 15.7 15.7
## 6 6.5 6.5
icc(icc_d, model="oneway", type="agreement")
## Single Score Intraclass Correlation
##
## Model: oneway
## Type : agreement
##
## Subjects = 31
## Raters = 2
## ICC(1) = 0.831
##
## F-Test, H0: r0 = 0 ; H1: r0 > 0
## F(30,31) = 10.8 , p = 1.22e-09
##
## 95%-Confidence Interval for ICC Population Values:
## 0.68 < ICC < 0.914
ICC para los métodos
# df ---------
df <- read.csv("edad_dentaria.csv", header = T, sep = ",", encoding="UTF-8")
levels(df$Sexo) <- c("Hombre", "Hombre", "Mujer") #colapso el "Hombre " a "Hombre
# elimino los NA
sum(is.na(df$EDAD.REAL)) #hay 39 NA
## [1] 41
df <- df[ which(df$EDAD.REAL !='NA' ),]
sum(is.na(df$EDAD.REAL)) #hay 39 NA
## [1] 0
# ahora df está limpio
str(df)
## 'data.frame': 421 obs. of 14 variables:
## $ Marca.temporal : Factor w/ 461 levels "10/9/2016 16:32:05",..: 1 2 3 4 5 6 7 8 10 11 ...
## $ Su.nombre : Factor w/ 2 levels "Carvajal","Curriel": 1 1 1 1 1 1 1 1 1 1 ...
## $ RadiografĂa : Factor w/ 242 levels "h_20100924_3578",..: 1 2 3 4 5 6 7 8 10 11 ...
## $ Edad.dentaria.segĂşn.SM : num 10 15 7 10 15 5 6 12 4 21 ...
## $ Sexo : Factor w/ 2 levels "Hombre","Mujer": 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.1.: Factor w/ 6 levels "","D","E","F",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.2.: Factor w/ 6 levels "","D","E","F",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.3.: Factor w/ 7 levels "","C","D","E",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.4.: Factor w/ 9 levels "","A","B","C",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.5.: Factor w/ 10 levels "","0","A","B",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.6.: Factor w/ 7 levels "","C","D","E",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.7.: Factor w/ 10 levels "","0","A","B",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Puntaje.total : num NA NA NA NA NA NA NA NA NA NA ...
## $ EDAD.REAL : int 10 17 7 10 18 5 5 12 4 20 ...
# creo dos, uno para cada método
schour <- df[ which(df$Su.nombre=='Carvajal' ),]
dmirjian <- df[ which(df$Su.nombre=='Curriel' ),]
para Schour y Massler
str(schour)
## 'data.frame': 220 obs. of 14 variables:
## $ Marca.temporal : Factor w/ 461 levels "10/9/2016 16:32:05",..: 1 2 3 4 5 6 7 8 10 11 ...
## $ Su.nombre : Factor w/ 2 levels "Carvajal","Curriel": 1 1 1 1 1 1 1 1 1 1 ...
## $ RadiografĂa : Factor w/ 242 levels "h_20100924_3578",..: 1 2 3 4 5 6 7 8 10 11 ...
## $ Edad.dentaria.segĂşn.SM : num 10 15 7 10 15 5 6 12 4 21 ...
## $ Sexo : Factor w/ 2 levels "Hombre","Mujer": 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.1.: Factor w/ 6 levels "","D","E","F",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.2.: Factor w/ 6 levels "","D","E","F",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.3.: Factor w/ 7 levels "","C","D","E",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.4.: Factor w/ 9 levels "","A","B","C",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.5.: Factor w/ 10 levels "","0","A","B",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.6.: Factor w/ 7 levels "","C","D","E",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.7.: Factor w/ 10 levels "","0","A","B",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Puntaje.total : num NA NA NA NA NA NA NA NA NA NA ...
## $ EDAD.REAL : int 10 17 7 10 18 5 5 12 4 20 ...
icc_schour <- select(schour, Edad.dentaria.segĂşn.SM, EDAD.REAL)
head(icc_schour)
## Edad.dentaria.segĂşn.SM EDAD.REAL
## 1 10 10
## 2 15 17
## 3 7 7
## 4 10 10
## 5 15 18
## 6 5 5
icc(icc_schour, model="oneway", type="consistency")
## Single Score Intraclass Correlation
##
## Model: oneway
## Type : consistency
##
## Subjects = 220
## Raters = 2
## ICC(1) = 0.92
##
## F-Test, H0: r0 = 0 ; H1: r0 > 0
## F(219,220) = 24.1 , p = 5.72e-92
##
## 95%-Confidence Interval for ICC Population Values:
## 0.898 < ICC < 0.938
str(dmirjian)
## 'data.frame': 201 obs. of 14 variables:
## $ Marca.temporal : Factor w/ 461 levels "10/9/2016 16:32:05",..: 243 242 244 245 246 247 248 249 250 251 ...
## $ Su.nombre : Factor w/ 2 levels "Carvajal","Curriel": 2 2 2 2 2 2 2 2 2 2 ...
## $ RadiografĂa : Factor w/ 242 levels "h_20100924_3578",..: 2 1 3 4 5 6 7 8 9 12 ...
## $ Edad.dentaria.segĂşn.SM : num 16 8 8 8.3 15.7 6.5 7.6 15.7 16 16 ...
## $ Sexo : Factor w/ 2 levels "Hombre","Mujer": 1 1 1 1 1 1 1 1 1 1 ...
## $ CategorĂa.por.diente..3.1.: Factor w/ 6 levels "","D","E","F",..: 6 6 5 6 6 2 4 6 6 6 ...
## $ CategorĂa.por.diente..3.2.: Factor w/ 6 levels "","D","E","F",..: 6 6 4 6 6 2 3 6 6 6 ...
## $ CategorĂa.por.diente..3.3.: Factor w/ 7 levels "","C","D","E",..: 7 5 4 5 7 4 4 7 7 7 ...
## $ CategorĂa.por.diente..3.4.: Factor w/ 9 levels "","A","B","C",..: 9 6 6 7 9 5 5 9 9 9 ...
## $ CategorĂa.por.diente..3.5.: Factor w/ 10 levels "","0","A","B",..: 10 7 6 8 10 5 6 10 10 10 ...
## $ CategorĂa.por.diente..3.6.: Factor w/ 7 levels "","C","D","E",..: 7 4 6 7 7 3 6 7 7 7 ...
## $ CategorĂa.por.diente..3.7.: Factor w/ 10 levels "","0","A","B",..: 10 4 6 7 9 5 6 9 10 10 ...
## $ Puntaje.total : num 100 71.6 71.7 90 98.2 39 61 98.2 100 100 ...
## $ EDAD.REAL : int 17 10 7 10 18 5 5 12 19 13 ...
icc_dmirjian <- select(dmirjian, Edad.dentaria.segĂşn.SM, EDAD.REAL)
head(icc_dmirjian)
## Edad.dentaria.segĂşn.SM EDAD.REAL
## 243 16.0 17
## 244 8.0 10
## 245 8.0 7
## 246 8.3 10
## 247 15.7 18
## 248 6.5 5
icc(icc_dmirjian, model="oneway", type="consistency")
## Single Score Intraclass Correlation
##
## Model: oneway
## Type : consistency
##
## Subjects = 201
## Raters = 2
## ICC(1) = 0.864
##
## F-Test, H0: r0 = 0 ; H1: r0 > 0
## F(200,201) = 13.7 , p = 3.64e-62
##
## 95%-Confidence Interval for ICC Population Values:
## 0.825 < ICC < 0.896
ICC entre métodos
icc_comparacion <- read.csv("edad_dentaria_2.csv", header = T, sep = ",")
head(icc_comparacion)
## RadiografĂa SM D Edad.real
## 1 h_20100924_3578 10 8.0 10
## 2 h_20100927_3591 15 16.0 17
## 3 h_20101006_3633 7 8.0 7
## 4 h_20101026_3716 10 8.3 10
## 5 h_20101105_3743 15 15.7 18
## 6 h_20101116_3782 5 6.5 5
icc_comparacion_resultado <- select(icc_comparacion, SM, D)
icc(icc_comparacion_resultado, model="oneway", type="consistency")
## Single Score Intraclass Correlation
##
## Model: oneway
## Type : consistency
##
## Subjects = 199
## Raters = 2
## ICC(1) = 0.88
##
## F-Test, H0: r0 = 0 ; H1: r0 > 0
## F(198,199) = 15.7 , p = 1.29e-66
##
## 95%-Confidence Interval for ICC Population Values:
## 0.845 < ICC < 0.908
print( bland.altman.plot(icc_comparacion$SM, icc_comparacion$D, graph.sys = "ggplot2", geom_count = TRUE)
+ ggtitle("Bland Altman Plot SM versus D")
+ labs(x="Promedios", y="Diferencias"))
