prop_ratio_cmh {junco} | R Documentation |
Relative Risk CMH Statistic
Description
Calculates the relative risk which is defined as the ratio between the response rates between the experimental treatment group and the control treatment group, adjusted for stratification factors by applying Cochran-Mantel-Haenszel (CMH) weights.
Usage
prop_ratio_cmh(rsp, grp, strata, conf_level = 0.95)
Arguments
rsp |
( |
grp |
( |
strata |
( |
conf_level |
( |
Value
a list with elements rel_risk_ci
and pval
.
Examples
set.seed(2)
rsp <- sample(c(TRUE, FALSE), 100, TRUE)
grp <- sample(c("Placebo", "Treatment"), 100, TRUE)
grp <- factor(grp, levels = c("Placebo", "Treatment"))
strata_data <- data.frame(
"f1" = sample(c("a", "b"), 100, TRUE),
"f2" = sample(c("x", "y", "z"), 100, TRUE),
stringsAsFactors = TRUE
)
prop_ratio_cmh(
rsp = rsp, grp = grp, strata = interaction(strata_data),
conf_level = 0.90
)
[Package junco version 0.1.1 Index]