R/pool_odds_ratio.R
pool_odds_ratio.Rd
pool_odds_ratio
Calculates the pooled odds ratio and
confidence interval.
pool_odds_ratio(object, conf.level = 0.95, dfcom = NULL)
An object of class 'mistats' ('Multiply Imputed Statistical Analysis')
Confidence level of the confidence intervals.
Complete data degrees of freedom. Default
number is taken from function odds_ratio
The pooled OR and confidence intervals.
library(magrittr)
lbpmilr %>%
df2milist(impvar="Impnr") %>%
with(expr=odds_ratio(Chronic ~ Radiation)) %>%
pool_odds_ratio()
#> pooled OR 95 CI low 95 CI high
#> [1,] 3.193372 1.61868 6.299962
#> attr(,"class")
#> [1] "mipool"
# Same as
imp_dat <- df2milist(lbpmilr, impvar="Impnr")
ra <- with(imp_dat, expr=odds_ratio(Chronic ~ Radiation))
res <- pool_odds_ratio(ra)