Calculate stratified risk estimates as per Chapter 15,

stratified_risk(data, exposure, outcome, stratifier, ci_level = 95)

Arguments

data

A dataframe providing the exposure, outcome and stratifying variable

exposure

binary variable giving the exposure status

outcome

binary variable giving the outcome status

stratifier

stratifying variable

ci_level

variable giving the limits for the confidence interval

Value

A dataframe giving an MH-adjusted risk ratio

Examples

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