Computes the odds ratio and confidence interval from exact2x2
and returns a formatted character string (e.g. "0.8 (0.3, 2.1)").
Useful for inline text reporting or table presentation.
Usage
cbe_exact2x2_ci(
data,
variable = NULL,
by = NULL,
digits = 1,
conf.level = 0.95,
midp = NULL,
...
)
exact2x2_ci(
data,
variable = NULL,
by = NULL,
digits = 1,
conf.level = 0.95,
midp = NULL,
...
)Arguments
- data
A data frame or a 2x2 table/matrix.
- variable
Character string column name (if
datais a data frame).- by
Character string grouping column name (if
datais a data frame).- digits
Integer number of decimal places for rounding (default 1).
- conf.level
Confidence level (default 0.95).
- midp
Logical or
NULL(default). IfNULL, automatically defaults toTRUEif any cell count is zero.- ...
Additional arguments passed to
exact2x2.
