# setup
set.seed(123)
library(epiR)
#> Loading required package: survival
#> Package epiR 1.0-14 is loaded
#> Type help(epi.about) for summary information
#> Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses
#>
# data
dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE)
rownames(dat) <- c("DF+", "DF-")
colnames(dat) <- c("FUS+", "FUS-")
# model
fit <-
epiR::epi.2by2(
dat = as.table(dat),
method = "cross.sectional",
conf.level = 0.95,
units = 100,
outcome = "as.columns"
)
broom::tidy(fit)
#> Warning: `cols` is now required when using unnest().
#> Please use `cols = c(s)`
#> # A tibble: 12 x 4
#> term estimate conf.low conf.high
#> <chr> <dbl> <dbl> <dbl>
#> 1 PR.strata.wald 4.01 1.43 11.2
#> 2 PR.strata.score 4.01 1.49 10.8
#> 3 OR.strata.wald 4.03 1.43 11.3
#> 4 OR.strata.cfield 4.03 NA NA
#> 5 OR.strata.score 4.03 1.49 10.9
#> 6 OR.strata.mle 4.02 1.34 14.4
#> 7 ARisk.strata.wald 0.448 0.0992 0.797
#> 8 ARisk.strata.score 0.448 0.142 0.882
#> 9 PARisk.strata.wald 0.176 -0.0225 0.375
#> 10 PARisk.strata.piri 0.176 0.0389 0.314
#> 11 AFRisk.strata.wald 0.750 0.301 0.911
#> 12 PAFRisk.strata.wald 0.542 0.0361 0.782