Skip to contents

The RR method cannot be used in test negative designs where disease positive relates to vaccine treatable disease and disease negative relates to non vaccine treatable disease. It is only relevant in prospective designs with a vaccinated and unvaccinated group.

Usage

relative_risk_ve(
  vaccinatedCase,
  unvaccinatedCase,
  vaccinatedControl,
  unvaccinatedControl,
  confint = c(0.025, 0.975)
)

Arguments

vaccinatedCase

count of disease positive vaccine positive

unvaccinatedCase

count of disease positive vaccine negative

vaccinatedControl

count of disease negative vaccine positive

unvaccinatedControl

count of disease negative vaccine positive

confint

the confidence intervals

Value

a dataframe

Examples

tibble::tibble(
  N_vacc = 42240,
  N_unvacc = 42256,
  N_vacc_pn_pos = 49,
  N_unvacc_pn_pos = 90
) %>% dplyr::mutate(
  relative_risk_ve(N_vacc_pn_pos, N_unvacc_pn_pos, N_vacc-N_vacc_pn_pos, N_unvacc-N_unvacc_pn_pos)
)
#> # A tibble: 1 × 10
#>   N_vacc N_unvacc N_vacc_pn_pos N_unvacc_pn_pos    RR RR.q.0.025 RR.q.0.975
#>    <dbl>    <dbl>         <dbl>           <dbl> <dbl>      <dbl>      <dbl>
#> 1  42240    42256            49              90 0.545      0.384      0.772
#> # ℹ 3 more variables: VE.RR <dbl>, VE.RR.q.0.025 <dbl>, VE.RR.q.0.975 <dbl>

# dplyr::bind_rows(lapply(
#   c("katz.log", "adj.log", "bailey", "koopman", "noether",  "sinh-1", "boot"),
#   function(m) {tibble::as_tibble(
#     1-DescTools::BinomRatioCI(N_vacc_pn_pos, N_vacc, N_unvacc_pn_pos, N_unvacc, method = m)
#   ) %>% dplyr::mutate(
#     method = m
#   )}
# ))