Odds ratio with an interaction term
Usage
OrInt(b2, b3, x1, var2, var3, cov23, c = 1, alpha = 0.05)
Arguments
- b2, b3
Main-effect and interaction coefficients.
- x1
Level of the interacting variable.
- var2, var3, cov23
Variances and covariance.
- c
Change in x2.
- alpha
Level.
Value
list(odds_ratio, ci, se_log).
References
Bilder, C. R. & Loughin, T. M. (2025). Analysis of Categorical
Data with R, 2nd ed. Eqs (2.18), (3.9).
Examples
OrInt(0.5, 0.1, 2, 0.01, 0.001, -0.002)$odds_ratio
#> [1] 2.013753