# library(tidyverse)
# install.packages("mada")
# install.packages("meta")
pacman::p_load(mada, meta, tidyverse, rapportools)
# library(mada)
# library(meta)
Filtro solamente pra OPG y que tengan para calcular sens y espec
df <- df %>%
filter(test == "OPG", vp != "NA")
glimpse(df)
Observations: 21
Variables: 25
$ autor [3m[38;5;246m<chr>[39m[23m "H. GHAEMINIA", "H. GHAEMINIA", "H. GHAEMINIA", "H. GHAEMINIA", "H. GHAEMINIA", "H.…
$ rs_seleccion_paciente [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
$ rs_test_indice [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
$ rs_referencia_estandar [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
$ a_flujo_y_tiempo [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
$ a_seleccion_pacientes [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
$ a_test_indice [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
$ a_referencia_estandar [3m[38;5;246m<dbl>[39m[23m -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
$ muestra_opg [3m[38;5;246m<dbl>[39m[23m 53, 53, 53, 53, 53, 53, 161, 161, 161, 161, 60, 60, 60, 60, 60, 31, 31, 31, 31, 31,…
$ signo_identificado [3m[38;5;246m<chr>[39m[23m "Interrupción linea blanca", "Oscurecimiento raiz", "Desvio canal alveolar inferior…
$ signo_identificado_2 [3m[38;5;246m<dbl>[39m[23m NA, NA, NA, NA, NA, NA, 62, 30, 15, 5, 1, NA, 28, 3, 8, NA, NA, NA, NA, NA, NA
$ muestra_cbct [3m[38;5;246m<dbl>[39m[23m 53, 53, 53, 53, 53, 53, 161, 161, 161, 161, 41, 41, 41, 41, 41, 31, 31, 31, 31, 31,…
$ contacto_cbct [3m[38;5;246m<chr>[39m[23m "45", "45", "45", "45", "45", "45", "27", "27", "27", "27", "41", "41", "41", "41",…
$ contacto_real_iac [3m[38;5;246m<dbl>[39m[23m 23, 23, 23, 23, 23, 23, 25, 25, 25, 25, 41, 41, 41, 41, 41, 3, 3, 3, 3, 3, 3
$ ppv [3m[38;5;246m<dbl>[39m[23m 0.44, 0.44, 0.44, 0.44, 0.44, 0.00, 0.31, 0.31, 0.31, 0.31, NA, NA, NA, NA, NA, NA,…
$ npv [3m[38;5;246m<dbl>[39m[23m 1.00, 1.00, 1.00, 1.00, 1.00, 0.00, 0.98, 0.98, 0.98, 0.98, NA, NA, NA, NA, NA, NA,…
$ vp [3m[38;5;246m<dbl>[39m[23m 23, 23, 23, 23, 23, 0, 19, 19, 19, 19, 40, 40, 40, 40, 40, 9, 9, 9, 9, 9, 9
$ fp [3m[38;5;246m<dbl>[39m[23m 29, 29, 29, 29, 29, 0, 43, 43, 43, 43, 19, 19, 19, 19, 19, 10, 10, 10, 10, 10, 10
$ vn [3m[38;5;246m<dbl>[39m[23m 1, 1, 1, 1, 1, 0, 72, 72, 72, 72, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12
$ fn [3m[38;5;246m<dbl>[39m[23m 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0
$ accuracy [3m[38;5;246m<dbl>[39m[23m 0.45, 0.45, 0.45, 0.45, 0.45, 0.00, 0.64, 0.64, 0.64, 0.64, NA, NA, NA, NA, NA, NA,…
$ test [3m[38;5;246m<chr>[39m[23m "OPG", "OPG", "OPG", "OPG", "OPG", "OPG", "OPG", "OPG", "OPG", "OPG", "OPG", "OPG",…
$ gold_standard [3m[38;5;246m<chr>[39m[23m "Evaluación clÃnica", "Evaluación clÃnica", "Evaluación clÃnica", "Evaluación clÃni…
$ sensibilidad_opg [3m[38;5;246m<dbl>[39m[23m 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 0.70, 0.70, 0.70, 0.70, 0.97, 0.97, 0.97, 0.97,…
$ especificidad [3m[38;5;246m<dbl>[39m[23m 0.03, 0.03, 0.03, 0.03, 0.03, 0.03, 0.77, 0.77, 0.77, 0.77, 0.00, 0.00, 0.00, 0.00,…
df$signo_identificado <- rapportools::tocamel(df$signo_identificado)
df <- df %>%
mutate(signo_identificado = case_when(
signo_identificado == "InterrupciónDeLaCorticalCanalMandibular" ~ "InterrupciónDeCorticalCanalMandibular",
signo_identificado == "OscurecimientoDeLaRaiz" ~ "OscurecimientoDeLasRaices",
TRUE ~ as.character(signo_identificado)
))
table(df$signo_identificado)
DesvioCanalAlveolarInferior EstrechamientoCanalAlveolarInferior EstrechamientoRaiz
4 2 3
InterrupciónLineaBlanca OscurecimientoRaiz RaicesDesviadas
4 4 2
RaizOscuraYBifida
2
aNumero <- function(x, na.rm = FALSE) (as.integer(x))
df <- df %>%
mutate_at(c("a_seleccion_pacientes",
"a_referencia_estandar",
"especificidad"), aNumero)
table(df$autor)
A. HASANI A.JHAMB H. GHAEMINIA TANTANAPORNKUL
5 6 6 4
df %>%
mutate(riesgoDeSesgo = rs_seleccion_paciente + rs_test_indice + rs_referencia_estandar) %>%
mutate(aplicabilidad = a_flujo_y_tiempo + a_seleccion_pacientes + a_test_indice + a_referencia_estandar) %>%
group_by(autor) %>%
summarise(sesgo = mean(riesgoDeSesgo), aplicab = mean(aplicabilidad))
table(df$signo_identificado)
DesvioCanalAlveolarInferior EstrechamientoCanalAlveolarInferior EstrechamientoRaiz
4 2 3
InterrupciónLineaBlanca OscurecimientoRaiz RaicesDesviadas
4 4 2
RaizOscuraYBifida
2
Creo los totales
df <- df %>%
mutate(n1 = vp + fp,
n2 = vn + fn)
table(df$signo_identificado)
DesvioCanalAlveolarInferior EstrechamientoCanalAlveolarInferior EstrechamientoRaiz
4 2 3
InterrupciónLineaBlanca OscurecimientoRaiz RaicesDesviadas
4 4 2
RaizOscuraYBifida
2
md1 <- df %>%
filter(signo_identificado == "DesvioCanalAlveolarInferior") %>%
select(autor,
TP = vp,
FP = fp,
TN = vn,
FN = fn) %>%
na.omit() %>%
madad(., level = 0.95)
Unknown or uninitialised column: 'names'.There are very few primary studies!
md1
Descriptive summary of . with 4 primary studies.
Confidence level for all calculations set to 95 %
Using a continuity correction of 0.5 if applicable
Diagnostic accuracies
sens 2.5% 97.5% spec 2.5% 97.5%
[1,] 0.979 0.828 0.998 0.048 0.011 0.185
[2,] 0.696 0.511 0.834 0.625 0.534 0.708
[3,] 0.964 0.859 0.992 0.025 0.003 0.200
[4,] 0.950 0.655 0.995 0.543 0.349 0.726
Test for equality of sensitivities:
X-squared = 15.9214, df = 3, p-value = 0.00118
Test for equality of specificities:
X-squared = 49.7698, df = 3, p-value = 8.94e-11
Diagnostic OR and likelihood ratios
DOR 2.5% 97.5% posLR 2.5% 97.5% negLR 2.5% 97.5%
[1,] 2.390 0.093 61.399 1.029 0.932 1.135 0.431 0.018 10.107
[2,] 3.824 1.572 9.301 1.857 1.323 2.607 0.486 0.272 0.866
[3,] 0.692 0.027 17.781 0.989 0.903 1.083 1.429 0.061 33.538
[4,] 22.619 1.172 436.417 2.081 1.303 3.323 0.092 0.006 1.407
Correlation of sensitivities and false positive rates:
rho 2.5 % 97.5 %
0.713 -0.789 0.993
mada::forest(md1, type = "sens", main = "Sensibilidad DesvioCanalAlveolarInferior", xlab = "Sensibilidad")
mada::forest(md1, type = "spec", main = "Especificidad DesvioCanalAlveolarInferior")
mada::forest(md1, type = "DOR", log = TRUE, main = "Log DOR DesvioCanalAlveolarInferior")
md2 <- df %>%
select(autor,
signo_identificado,
gold_standard,
test,
TP = vp,
FP = fp,
TN = vn,
FN = fn) %>%
filter(TP > 0) %>%
filter(test == "OPG") %>%
filter(signo_identificado == "EstrechamientoCanalAlveolarInferior")
md2 <- mada::madad(md2, level = 0.95)
Unknown or uninitialised column: 'names'.There are very few primary studies!
mada::forest(md2, type = "sens", main = "Sensibilidad", xlab = "Sensibilidad EstrechamientoCanalAlveolarInferior")
mada::forest(md2, type = "spec", main = "Especificidad EstrechamientoCanalAlveolarInferior")
mada::forest(md2, type = "DOR", log = TRUE, main = "Log DOR EstrechamientoCanalAlveolarInferior")
md4 <- df %>%
select(autor,
signo_identificado,
gold_standard,
test,
TP = vp,
FP = fp,
TN = vn,
FN = fn) %>%
filter(TP > 0) %>%
filter(test == "OPG") %>%
filter(signo_identificado == "EstrechamientoRaiz") %>%
madad(., level = 0.95)
Unknown or uninitialised column: 'names'.There are very few primary studies!
md4
Descriptive summary of . with 2 primary studies.
Confidence level for all calculations set to 95 %
Using a continuity correction of 0.5 if applicable
Diagnostic accuracies
sens 2.5% 97.5% spec 2.5% 97.5%
[1,] 0.696 0.511 0.834 0.625 0.534 0.708
[2,] 0.950 0.655 0.995 0.543 0.349 0.726
Test for equality of sensitivities:
X-squared = 1.406, df = 1, p-value = 0.236
Test for equality of specificities:
X-squared = 0.2486, df = 1, p-value = 0.618
Diagnostic OR and likelihood ratios
DOR 2.5% 97.5% posLR 2.5% 97.5% negLR 2.5% 97.5%
[1,] 3.824 1.572 9.301 1.857 1.323 2.607 0.486 0.272 0.866
[2,] 22.619 1.172 436.417 2.081 1.303 3.323 0.092 0.006 1.407
Correlation of sensitivities and false positive rates:
Error in CIrho(x$cor_sens_fpr, x$nobs) : rho < 1 is not TRUE
md5
Descriptive summary of . with 4 primary studies.
Confidence level for all calculations set to 95 %
Using a continuity correction of 0.5 if applicable
Diagnostic accuracies
sens 2.5% 97.5% spec 2.5% 97.5%
[1,] 0.979 0.828 0.998 0.048 0.011 0.185
[2,] 0.696 0.511 0.834 0.625 0.534 0.708
[3,] 0.964 0.859 0.992 0.025 0.003 0.200
[4,] 0.950 0.655 0.995 0.543 0.349 0.726
Test for equality of sensitivities:
X-squared = 15.9214, df = 3, p-value = 0.00118
Test for equality of specificities:
X-squared = 49.7698, df = 3, p-value = 8.94e-11
Diagnostic OR and likelihood ratios
DOR 2.5% 97.5% posLR 2.5% 97.5% negLR 2.5% 97.5%
[1,] 2.390 0.093 61.399 1.029 0.932 1.135 0.431 0.018 10.107
[2,] 3.824 1.572 9.301 1.857 1.323 2.607 0.486 0.272 0.866
[3,] 0.692 0.027 17.781 0.989 0.903 1.083 1.429 0.061 33.538
[4,] 22.619 1.172 436.417 2.081 1.303 3.323 0.092 0.006 1.407
Correlation of sensitivities and false positive rates:
rho 2.5 % 97.5 %
0.713 -0.789 0.993
md6
Descriptive summary of . with 4 primary studies.
Confidence level for all calculations set to 95 %
Using a continuity correction of 0.5 if applicable
Diagnostic accuracies
sens 2.5% 97.5% spec 2.5% 97.5%
[1,] 0.979 0.828 0.998 0.048 0.011 0.185
[2,] 0.696 0.511 0.834 0.625 0.534 0.708
[3,] 0.964 0.859 0.992 0.025 0.003 0.200
[4,] 0.950 0.655 0.995 0.543 0.349 0.726
Test for equality of sensitivities:
X-squared = 15.9214, df = 3, p-value = 0.00118
Test for equality of specificities:
X-squared = 49.7698, df = 3, p-value = 8.94e-11
Diagnostic OR and likelihood ratios
DOR 2.5% 97.5% posLR 2.5% 97.5% negLR 2.5% 97.5%
[1,] 2.390 0.093 61.399 1.029 0.932 1.135 0.431 0.018 10.107
[2,] 3.824 1.572 9.301 1.857 1.323 2.607 0.486 0.272 0.866
[3,] 0.692 0.027 17.781 0.989 0.903 1.083 1.429 0.061 33.538
[4,] 22.619 1.172 436.417 2.081 1.303 3.323 0.092 0.006 1.407
Correlation of sensitivities and false positive rates:
rho 2.5 % 97.5 %
0.713 -0.789 0.993
md7
Descriptive summary of . with 2 primary studies.
Confidence level for all calculations set to 95 %
Using a continuity correction of 0.5 if applicable
Diagnostic accuracies
sens 2.5% 97.5% spec 2.5% 97.5%
[1,] 0.979 0.828 0.998 0.048 0.011 0.185
[2,] 0.950 0.655 0.995 0.543 0.349 0.726
Test for equality of sensitivities:
X-squared = 0, df = 1, p-value = 1
Test for equality of specificities:
X-squared = 14.3731, df = 1, p-value = 0.00015
Diagnostic OR and likelihood ratios
DOR 2.5% 97.5% posLR 2.5% 97.5% negLR 2.5% 97.5%
[1,] 2.390 0.093 61.399 1.029 0.932 1.135 0.431 0.018 10.107
[2,] 22.619 1.172 436.417 2.081 1.303 3.323 0.092 0.006 1.407
Correlation of sensitivities and false positive rates:
Error in CIrho(x$cor_sens_fpr, x$nobs) : rho < 1 is not TRUE
md8
Descriptive summary of . with 2 primary studies.
Confidence level for all calculations set to 95 %
Using a continuity correction of 0.5 if applicable
Diagnostic accuracies
sens 2.5% 97.5% spec 2.5% 97.5%
[1,] 0.964 0.859 0.992 0.025 0.003 0.200
[2,] 0.950 0.655 0.995 0.543 0.349 0.726
Test for equality of sensitivities:
X-squared = 0, df = 1, p-value = 1
Test for equality of specificities:
X-squared = 11.2867, df = 1, p-value = 0.000781
Diagnostic OR and likelihood ratios
DOR 2.5% 97.5% posLR 2.5% 97.5% negLR 2.5% 97.5%
[1,] 0.692 0.027 17.781 0.989 0.903 1.083 1.429 0.061 33.538
[2,] 22.619 1.172 436.417 2.081 1.303 3.323 0.092 0.006 1.407
Correlation of sensitivities and false positive rates:
Error in CIrho(x$cor_sens_fpr, x$nobs) : rho < 1 is not TRUE