R/pool_risk_ratio.R
pool_risk_ratio.Rd
pool_risk_ratio
Calculates the pooled risk ratio and
confidence interval.
pool_risk_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 risk_ratio
The pooled RR and confidence intervals.
library(magrittr)
lbpmilr %>%
df2milist(impvar="Impnr") %>%
with(expr=risk_ratio(Chronic ~ Radiation)) %>%
pool_risk_ratio()
#> pooled RR 95 CI low 95 CI high
#> [1,] 1.912204 1.29973 2.813295
#> attr(,"class")
#> [1] "mipool"
# Same as
imp_dat <- df2milist(lbpmilr, impvar="Impnr")
ra <- with(imp_dat, expr=risk_ratio(Chronic ~ Radiation))
res <- pool_risk_ratio(ra)