lt_a_pas: PAS a(x) rule of thumb.

View source: R/nAx.R

lt_a_pasR Documentation

PAS a(x) rule of thumb.

Description

a(x) is calculated following the Coale-Demeny rules for ages 0 and 1-4, and assumes interval midpoints in higher ages. This is just a rule of thumb. This procedure is as found in the PAS spreadsheet LTPOPDTH.XLS.

Usage

lt_a_pas(
  nMx,
  AgeInt,
  a0rule = "ak",
  IMR = NA,
  Sex = "m",
  region = "w",
  SRB = 1.05,
  OAG = TRUE
)

Arguments

nMx

numeric. Event exposure mortality rates.

AgeInt

integer. Vector of age interval widths.

a0rule

character. Either "ak" (default) or "cd".

IMR

numeric. Optional. q0, the death probability in first year of life, in case available separately.

Sex

character. "m", "f" or "b" for male, female, or both.

region

character. "n", "e", "s" or "w" for North, East, South, or West.

SRB

numeric. The sex ratio at birth (boys/girls), default 1.05.

OAG

logical. Whether or not the last element of nMx is the open age group Default TRUE.

Details

If sex is given as both, "b", then female values are taken for a(0) and 4a1, per the PAS spreadsheet. If IMR is not given, the M(0) is used to estimate a(x) for ages < 5. This function is not vectorized. a(x) closeout assumes constant mortality hazard in the open age group. One safeguard is different from PAS: If assuming the interval midpoint implies a qx greater than 1, then we derive a(x) for the interval by assuming midpoint a(x) for each single age within the interval along with a constant death rate.

Value

nax average contribution to exposure of those dying in the interval.

References

\insertRef

united1983manualDemoTools \insertRefPASDemoTools

Examples

 Exposures <- c(100958,466275,624134,559559,446736,370653,301862,249409,
 		247473,223014,172260,149338,127242,105715,79614,53660,
 		31021,16805,8000,4000,2000,1000)

 Deaths <- c(8674,1592,618,411,755,1098,1100,1357,
 		1335,3257,2200,4023,2167,4578,2956,4212,
 		2887,2351,1500,900,500,300)
 # lower age bounds
 Age    <- c(0, 1, seq(5, 100, by = 5))
 AgeInt <- c(diff(Age), NA)
 nMx <- Deaths/Exposures
 lt_a_pas(nMx = nMx,AgeInt = AgeInt,Sex = 'm',region = 'n',OAG = TRUE)
 lt_a_pas(nMx = nMx,AgeInt = AgeInt,Sex = 'm',a0rule = "cd",region = 'n',OAG = TRUE)

timriffe/DemoTools documentation built on Oct. 14, 2024, 12:53 p.m.