-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexamples_error.log
More file actions
4459 lines (3501 loc) · 298 KB
/
Copy pathexamples_error.log
File metadata and controls
4459 lines (3501 loc) · 298 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
ℹ Updating ClinicoPath documentation
Registered S3 methods overwritten by 'ggpp':
method from
heightDetails.titleGrob ggplot2
widthDetails.titleGrob ggplot2
Registered S3 method overwritten by 'partitions':
method from
print.equivalence lava
Registered S3 method overwritten by 'DoE.base':
method from
factorize.factor conf.design
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Registered S3 methods overwritten by 'forecast':
method from
autoplot.acf useful
fortify.ts useful
Registered S3 method overwritten by 'riskRegression':
method from
nobs.multinom broom
ℹ Loading ClinicoPath
Registered S3 methods overwritten by 'FSA':
method from
confint.boot car
hist.boot car
Registered S3 methods overwritten by 'fmsb':
method from
print.roc pROC
plot.roc pROC
Registered S3 methods overwritten by 'tangram':
method from
[.impute Hmisc
as.data.frame.impute Hmisc
print.impute Hmisc
Registered S3 methods overwritten by 'ggfortify':
method from
autoplot.Arima forecast
autoplot.acf forecast
autoplot.ar forecast
autoplot.bats forecast
autoplot.decomposed.ts forecast
autoplot.ets forecast
autoplot.forecast forecast
autoplot.glmnet parsnip
autoplot.stl forecast
autoplot.ts forecast
fitted.ar forecast
fortify.acf useful
fortify.kmeans useful
fortify.ts forecast
residuals.ar forecast
Warning: 'rgl.init' failed, will use the null device.
See '?rgl.useNULL' for ways to avoid this warning.
Registered S3 method overwritten by 'vcdExtra':
method from
print.Kappa vcd
Registered S3 method overwritten by 'spatstat.explore':
method from
plot.roc fmsb
Registered S3 methods overwritten by 'logspline':
method from
plot.logspline polspline
plot.oldlogspline polspline
print.logspline polspline
print.oldlogspline polspline
summary.logspline polspline
summary.oldlogspline polspline
Registered S3 methods overwritten by 'huge':
method from
plot.roc spatstat.explore
plot.sim lava
print.roc fmsb
print.sim lava
Registered S3 method overwritten by 'fit.models':
method from
vcov.default Hmisc
Warning: replacing previous import ‘ComplexUpset::upset’ by ‘UpSetR::upset’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘caret::precision’ by ‘cutpointr::precision’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘caret::recall’ by ‘cutpointr::recall’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘caret::specificity’ by ‘cutpointr::specificity’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘caret::sensitivity’ by ‘cutpointr::sensitivity’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘caret::cluster’ by ‘frailtypack::cluster’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::as_data_frame’ by ‘igraph::as_data_frame’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘DiagrammeR::count_automorphisms’ by ‘igraph::count_automorphisms’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::groups’ by ‘igraph::groups’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘DiagrammeR::get_edge_ids’ by ‘igraph::get_edge_ids’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::union’ by ‘igraph::union’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::select’ by ‘jmvcore::select’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘finalfit::remove_labels’ by ‘labelled::remove_labels’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::union’ by ‘lubridate::union’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::%--%’ by ‘lubridate::%--%’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::fpr’ by ‘mada::fpr’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mada::forest’ by ‘metafor::forest’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::tnr’ by ‘mlr3measures::tnr’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::precision’ by ‘mlr3measures::precision’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::tn’ by ‘mlr3measures::tn’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::fnr’ by ‘mlr3measures::fnr’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::tp’ by ‘mlr3measures::tp’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::npv’ by ‘mlr3measures::npv’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::ppv’ by ‘mlr3measures::ppv’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::auc’ by ‘mlr3measures::auc’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::tpr’ by ‘mlr3measures::tpr’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::fn’ by ‘mlr3measures::fn’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::fp’ by ‘mlr3measures::fp’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mada::fpr’ by ‘mlr3measures::fpr’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::recall’ by ‘mlr3measures::recall’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::specificity’ by ‘mlr3measures::specificity’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘metafor::se’ by ‘mlr3measures::se’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::sensitivity’ by ‘mlr3measures::sensitivity’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘lme4::lmList’ by ‘nlme::lmList’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::collapse’ by ‘nlme::collapse’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::roc’ by ‘pROC::roc’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::auc’ by ‘pROC::auc’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::rmse’ by ‘performance::rmse’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::mse’ by ‘performance::mse’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::mae’ by ‘performance::mae’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘boot::logit’ by ‘pracma::logit’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘magrittr::mod’ by ‘pracma::mod’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘magrittr::or’ by ‘pracma::or’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘magrittr::and’ by ‘pracma::and’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘cutpointr::cutpoints’ by ‘pracma::cutpoints’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::phi’ by ‘psych::phi’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘ggswim::%+%’ by ‘psych::%+%’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘pracma::logit’ by ‘psych::logit’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘pracma::polar’ by ‘psych::polar’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mada::AUC’ by ‘psych::AUC’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘GPArotation::equamax’ by ‘psych::equamax’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘ggplot2::alpha’ by ‘psych::alpha’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘GPArotation::varimin’ by ‘psych::varimin’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘magrittr::set_names’ by ‘purrr::set_names’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::simplify’ by ‘purrr::simplify’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘caret::lift’ by ‘purrr::lift’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘pracma::cross’ by ‘purrr::cross’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::compose’ by ‘purrr::compose’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::flatten_lgl’ by ‘rlang::flatten_lgl’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::splice’ by ‘rlang::splice’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::flatten_chr’ by ‘rlang::flatten_chr’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::flatten_raw’ by ‘rlang::flatten_raw’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::is_named’ by ‘rlang::is_named’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::flatten’ by ‘rlang::flatten’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::flatten_dbl’ by ‘rlang::flatten_dbl’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::invoke’ by ‘rlang::invoke’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::flatten_int’ by ‘rlang::flatten_int’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘psych::alpha’ by ‘scales::alpha’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘purrr::discard’ by ‘scales::discard’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘psych::rescale’ by ‘scales::rescale’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘pROC::cov’ by ‘stats::cov’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::lag’ by ‘stats::lag’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::filter’ by ‘stats::filter’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘pROC::smooth’ by ‘stats::smooth’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::spectrum’ by ‘stats::spectrum’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘janitor::chisq.test’ by ‘stats::chisq.test’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘pROC::var’ by ‘stats::var’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::decompose’ by ‘stats::decompose’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘janitor::fisher.test’ by ‘stats::fisher.test’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘frailtypack::cluster’ by ‘survival::cluster’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::as_data_frame’ by ‘tibble::as_data_frame’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘ggVennDiagram::unite’ by ‘tidyr::unite’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::crossing’ by ‘tidyr::crossing’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘magrittr::extract’ by ‘tidyr::extract’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘igraph::compare’ by ‘timeROC::compare’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘metafor::vif’ by ‘VIF::vif’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘VIF::vif’ by ‘car::vif’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::sensitivity’ by ‘caret::sensitivity’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘mlr3measures::specificity’ by ‘caret::specificity’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘stats::filter’ by ‘dplyr::filter’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘stats::lag’ by ‘dplyr::lag’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘jmvcore::select’ by ‘dplyr::select’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘DataExplorer::plot_histogram’ by ‘grafify::plot_histogram’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘reReg::plot’ by ‘graphics::plot’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘dplyr::select’ by ‘jmvcore::select’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘metafor::regplot’ by ‘regplot::regplot’ when loading ‘ClinicoPath’
Warning: replacing previous import ‘tibble::view’ by ‘summarytools::view’ when loading ‘ClinicoPath’
Serdar Balci MD Pathologist
https://www.serdarbalci.com/
Warning: ── Conflicts ────────────────────────────────────────── ClinicoPath conflicts
──
✖ `calculateHScore` masks `ClinicoPath::calculateHScore()`.
✖ `calculateIHCDistance` masks `ClinicoPath::calculateIHCDistance()`.
✖ `calculateIHCMarkerSummary` masks `ClinicoPath::calculateIHCMarkerSummary()`.
… and more.
ℹ Did you accidentally source a file rather than using `load_all()`?
Run `rm(list = c("calculateHScore", "calculateIHCDistance",
"calculateIHCMarkerSummary", "calculateIHCSilhouette",
"convertIHCMarkerToNumeric", "convertIHCToNumeric", "formatIHCPValue",
"getIHCColorPalette", "getIHCSignificanceStars", "getIHCTheme",
"showIHCDataRequirements", "validateIHCClustering", "validateIHCData"))` to
remove the conflicts.
── Running 858 example files ──────────────────────────────────── ClinicoPath ──
ℹ Loading ClinicoPath
Serdar Balci MD Pathologist
https://www.serdarbalci.com/
> data("advancedraincloud_data")
> data("advancedraincloud_baseline")
> data("advancedraincloud_endpoint")
> data("advancedraincloud_change")
> str(advancedraincloud_data)
tibble [900 × 15] (S3: tbl_df/tbl/data.frame)
$ patient_id : chr [1:900] "PT001" "PT001" "PT001" "PT002" ...
$ treatment_arm : Factor w/ 2 levels "Placebo","Drug A": 1 1 1 1 1 1 1 1 1 1 ...
$ time_point : Factor w/ 3 levels "Baseline","Week 4",..: 1 2 3 1 2 3 1 2 3 1 ...
$ visit_number : int [1:900] 1 2 3 1 2 3 1 2 3 1 ...
$ age : num [1:900] 71 71 71 48 48 48 59 59 59 63 ...
$ gender : Factor w/ 2 levels "Female","Male": 2 2 2 2 2 2 1 1 1 2 ...
$ disease_stage : Factor w/ 2 levels "Early","Advanced": 1 1 1 1 1 1 1 1 1 1 ...
$ biomarker_status : Factor w/ 2 levels "Negative","Positive": 1 1 1 1 1 1 2 2 2 1 ...
$ tumor_size_change : num [1:900] 0 NA -21.2 0 NA ...
$ biomarker_level : num [1:900] 55.6 42.6 42.6 80.7 NA ...
$ qol_score : num [1:900] 69.9 63.6 63.6 41 37.9 ...
$ pain_score : Ord.factor w/ 11 levels "0"<"1"<"2"<"3"<..: 5 5 NA 5 5 NA 6 6 NA 9 ...
$ tumor_responder : Factor w/ 4 levels "Progressive Disease",..: 2 NA 3 2 NA 1 2 3 NA 2 ...
$ age_group : Factor w/ 2 levels "< 65 years","≥ 65 years": 2 2 2 1 1 1 1 1 1 1 ...
$ baseline_biomarker_high: Factor w/ 2 levels "High","Normal": 2 2 2 2 2 2 2 2 2 1 ...
> summary(advancedraincloud_baseline)
patient_id treatment_arm age gender disease_stage
Length:300 Placebo:150 Min. :19.00 Female:116 Early :212
Class :character Drug A :150 1st Qu.:47.00 Male :184 Advanced: 88
Mode :character Median :55.00
Mean :54.73
3rd Qu.:63.00
Max. :87.00
biomarker_status tumor_size_change biomarker_level qol_score
Negative:183 Min. :0 Min. : 11.12 Min. :20.00
Positive:117 1st Qu.:0 1st Qu.: 53.02 1st Qu.:42.75
Median :0 Median : 92.23 Median :52.28
Mean :0 Mean : 141.50 Mean :50.91
3rd Qu.:0 3rd Qu.: 167.30 3rd Qu.:60.43
Max. :0 Max. :1584.03 Max. :80.00
pain_score tumor_responder age_group
6 :57 Progressive Disease: 0 < 65 years:239
7 :52 Stable Disease :300 ≥ 65 years: 61
5 :50 Partial Response : 0
8 :37 Complete Response : 0
4 :35
9 :31
(Other):38
baseline_biomarker_high
High :136
Normal:164
> table(is.na(advancedraincloud_data$tumor_size_change),
+ advancedraincloud_data$time_point, advancedraincloud_data$treatment_arm)
, , = Placebo
Baseline Week 4 Week 12
FALSE 150 130 97
TRUE 0 20 53
, , = Drug A
Baseline Week 4 Week 12
FALSE 150 134 119
TRUE 0 16 31
> with(advancedraincloud_endpoint, table(tumor_responder,
+ treatment_arm, useNA = "ifany"))
treatment_arm
tumor_responder Placebo Drug A
Progressive Disease 42 2
Stable Disease 44 28
Partial Response 7 59
Complete Response 4 30
<NA> 53 31
> nrow(advancedraincloud_change)
[1] 130
> data(bujang_table2_validation)
> print(bujang_table2_validation)
prevalence sensitivity specificity ci_width n_sens_expected n_spec_expected
1 0.05 0.95 0.95 0.1 940 105
2 0.05 0.70 0.70 0.1 3410 379
3 0.10 0.95 0.95 0.1 940 105
4 0.10 0.90 0.90 0.2 440 49
5 0.20 0.90 0.90 0.2 220 49
6 0.50 0.90 0.90 0.2 88 88
7 0.50 0.80 0.80 0.2 140 140
8 0.90 0.95 0.95 0.2 49 941
n_total_expected
1 940
2 3410
3 940
4 440
5 220
6 88
7 140
8 941
> test1 <- bujang_table2_validation[1, ]
> cat("Prevalence:", test1$prevalence * 100, "%\n")
Prevalence: 5 %
> cat("Targets: Sens =", test1$sensitivity, ", Spec =",
+ test1$specificity, "\n")
Targets: Sens = 0.95 , Spec = 0.95
> cat("Expected total N:", test1$n_total_expected, "\n")
Expected total N: 940
> low_prev <- bujang_table2_validation[bujang_table2_validation$prevalence ==
+ 0.05, ]
> high_prev <- bujang_table2_validation[bujang_table2_validation$prevalence ==
+ 0.9, ]
> cat("\nLow prevalence (5%) scenarios:\n")
Low prevalence (5%) scenarios:
> print(low_prev[, c("sensitivity", "specificity", "ci_width",
+ "n_total_expected")])
sensitivity specificity ci_width n_total_expected
1 0.95 0.95 0.1 940
2 0.70 0.70 0.1 3410
> cat("\nHigh prevalence (90%) scenarios:\n")
High prevalence (90%) scenarios:
> print(high_prev[, c("sensitivity", "specificity",
+ "ci_width", "n_total_expected")])
sensitivity specificity ci_width n_total_expected
8 0.95 0.95 0.2 941
> data(cardiac_joint_data)
> library(ggplot2)
> ggplot(cardiac_joint_data, aes(x = visit_time, y = log(nt_probnp),
+ color = nyha_class)) + geom_smooth(method = "loess") + labs(title = "NT-proBNP Trajectories by NYHA Class",
+ x = "Time (months)", y = "log(NT-proBNP)")
`geom_smooth()` using formula = 'y ~ x'
> data(cd4_joint_data)
> library(ggplot2)
> ggplot(cd4_joint_data, aes(x = visit_time, y = cd4_count,
+ color = art_adherence)) + geom_smooth(method = "loess") +
+ labs(title = "CD4 Trajectories by ART Adherence", x = "Time (months)",
+ y = "CD4 Count (cells/uL)")
`geom_smooth()` using formula = 'y ~ x'
> data(chisqposttest_test_data)
> str(chisqposttest_test_data)
'data.frame': 300 obs. of 14 variables:
$ PatientID : int 1 2 3 4 5 6 7 8 9 10 ...
$ Treatment : Factor w/ 2 levels "Standard","Experimental": 1 1 2 1 1 2 1 2 1 1 ...
$ Response : Factor w/ 2 levels "No Response",..: 1 1 1 1 1 2 1 2 1 1 ...
$ Sex : Factor w/ 2 levels "Male","Female": 2 2 2 2 1 1 2 2 2 2 ...
$ TumorGrade : Factor w/ 3 levels "Grade 1","Grade 2",..: 3 2 1 2 3 3 1 2 NA 3 ...
$ TumorStage : Factor w/ 3 levels "Stage I","Stage II",..: 3 3 1 2 2 3 2 2 3 3 ...
$ Institution : Factor w/ 4 levels "Hospital A","Hospital B",..: 1 1 3 1 3 4 1 1 3 1 ...
$ QualityScore : Factor w/ 2 levels "High","Low": 1 2 2 1 1 1 1 1 2 1 ...
$ RandomVar1 : Factor w/ 3 levels "Group A","Group B",..: 2 2 2 2 1 2 1 1 1 2 ...
$ RandomVar2 : Factor w/ 2 levels "Type X","Type Y": 1 2 2 1 2 2 1 2 1 1 ...
$ RareCategory : Factor w/ 3 levels "Common","Uncommon",..: 2 2 1 1 1 1 2 1 1 1 ...
$ BinaryOutcome : Factor w/ 2 levels "Negative","Positive": 1 2 1 1 2 1 2 1 1 1 ...
$ AgeGroup : Factor w/ 3 levels "Young","Middle",..: 3 2 1 1 3 2 2 2 1 2 ...
$ BiomarkerStatus: Factor w/ 2 levels "Negative","Positive": 2 1 2 1 2 2 2 1 1 1 ...
- attr(*, "description")= chr "Test dataset for chisqposttest function with known associations"
- attr(*, "associations")=List of 4
..$ strong : chr "Treatment -> Response"
..$ moderate: chr [1:2] "TumorGrade -> TumorStage" "AgeGroup -> BiomarkerStatus"
..$ weak : chr [1:2] "Institution -> QualityScore" "RareCategory -> BinaryOutcome"
..$ none : chr "RandomVar1 ⊥ RandomVar2"
- attr(*, "created")= Date[1:1], format: "2025-07-02"
- attr(*, "sample_size")= num 300
> chisqposttest(data = chisqposttest_test_data, rows = "Treatment",
+ cols = "Response", posthoc = "bonferroni")
CHI-SQUARE POST-HOC TESTS
<div style='padding: 15px; background-color: #fff3cd; border: 1px
solid #ffc107; color: #856404;'>Warning:33% of cells have expected
counts < 5. Chi-square test assumptions violated. Use Fisher's exact
test for more reliable results.
Chi-Square Test Results
──────────────────────────────────────────────
Statistic Value df p-value
──────────────────────────────────────────────
Chi-Square 66.63312 2 < .0000001
──────────────────────────────────────────────
<table style="border-collapse: collapse; width: 100%; margin: 15px 0;
font-family: 'Segoe UI', system-ui, sans-serif; font-size:
13px; background-color: white; box-shadow: 0 1px 3px
rgba(0,0,0,0.1);">
<tr style="background-color: #e3f2fd;">
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #f8f9fa;">
<div style="font-weight: bold; color: #495057;">
Response →
<br/>
Treatment ↓
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Response
<div style="font-size: 13px; color: #212529;">No Response
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Response
<div style="font-size: 13px; color: #212529;">Response
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Treatment
<div style="font-size: 13px; color: #212529;">Standard
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">88
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">28
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Treatment
<div style="font-size: 13px; color: #212529;">Experimental
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">49
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">130
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Treatment
<div style="font-size: 13px; color: #212529;">NA
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">2
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">3
<div style="padding: 10px; background-color: #e3f2fd; border-left: 4px
solid #1976d2; margin: 8px 0;">
Method notice:
Pairwise comparisons with expected cell counts < 5 are automatically
analysed with Fisher's exact test; the reported p-values use that
exact method.
Pairwise Comparison Results
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Comparison Test Method Chi-Square p-value Adj. p-value Effect Size (Phi) 95% CI (Phi) Significant
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Standard vs Experimental Chi-square 66.5303419 < .0000001 < .0000001 0.47500000 Yes
Standard vs NA Fisher's exact 3.2350414 0.1056590 0.4226362 0.16400000 No
Experimental vs NA Fisher's exact 0.3870168 0.6181533 1.0000000 0.04600000 No
No Response vs Response Fisher's exact 66.6331188 < .0000001 < .0000001 0.47100000 Yes
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> chisqposttest(data = chisqposttest_test_data, rows = "TumorGrade",
+ cols = "TumorStage", posthoc = "fdr")
CHI-SQUARE POST-HOC TESTS
<div style='padding: 15px; background-color: #fff3cd; border: 1px
solid #ffc107; color: #856404;'>Warning:25% of cells have expected
counts < 5. Chi-square test assumptions violated. Use Fisher's exact
test for more reliable results.
Chi-Square Test Results
──────────────────────────────────────────────
Statistic Value df p-value
──────────────────────────────────────────────
Chi-Square 109.4691 6 < .0000001
──────────────────────────────────────────────
<table style="border-collapse: collapse; width: 100%; margin: 15px 0;
font-family: 'Segoe UI', system-ui, sans-serif; font-size:
13px; background-color: white; box-shadow: 0 1px 3px
rgba(0,0,0,0.1);">
<tr style="background-color: #e3f2fd;">
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #f8f9fa;">
<div style="font-weight: bold; color: #495057;">
TumorStage →
<br/>
TumorGrade ↓
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorStage
<div style="font-size: 13px; color: #212529;">Stage I
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorStage
<div style="font-size: 13px; color: #212529;">Stage II
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorStage
<div style="font-size: 13px; color: #212529;">Stage III
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorGrade
<div style="font-size: 13px; color: #212529;">Grade 1
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">56
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">24
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">7
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorGrade
<div style="font-size: 13px; color: #212529;">Grade 2
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">28
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">71
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">22
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorGrade
<div style="font-size: 13px; color: #212529;">Grade 3
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">6
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">32
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">49
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">TumorGrade
<div style="font-size: 13px; color: #212529;">NA
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">0
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">3
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">2
<div style="padding: 10px; background-color: #e3f2fd; border-left: 4px
solid #1976d2; margin: 8px 0;">
Method notice:
Pairwise comparisons with expected cell counts < 5 are automatically
analysed with Fisher's exact test; the reported p-values use that
exact method.
Pairwise Comparison Results
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Comparison Test Method Chi-Square p-value Adj. p-value Effect Size (Phi) 95% CI (Phi) Significant
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Grade 1 vs Grade 2 Chi-square 35.741905 < .0000001 < .0000001 0.4150000 Yes
Grade 1 vs Grade 3 Chi-square 72.965438 < .0000001 < .0000001 0.6480000 Yes
Grade 1 vs NA Fisher's exact 9.846232 0.0045976 0.0059112 0.3270000 Yes
Grade 2 vs Grade 3 Chi-square 34.637706 < .0000001 < .0000001 0.4080000 Yes
Grade 2 vs NA Fisher's exact 2.358454 0.2905058 0.3268190 0.1370000 No
Grade 3 vs NA Fisher's exact 1.242070 0.5701787 0.5701787 0.1160000 No
Stage I vs Stage II Fisher's exact 46.531754 < .0000001 < .0000001 0.4600000 Yes
Stage I vs Stage III Fisher's exact 74.117520 < .0000001 < .0000001 0.6600000 Yes
Stage II vs Stage III Fisher's exact 28.625696 0.0000014 0.0000021 0.3690000 Yes
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> chisqposttest(data = chisqposttest_test_data, rows = "RandomVar1",
+ cols = "RandomVar2", posthoc = "bonferroni")
CHI-SQUARE POST-HOC TESTS
character(0)
Chi-Square Test Results
─────────────────────────────────────────────
Statistic Value df p-value
─────────────────────────────────────────────
Chi-Square 6.359561 2 0.0415948
─────────────────────────────────────────────
<table style="border-collapse: collapse; width: 100%; margin: 15px 0;
font-family: 'Segoe UI', system-ui, sans-serif; font-size:
13px; background-color: white; box-shadow: 0 1px 3px
rgba(0,0,0,0.1);">
<tr style="background-color: #e3f2fd;">
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #f8f9fa;">
<div style="font-weight: bold; color: #495057;">
RandomVar2 →
<br/>
RandomVar1 ↓
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RandomVar2
<div style="font-size: 13px; color: #212529;">Type X
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RandomVar2
<div style="font-size: 13px; color: #212529;">Type Y
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RandomVar1
<div style="font-size: 13px; color: #212529;">Group A
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">47
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">49
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RandomVar1
<div style="font-size: 13px; color: #212529;">Group B
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">51
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">57
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RandomVar1
<div style="font-size: 13px; color: #212529;">Group C
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">61
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">35
character(0)
Pairwise Comparison Results
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Comparison Test Method Chi-Square p-value Adj. p-value Effect Size (Phi) 95% CI (Phi) Significant
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Group A vs Group B Chi-square 0.06136889 0.8043453 1.0000000 0.01700000 No
Group A vs Group C Chi-square 4.14814815 0.0416801 0.1667203 0.14700000 No
Group B vs Group C Chi-square 5.46676048 0.0193815 0.0775261 0.16400000 No
Type X vs Type Y Chi-square 6.35956109 0.0415948 0.1663791 0.14600000 No
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> chisqposttest(data = chisqposttest_test_data, rows = "RareCategory",
+ cols = "BinaryOutcome", posthoc = "fdr")
CHI-SQUARE POST-HOC TESTS
character(0)
Chi-Square Test Results
─────────────────────────────────────────────
Statistic Value df p-value
─────────────────────────────────────────────
Chi-Square 24.74713 2 0.0000042
─────────────────────────────────────────────
<table style="border-collapse: collapse; width: 100%; margin: 15px 0;
font-family: 'Segoe UI', system-ui, sans-serif; font-size:
13px; background-color: white; box-shadow: 0 1px 3px
rgba(0,0,0,0.1);">
<tr style="background-color: #e3f2fd;">
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #f8f9fa;">
<div style="font-weight: bold; color: #495057;">
BinaryOutcome →
<br/>
RareCategory ↓
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">BinaryOutcome
<div style="font-size: 13px; color: #212529;">Negative
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">BinaryOutcome
<div style="font-size: 13px; color: #212529;">Positive
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RareCategory
<div style="font-size: 13px; color: #212529;">Common
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">144
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">56
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RareCategory
<div style="font-size: 13px; color: #212529;">Uncommon
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">53
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">28
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">RareCategory
<div style="font-size: 13px; color: #212529;">Rare
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">3
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">16
character(0)
Pairwise Comparison Results
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Comparison Test Method Chi-Square p-value Adj. p-value Effect Size (Phi) 95% CI (Phi) Significant
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Common vs Uncommon Chi-square 1.186668 0.2760028 0.2760028 0.06500000 No
Common vs Rare Chi-square 24.843523 0.0000006 0.0000025 0.33700000 Yes
Uncommon vs Rare Chi-square 15.392437 0.0000873 0.0001164 0.39200000 Yes
Negative vs Positive Chi-square 24.747135 0.0000042 0.0000085 0.28700000 Yes
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> chisqposttest(data = chisqposttest_test_data, rows = "Treatment",
+ cols = "Sex", excl = TRUE)
CHI-SQUARE POST-HOC TESTS
character(0)
Chi-Square Test Results
───────────────────────────────────────────────
Statistic Value df p-value
───────────────────────────────────────────────
Chi-Square 0.02066086 1 0.8857067
───────────────────────────────────────────────
<table style="border-collapse: collapse; width: 100%; margin: 15px 0;
font-family: 'Segoe UI', system-ui, sans-serif; font-size:
13px; background-color: white; box-shadow: 0 1px 3px
rgba(0,0,0,0.1);">
<tr style="background-color: #e3f2fd;">
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #f8f9fa;">
<div style="font-weight: bold; color: #495057;">
Sex →
<br/>
Treatment ↓
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom: 2px;">Sex
<div style="font-size: 13px; color: #212529;">Male
<th style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center; background-color: #e3f2fd;">
<div style="font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom: 2px;">Sex
<div style="font-size: 13px; color: #212529;">Female
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Treatment
<div style="font-size: 13px; color: #212529;">Standard
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">50
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">62
<th style="border: 1px solid #e1e5e9; padding: 8px; background-color:
#e3f2fd; font-weight: bold;">
<div style="font-size: 11px; color: #6c757d; margin-bottom:
2px;">Treatment
<div style="font-size: 13px; color: #212529;">Experimental
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">81
<td style="border: 1px solid #e1e5e9; padding: 8px; text-align:
center;">97
<div style='padding: 15px; background-color: #fff3cd; border: 1px
solid #ffc107;'>Post-hoc Testing Not Performed: Overall chi-square
test is not significant (p = 0.886 ≥ 0.05). Post-hoc pairwise
comparisons are only valid when the overall test is significant.
Running pairwise tests after a non-significant omnibus test increases
Type I error (false positives) and constitutes data dredging.
> data(decision_test)
> head(decision_test)
# A tibble: 6 × 5
patient_id GoldStandard NewTest age sex
<chr> <fct> <fct> <dbl> <fct>
1 PT001 Positive Negative 31 Male
2 PT002 Positive Positive 59 Male
3 PT003 Negative Negative 69 Male
4 PT004 Positive Negative 80 Female
5 PT005 Negative Negative 38 Male
6 PT006 Negative Negative 41 Male
> data(decisioncompare_common)
> decisioncompare(data = decisioncompare_common, gold = "GoldStandard",
+ goldPositive = "Positive", test1 = "Test1", test1Positive = "Positive",
+ test2 = "Test2", test2Positive = "Positive", test3Positive = "",
+ ci = TRUE)
COMPARE MEDICAL DECISION TESTS
character(0)
Test 1 - Recoded Data
────────────────────────────────────────────────────────────────
Gold Positive Gold Negative Total
────────────────────────────────────────────────────────────────
Test Positive 83.00000 9.000000 92.00000
Test Negative 21.00000 47.000000 68.00000
Total 104.00000 56.000000 160.00000
────────────────────────────────────────────────────────────────
Test 1 - Confidence Intervals
────────────────────────────────────────────────────────────────────────
Decision Statistics Estimate Lower Upper
────────────────────────────────────────────────────────────────────────
Apparent prevalence 57.50000 49.44874 65.26819
True prevalence 65.00000 57.07166 72.36120
Test sensitivity 79.80769 70.80542 87.04455
Test specificity 83.92857 71.67203 92.37813
Diagnostic accuracy 81.25000 74.32805 86.97742
Positive predictive value 90.21739 82.24035 95.42839
Negative predictive value 69.11765 56.74392 79.76365
Proportion of false positives 16.07143 7.62187 28.32797
Proportion of false negative 20.19231 12.95545 29.19458
False Discovery Rate 9.78261 4.57161 17.75965
False Omission Rate 30.88235 20.23635 43.25608
────────────────────────────────────────────────────────────────────────
Test 2 - Recoded Data
────────────────────────────────────────────────────────────────
Gold Positive Gold Negative Total