我很想知道从<代码>epi.tests/中获取“点估计和95%的 CI”部分,在r, as a
data.frame>。
library(epiR)
#> Loading required package: survival
#> Package epiR 2.0.61 is loaded
#> Type help(epi.about) for summary information
#> Type browseVignettes(package = epiR ) to learn how to use epiR for applied epidemiological analyses
#>
dat.v01 <- c(670,202,74,640)
rval.tes01 <- epi.tests(dat.v01)
rval.tes01
#> Outcome + Outcome - Total
#> Test + 670 202 872
#> Test - 74 640 714
#> Total 744 842 1586
#>
#> Point estimates and 95% CIs:
#> --------------------------------------------------------------
#> Apparent prevalence * 0.55 (0.52, 0.57)
#> True prevalence * 0.47 (0.44, 0.49)
#> Sensitivity * 0.90 (0.88, 0.92)
#> Specificity * 0.76 (0.73, 0.79)
#> Positive predictive value * 0.77 (0.74, 0.80)
#> Negative predictive value * 0.90 (0.87, 0.92)
#> Positive likelihood ratio 3.75 (3.32, 4.24)
#> Negative likelihood ratio 0.13 (0.11, 0.16)
#> False T+ proportion for true D- * 0.24 (0.21, 0.27)
#> False T- proportion for true D+ * 0.10 (0.08, 0.12)
#> False T+ proportion for T+ * 0.23 (0.20, 0.26)
#> False T- proportion for T- * 0.10 (0.08, 0.13)
#> Correctly classified proportion * 0.83 (0.81, 0.84)
#> --------------------------------------------------------------
#> * Exact CIs
class(rval.tes01)
#> [1] "epi.tests"
unclass(rval.tes01)
#> $detail
#> statistic est lower upper
#> 1 ap 0.54981084 0.52493735 0.5744996
#> 2 tp 0.46910467 0.44430554 0.4940184
#> 3 se 0.90053763 0.87674618 0.9210923
#> 4 sp 0.76009501 0.72977646 0.7885803
#> 5 diag.ac 0.82597730 0.80640489 0.8443346
#> 6 diag.or 28.68611185 21.51819166 38.2417364
#> 7 nndx 1.51370055 1.40910043 1.6487431
#> 8 youden 0.66063265 0.60652264 0.7096726
#> 9 pv.pos 0.76834862 0.73889263 0.7959784
#> 10 pv.neg 0.89635854 0.87163929 0.9177402
#> 11 lr.pos 3.75372618 3.32068844 4.2432346
#> 12 lr.neg 0.13085517 0.10506432 0.1629771
#> 13 p.rout 0.45018916 0.42550037 0.4750627
#> 14 p.rin 0.54981084 0.52493735 0.5744996
#> 15 p.tpdn 0.23990499 0.21141968 0.2702235
#> 16 p.tndp 0.09946237 0.07890770 0.1232538
#> 17 p.dntp 0.23165138 0.20402157 0.2611074
#> 18 p.dptn 0.10364146 0.08225983 0.1283607
#>
#> $tab
#> Outcome + Outcome - Total
#> Test + 670 202 872
#> Test - 74 640 714
#> Total 744 842 1586
#>
#> $method
#> [1] "exact"
#>
#> $digits
#> [1] 2
#>
#> $conf.level
#> [1] 0.95
str(rval.tes01)
#> List of 5
#> $ detail : data.frame : 18 obs. of 4 variables:
#> ..$ statistic: chr [1:18] "ap" "tp" "se" "sp" ...
#> ..$ est : num [1:18] 0.55 0.469 0.901 0.76 0.826 ...
#> ..$ lower : num [1:18] 0.525 0.444 0.877 0.73 0.806 ...
#> ..$ upper : num [1:18] 0.574 0.494 0.921 0.789 0.844 ...
#> $ tab : data.frame : 3 obs. of 3 variables:
#> ..$ Outcome +: AsIs chr [1:3] "670" " 74" "744"
#> ..$ Outcome -: AsIs chr [1:3] "202" "640" "842"
#> ..$ Total : AsIs chr [1:3] " 872" " 714" "1586"
#> $ method : chr "exact"
#> $ digits : num 2
#> $ conf.level: num 0.95
#> - attr(*, "class")= chr "epi.tests"
rval.tes01$detail
#> statistic est lower upper
#> 1 ap 0.54981084 0.52493735 0.5744996
#> 2 tp 0.46910467 0.44430554 0.4940184
#> 3 se 0.90053763 0.87674618 0.9210923
#> 4 sp 0.76009501 0.72977646 0.7885803
#> 5 diag.ac 0.82597730 0.80640489 0.8443346
#> 6 diag.or 28.68611185 21.51819166 38.2417364
#> 7 nndx 1.51370055 1.40910043 1.6487431
#> 8 youden 0.66063265 0.60652264 0.7096726
#> 9 pv.pos 0.76834862 0.73889263 0.7959784
#> 10 pv.neg 0.89635854 0.87163929 0.9177402
#> 11 lr.pos 3.75372618 3.32068844 4.2432346
#> 12 lr.neg 0.13085517 0.10506432 0.1629771
#> 13 p.rout 0.45018916 0.42550037 0.4750627
#> 14 p.rin 0.54981084 0.52493735 0.5744996
#> 15 p.tpdn 0.23990499 0.21141968 0.2702235
#> 16 p.tndp 0.09946237 0.07890770 0.1232538
#> 17 p.dntp 0.23165138 0.20402157 0.2611074
#> 18 p.dptn 0.10364146 0.08225983 0.1283607