indirect_adjust: Indirect adjustment.

indirect_adjustR Documentation

Indirect adjustment.

Description

Find standardized incidence ratios and standardized mortality ratios with indirect adjustment.

Usage

indirect_adjust(
  df,
  study_count,
  study_pop,
  ref_count,
  ref_pop,
  level = 95,
  decimals = 2
)

Arguments

df

A data frame.

study_count

Number of events in study group.

study_pop

Number of person-years at risk in study group.

ref_count

Number of events in referent group.

ref_pop

Number of person-years at risk in referent group.

level

Confidence level as percentage.

decimals

Number of decimal places in expected counts, SIR's and confidence intervals.

Value

A data table with the following fields:

observed

Number of events in study group

expected

Number of events expected in study group based on rate in referent group

sir

SIR: Standardized incidence (or mortality) ratio

sir_lci

Lower confidence limit of SIR using method of Garwood (1936)

sir_uci

Upper confidence limit of SIR by Garwood

References

Garwood F (1936) Fiducial limits for the Poisson distribution, Biometrika 28:437-442.

Examples

# standardized incidence ratio of US cancer incidence for males
#   compared to females
library(dplyr)
sir_by_year <- cancer %>%
  group_by(Year) %>%
  group_modify(~ reshape_for_SIR(.x, agegroup, Sex, "Male", n, pop)) %>%
  group_modify(~ indirect_adjust(.x, study_count, study_pop, ref_count, ref_pop))

mlaviolet/tidyepi documentation built on May 14, 2022, 10:04 p.m.