indirect_adjust: Indirect adjustment.

Description Usage Arguments Value References Examples

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
# 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 Feb. 8, 2021, 1:39 p.m.