discly: discounted life-years

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

Discounted life years

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
discly(
  iso3,
  age,
  yearnow,
  sex = "Total",
  endyear = 2098,
  HR = 1,
  dr = 0,
  hiv = "both"
)

Arguments

iso3

country

age

age now

yearnow

year now

sex

Female/Male/Total

endyear

end year

HR

hazard ratio of death if relevant

dr

discount rate (exponential version)

hiv

HIV specific estimates? ('both'/'hiv+'/'hiv-')

Details

This calculates discounted life-years, potentially allowing a mortality hazard ratio. It also allows approximate HIV-specific estimates. See README for reference to methodology.

Value

discounted life years

Author(s)

Pete Dodd

Examples

1
2
discly('ZWE',5,2020)
discly('ZWE',5,2020,dr=0.03)

petedodd/discly documentation built on Feb. 9, 2021, 10:19 p.m.