Skip to contents

$$IRR_{MH} = \sum_i a_i T_{0i}/T_i \big/ \sum_i b_i T_{1i}/T_i$$ with the Greenland & Robins (1985) standard error $$SE = \sqrt{\sum_i m_i T_{1i}T_{0i}/T_i^2} \big/ \sqrt{(\sum_i a_i T_{0i}/T_i)(\sum_i b_i T_{1i}/T_i)}$$ Person-time weighting lets sparse strata contribute instead of being dropped.

Usage

Mhrate(strata, confidence = 0.95)

Arguments

strata

List of length-4 vectors or lists (a, T1, b, T0): exposed cases, exposed person-time, unexposed cases, unexposed person-time.

confidence

One of 0.90, 0.95, 0.99.

Value

Named list with estimate, ln_estimate, se_ln, ci_lower, ci_upper, numerator, denominator, n_strata, confidence, method.

References

Greenland & Robins (1985) Biometrics 41:55-68.

Examples

Mhrate(list(c(10, 1000, 5, 1000), c(20, 2000, 15, 2500)))
#> $estimate
#> [1] 1.757576
#> 
#> $ln_estimate
#> [1] 0.5639354
#> 
#> $se_ln
#> [1] 0.2896689
#> 
#> $ci_lower
#> [1] 0.9962022
#> 
#> $ci_upper
#> [1] 3.100849
#> 
#> $numerator
#> [1] 16.11111
#> 
#> $denominator
#> [1] 9.166667
#> 
#> $n_strata
#> [1] 2
#> 
#> $confidence
#> [1] 0.95
#> 
#> $method
#> [1] "Mantel-Haenszel rate ratio (Greenland & Robins 1985)"
#>