Calculate stratified risk estimates as per Chapter 15,
stratified_risk(data, exposure, outcome, stratifier, ci_level = 95)
A dataframe providing the exposure, outcome and stratifying variable
binary variable giving the exposure status
binary variable giving the outcome status
stratifying variable
variable giving the limits for the confidence interval
A dataframe giving an MH-adjusted risk ratio
data(tolbutamide)
stratified_risk(tolbutamide, exposure = tolbutamide, outcome = dead,
stratifier = age)
#> Joining with `by = join_by(age)`
#> Joining with `by = join_by(age)`
#> Joining with `by = join_by(age)`
#> # A tibble: 2 × 8
#> age n exposed outcome rrmh var lci uci
#> <chr> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 <55y 226 106 13 1.33 0.0671 0.798 2.20
#> 2 ge55y 183 98 38 1.33 0.0671 0.798 2.20