burden_an: The attributable number

Description Usage Arguments Value Examples

View source: R/burden_an.R

Description

The attributable number

Usage

1
2
burden_an(demog_data, min_age_at_risk = 30, pm_concentration = 1,
  RR = 1.06, unit = 10)

Arguments

demog_data

A data frame with columns of headed "age" (the age at which each age group begins), "population" (the size of the population) and "deaths" (the number of deaths in the population).

pm_concentration

A number. The population weighted-mean PM2.5 concentration of interest.

RR

A number. Specifies the relative risk from an epidemiologiccal study.

unit

A number. Speficies the unit change associated with the relative risk (RR).

start_age

A numeric vector. The starting age of each age group

ages_at_risk

A numeric vector. The age groups exposed to risk.

Value

A numeric vector of age-specific attributable numbers.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Estimate the number of premature deaths attributable to 1mcg/m3 of PM2.5
data(singe_year_data)
year <- 2011
s <- "Persons"
population <- subset(abridged_data,
                     time == year & sex == s & measure == "Population",
                     select = c(age, value))
deaths <- subset(abridged_data,
                 time == year & sex == s & measure == "Deaths",
                 select = c(age, value))
start_age <- as.numeric(gsub(" .+", "", deaths$age))
demog_data <- data.frame(age = start_age, population, deaths)

burden_an(demog_data)

richardbroome2002/iomlifetR documentation built on Aug. 19, 2019, 10:26 p.m.