View source: R/epi.R View source: R/zzzz-r4vn-hierarchical-extra.R
| epi | R Documentation |
epii() analyzes typed 2 by 2 counts. epi() analyzes binary outcome and
exposure variables. With by, stratum-specific estimates, a Mantel-Haenszel
common odds ratio, a pooled risk ratio, homogeneity, and interaction tests are
displayed. The stratified output also reports the crude-versus-Mantel-Haenszel
OR difference as both 100*(ORcrude-ORMH)/ORMH and
100*(ORcrude-ORMH)/ORcrude. cci()/cc() and csi()/cs() are familiar aliases.
epi(
outcome,
exposure,
by = NULL,
data = NULL,
event = NULL,
exposed = NULL,
level = 0.95,
correction = 0.5,
digits = 3,
p_digits = 3,
show = TRUE,
console = FALSE
)
cc(
outcome,
exposure,
by = NULL,
data = NULL,
event = NULL,
exposed = NULL,
level = 0.95,
correction = 0.5,
digits = 3,
p_digits = 3,
show = TRUE,
console = FALSE
)
cs(
outcome,
exposure,
by = NULL,
data = NULL,
event = NULL,
exposed = NULL,
level = 0.95,
correction = 0.5,
digits = 3,
p_digits = 3,
show = TRUE,
console = FALSE
)
epii(
a = NULL,
b = NULL,
c = NULL,
d = NULL,
by = NULL,
level = 0.95,
correction = 0.5,
digits = 3,
p_digits = 3,
show = TRUE,
console = FALSE
)
cci(a, b, c, d, ...)
csi(a, b, c, d, ...)
epi(
outcome,
exposure,
by = NULL,
data = NULL,
event = NULL,
exposed = NULL,
level = 0.95,
correction = 0.5,
digits = 3,
p_digits = 3,
show = TRUE,
console = FALSE
)
outcome |
Binary outcome variable. |
exposure |
Binary exposure variable. |
by |
For |
data |
Data frame. If |
event |
Outcome event level; defaults to the last observed level. |
exposed |
Exposure level; defaults to the last observed level. |
level |
Confidence level. |
correction |
Continuity correction used for log-scale confidence intervals when a cell is zero. |
digits, p_digits |
Decimal places for estimates and p-values. |
show |
Logical; open the formatted result in the Viewer. Default |
console |
Logical; also print the traditional text result in the Console. Default |
a, b, c, d |
Cell counts of a 2 by 2 table. |
... |
Additional arguments passed to |
The 2 by 2 layout is exposure by outcome: a exposed cases, b exposed
noncases, c unexposed cases, and d unexposed noncases.
Invisibly returns an object of class r4vn_stat.
epii(40, 10, 20, 30)
epii(by = list(
Female = c(12, 18, 8, 32),
Male = c(28, 12, 12, 18)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.