No | Variable | Stats / Values | Freqs (% of Valid) | Graph | Valid | Missing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | articulacion [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | tipo_intervencion [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | indicacion [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | cementada [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | polietileno [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | edad [numeric] |
|
35 distinct values | 63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | sexo [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | asa [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | ecv [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | ete_previa [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | neumopatia [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | hta [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | psiquiatrica [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | diabetes [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | imc [numeric] |
|
24 distinct values | 63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | gastropatia [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | inmunodepresion [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | malignidad [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | marcapasos [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | renopatia [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | reumatismo [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | hepatopatia [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | iproprevia [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | vih [factor] | 1. F |
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
25 | coagulopatia [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
26 | anticoagulantes [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
27 | antiagregacion [factor] |
|
|
61 (96.8%) | 2 (3.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
28 | tabaco [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
29 | alcohol [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
30 | seroma [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
31 | hematoma [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
32 | skin_infection [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33 | fistula [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
34 | fiebre [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
35 | tipo_ip [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
36 | diasadair [numeric] |
|
34 distinct values | 54 (85.7%) | 9 (14.3%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
37 | dias_clinica [numeric] |
|
15 distinct values | 21 (33.3%) | 42 (66.7%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
38 | pcr_sangre [numeric] |
|
56 distinct values | 63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
39 | wbc_sangre [numeric] |
|
47 distinct values | 63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
40 | hemocultivo [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
41 | germen [factor] |
|
|
61 (96.8%) | 2 (3.2%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
42 | cultivoporc [numeric] |
|
18 distinct values | 63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
43 | resdair [factor] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
44 | klic_score [numeric] |
|
10 distinct values | 41 (65.1%) | 22 (34.9%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
45 | shohat [numeric] |
|
52 distinct values | 54 (85.7%) | 9 (14.3%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
46 | edadmas70 [logical] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
47 | imc30 [logical] |
|
|
63 (100.0%) | 0 (0.0%) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
48 | asamas2 [logical] |
|
|
63 (100.0%) | 0 (0.0%) |
Generated by summarytools 1.0.0 (R version 4.0.2)
2021-11-29
## Warning: Removed 7 rows containing non-finite values (stat_density).
## Warning: Removed 1 rows containing non-finite values (stat_density).
## Warning: Removed 9 rows containing non-finite values (stat_density).
## Warning: Removed 42 rows containing non-finite values (stat_density).
Se dispone de una muestra de 64 personas para shothat, 41 para klic_score. El tamaño necesario para una validación es un asunto controvertido. Harrell et al sugieren que al menos haya 100 casos (). Vergouwe et al. que, para un resultado binario, al menos, a estos 100 casos, se acompañe de 100 controles (). Estas recomendaciones se basaban en el tamaño muestral necesario para detectar una diferencia significativa entre las medidas de rendimiento detectadas y las pre-especificadas con un poder del 80% y 5% de nivel de significación (por ejemplo, asumiendo una diferencia de 0.1 en el estadistico C), y asumiendo que la prevalencia se mantenia constante.. Estudios recientes han abordado una relajacion de estas asunciones mediante simulacion (Riley, Pavlou)
Harrell FE, Lee KL and Mark DB. Multivariable prognostic models: issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors. Stat Med 1996; 15: 361–387.
Vergouwe Y, Steyerberg EW, Eijkemans MJC, et al. Substantial effective sample sizes were required for external validation studies of predictive logistic regression models. J Clin Epidemiol 2005; 58: 475–483.
Pavlou M, Qu C, Omar RZ, Seaman SR, Steyerberg EW, White IR, Ambler G. Estimation of required sample size for external validation of risk models for binary outcomes. Statistical Methods in Medical Research. 2021 Apr
Riley RD, Debray TP, Collins GS, Archer L, Ensor J, van Smeden M, Snell KI. Minimum sample size for external validation of a clinical prediction model with a binary outcome. Statistics in Medicine. 2021 May 24.
## siguiendo el trabajo de Pavlou:
#The target is to calculate the size of the validation data so as to estimate the C-statistic, the Calibration Slope and the Calibration in the Large with sufficient precision. In this example, the required precision is reflected by a SE of the estimated C-statistic of at most 0.025, and SE of the estimated Calibration Slope and Calibration in the Large of at most 0.1.
# The anticipated values of the outcome prevalence and the C-statistic are p=0. and C=0.75, respectively.
sampsizeval(p=0.4, c=0.76, se_c=0.06, se_cs =0.2, se_cl = 0.15)
## $size_c_statistic
## [1] 65
##
## $size_calibration_slope
## [1] 159
##
## $size_calibration_large
## [1] 231
##
## $size_recommended
## [1] 231
Se concluye que con 64 personas asumiendo una prevalencia (incidencia de fracaso) de 0.4, podriamos detectar un estadistico C de 0.76 con una precision de 0.06.
##
## Performance Measure(s)
##
## Measure Value
## 1 accuracy (ACC) 0.31481481
## 2 probability of correct classification (PCC) 0.31481481
## 3 fraction correct (FC) 0.31481481
## 4 simple matching coefficient (SMC) 0.31481481
## 5 Rand (similarity) index (RSI) 0.31481481
## 6 probability of misclassification (PMC) 0.68518519
## 7 error rate (ER) 0.68518519
## 8 fraction incorrect (FIC) 0.68518519
## 9 sensitivity (SENS) 0.52380952
## 10 recall (REC) 0.52380952
## 11 true positive rate (TPR) 0.52380952
## 12 probability of detection (PD) 0.52380952
## 13 hit rate (HR) 0.52380952
## 14 specificity (SPEC) 0.18181818
## 15 true negative rate (TNR) 0.18181818
## 16 selectivity (SEL) 0.18181818
## 17 detection rate (DR) 0.20370370
## 18 false positive rate (FPR) 0.81818182
## 19 fall-out (FO) 0.81818182
## 20 false alarm (rate) (FAR) 0.81818182
## 21 probability of false alarm (PFA) 0.81818182
## 22 false negative rate (FNR) 0.47619048
## 23 miss rate (MR) 0.47619048
## 24 false discovery rate (FDR) 0.71052632
## 25 false omission rate (FOR) 0.62500000
## 26 prevalence (PREV) 0.38888889
## 27 (positive) pre-test probability (PREP) 0.38888889
## 28 (positive) pre-test odds (PREO) 0.63636364
## 29 detection prevalence (DPREV) 0.70370370
## 30 negative pre-test probability (NPREP) 0.61111111
## 31 negative pre-test odds (NPREO) 1.57142857
## 32 no information rate (NIR) 0.61111111
## 33 weighted accuracy (WACC) 0.35281385
## 34 balanced accuracy (BACC) 0.35281385
## 35 (bookmaker) informedness (INF) -0.29437229
## 36 Youden's J statistic (YJS) -0.29437229
## 37 deltap' (DPp) -0.29437229
## 38 positive likelihood ratio (PLR) 0.64021164
## 39 negative likelihood ratio (NLR) 2.61904762
## 40 weighted likelihood ratio (WLR) 1.62962963
## 41 balanced likelihood ratio (BLR) 1.62962963
## 42 diagnostic odds ratio (DOR) 0.24444444
## 43 positive predictive value (PPV) 0.28947368
## 44 precision (PREC) 0.28947368
## 45 (positive) post-test probability (POSTP) 0.28947368
## 46 (positive) post-test odds (POSTO) 0.40740741
## 47 Bayes factor G1 (BFG1) 0.64021164
## 48 negative predictive value (NPV) 0.37500000
## 49 negative post-test probability (NPOSTP) 0.37500000
## 50 negative post-test odds (NPOSTO) 0.60000000
## 51 Bayes factor G0 (BFG0) 0.38181818
## 52 markedness (MARK) -0.33552632
## 53 deltap (DP) -0.33552632
## 54 weighted predictive value (WPV) 0.33223684
## 55 balanced predictive value (BPV) 0.33223684
## 56 F1 score (F1S) 0.37288136
## 57 Dice similarity coefficient (DSC) 0.37288136
## 58 F beta score (FBS) 0.37288136
## 59 Jaccard similarity coefficient (JSC) 0.22916667
## 60 threat score (TS) 0.22916667
## 61 critical success index (CSI) 0.22916667
## 62 Matthews' correlation coefficient (MCC) -0.31427639
## 63 Pearson's correlation (r phi) (RPHI) -0.31427639
## 64 Phi coefficient (PHIC) -0.31427639
## 65 Cramer's V (CRV) -0.31427639
## 66 proportion of positive predictions (PPP) 0.70370370
## 67 expected accuracy (EACC) 0.45473251
## 68 Cohen's kappa coefficient (CKC) -0.25660377
## 69 mutual information in bits (MI2) 0.07044026
## 70 joint entropy in bits (JE2) 1.22711643
## 71 variation of information in bits (VI2) 1.69991453
## 72 Jaccard distance (JD) 0.96021122
## 73 information quality ratio (INFQR) 0.03978878
## 74 uncertainty coefficient (UC) 0.07306484
## 75 entropy coefficient (EC) 0.07306484
## 76 proficiency (metric) (PROF) 0.07306484
## 77 deficiency (metric) (DFM) 0.92693516
## 78 redundancy (RED) 0.03826622
## 79 symmetric uncertainty (SU) 0.07653243
## 80 normalized uncertainty (NU) 0.07661877
## Warning in AUC(pred, group = as.integer(truth == namePos)): The computed
## AUC value 0.3030303 will be replaced by 0.6969697 which can be achieved be
## interchanging the sample labels!
## Warning in AUC(pred, group = as.integer(truth == namePos)): The computed
## AUC value 0.3030303 will be replaced by 0.6969697 which can be achieved be
## interchanging the sample labels!
##
## Performance Score(s)
##
## Score Value
## 1 area under curve (AUC) 0.6969697
## 2 Gini index (GINI) 0.3939394
## 3 Brier score (BS) 0.3658052
## 4 positive Brier score (PBS) 0.2336342
## 5 negative Brier score (NBS) 0.4499141
## 6 weighted Brier score (WBS) 0.3417741
## 7 balanced Brier score (BBS) 0.3417741
## Optimal Cut-off YJS
## 0.2389163 0.0000000
## $C
##
## Hosmer-Lemeshow C statistic
##
## data: preds and as.numeric(datiscs$resdair)
## X-squared = 272.7, df = 8, p-value < 2.2e-16
##
##
## $H
##
## Hosmer-Lemeshow H statistic
##
## data: preds and as.numeric(datiscs$resdair)
## X-squared = 272.2, df = 8, p-value < 2.2e-16
##
## n=54 Mean absolute error=0.035 Mean squared error=0.00156
## 0.9 Quantile of absolute error=0.067
Conclusion no hay buen ajuste-calibración (p<0.05)
##
## Performance Measure(s)
##
## Measure Value
## 1 accuracy (ACC) 0.414634146
## 2 probability of correct classification (PCC) 0.414634146
## 3 fraction correct (FC) 0.414634146
## 4 simple matching coefficient (SMC) 0.414634146
## 5 Rand (similarity) index (RSI) 0.414634146
## 6 probability of misclassification (PMC) 0.585365854
## 7 error rate (ER) 0.585365854
## 8 fraction incorrect (FIC) 0.585365854
## 9 sensitivity (SENS) 0.687500000
## 10 recall (REC) 0.687500000
## 11 true positive rate (TPR) 0.687500000
## 12 probability of detection (PD) 0.687500000
## 13 hit rate (HR) 0.687500000
## 14 specificity (SPEC) 0.240000000
## 15 true negative rate (TNR) 0.240000000
## 16 selectivity (SEL) 0.240000000
## 17 detection rate (DR) 0.268292683
## 18 false positive rate (FPR) 0.760000000
## 19 fall-out (FO) 0.760000000
## 20 false alarm (rate) (FAR) 0.760000000
## 21 probability of false alarm (PFA) 0.760000000
## 22 false negative rate (FNR) 0.312500000
## 23 miss rate (MR) 0.312500000
## 24 false discovery rate (FDR) 0.633333333
## 25 false omission rate (FOR) 0.454545455
## 26 prevalence (PREV) 0.390243902
## 27 (positive) pre-test probability (PREP) 0.390243902
## 28 (positive) pre-test odds (PREO) 0.640000000
## 29 detection prevalence (DPREV) 0.731707317
## 30 negative pre-test probability (NPREP) 0.609756098
## 31 negative pre-test odds (NPREO) 1.562500000
## 32 no information rate (NIR) 0.609756098
## 33 weighted accuracy (WACC) 0.463750000
## 34 balanced accuracy (BACC) 0.463750000
## 35 (bookmaker) informedness (INF) -0.072500000
## 36 Youden's J statistic (YJS) -0.072500000
## 37 deltap' (DPp) -0.072500000
## 38 positive likelihood ratio (PLR) 0.904605263
## 39 negative likelihood ratio (NLR) 1.302083333
## 40 weighted likelihood ratio (WLR) 1.103344298
## 41 balanced likelihood ratio (BLR) 1.103344298
## 42 diagnostic odds ratio (DOR) 0.694736842
## 43 positive predictive value (PPV) 0.366666667
## 44 precision (PREC) 0.366666667
## 45 (positive) post-test probability (POSTP) 0.366666667
## 46 (positive) post-test odds (POSTO) 0.578947368
## 47 Bayes factor G1 (BFG1) 0.904605263
## 48 negative predictive value (NPV) 0.545454545
## 49 negative post-test probability (NPOSTP) 0.545454545
## 50 negative post-test odds (NPOSTO) 1.200000000
## 51 Bayes factor G0 (BFG0) 0.768000000
## 52 markedness (MARK) -0.087878788
## 53 deltap (DP) -0.087878788
## 54 weighted predictive value (WPV) 0.456060606
## 55 balanced predictive value (BPV) 0.456060606
## 56 F1 score (F1S) 0.478260870
## 57 Dice similarity coefficient (DSC) 0.478260870
## 58 F beta score (FBS) 0.478260870
## 59 Jaccard similarity coefficient (JSC) 0.314285714
## 60 threat score (TS) 0.314285714
## 61 critical success index (CSI) 0.314285714
## 62 Matthews' correlation coefficient (MCC) -0.079819873
## 63 Pearson's correlation (r phi) (RPHI) -0.079819873
## 64 Phi coefficient (PHIC) -0.079819873
## 65 Cramer's V (CRV) -0.079819873
## 66 proportion of positive predictions (PPP) 0.731707317
## 67 expected accuracy (EACC) 0.449137418
## 68 Cohen's kappa coefficient (CKC) -0.062634989
## 69 mutual information in bits (MI2) 0.004549947
## 70 joint entropy in bits (JE2) 1.247256579
## 71 variation of information in bits (VI2) 1.794860935
## 72 Jaccard distance (JD) 0.997471424
## 73 information quality ratio (INFQR) 0.002528576
## 74 uncertainty coefficient (UC) 0.004715182
## 75 entropy coefficient (EC) 0.004715182
## 76 proficiency (metric) (PROF) 0.004715182
## 77 deficiency (metric) (DFM) 0.995284818
## 78 redundancy (RED) 0.002522198
## 79 symmetric uncertainty (SU) 0.005044396
## 80 normalized uncertainty (NU) 0.005056737
## Warning in AUC(pred, group = as.integer(truth == namePos)): The computed AUC
## value 0.32125 will be replaced by 0.67875 which can be achieved be interchanging
## the sample labels!
## Warning in AUC(pred, group = as.integer(truth == namePos)): The computed AUC
## value 0.32125 will be replaced by 0.67875 which can be achieved be interchanging
## the sample labels!
##
## Performance Score(s)
##
## Score Value
## 1 area under curve (AUC) 0.6787500
## 2 Gini index (GINI) 0.3575000
## 3 Brier score (BS) 0.3626403
## 4 positive Brier score (PBS) 0.2332582
## 5 negative Brier score (NBS) 0.4454449
## 6 weighted Brier score (WBS) 0.3393515
## 7 balanced Brier score (BBS) 0.3393515
## Optimal Cut-off YJS
## 0.2142107 0.0000000
## Warning in HLgof.test(fit = predk, obs = as.numeric(datisck$resdair)): Found
## only 6 different groups for Hosmer-Lemesho C statistic.
## $C
##
## Hosmer-Lemeshow C statistic
##
## data: predk and as.numeric(datisck$resdair)
## X-squared = 211.41, df = 4, p-value < 2.2e-16
##
##
## $H
##
## Hosmer-Lemeshow H statistic
##
## data: predk and as.numeric(datisck$resdair)
## X-squared = 211.51, df = 8, p-value < 2.2e-16
##
## n=41 Mean absolute error=0.162 Mean squared error=0.04817
## 0.9 Quantile of absolute error=0.219
Conclusion no hay buen ajuste-calibración (p<0.05)
## Warning in AUC(pred2, group = lab2): The computed AUC value 0.32125 will be
## replaced by 0.67875 which can be achieved be interchanging the sample labels!
## $Variable1
## AUC SE low CI up CI
## 0.69696970 0.06577784 0.56804750 0.82589190
##
## $Variable2
## AUC SE low CI up CI
## 0.67875000 0.06724288 0.54695638 0.81054362
##
## $Test
##
## Hanley and McNeil test for two AUCs
##
## data: xs and xk
## z = 0.19369, p-value = 0.8464
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
## -0.1661454 0.2025848
## sample estimates:
## Difference in AUC
## 0.0182197
Conclusion no hay diferencia entre klic-shohat en discriminacion