This function reproduces calculations of CENSUR~2.XLS
by Griff Feeney. Censuses are assumed to be spaced N years apart and population counts for both censuses in 5-year age groups. The staggered ratio of these approximates lifetable function npx =1-nqx, i.e. probability of surviving between age x and age x+n. The cumulative product of this approximates the survival function lx.
survN(pop1, pop2, interval)
pop1 | numeric. Vector of population counts in 5-year age groups of census 1. |
---|---|
pop2 | numeric. Vector of population counts in 5-year age groups of census 2. |
interval | numeric. Length of the inter-censal period. |
Survival function lx as a numeric vector with radix 1.
Checking for census spacing of N years must happen prior to this function. Also, we assume the open age group has already been trimmed off.
We assume the open age group has already been trimmed off. The time interval `N`` must be measured as a decimal in advance and specified. This method uses a synthetic approximation of person-years lived in each age interval over the intercensal period and then a second approximation based on age-specific growth rates to produce an estimate of lifetable \(p(x)\). This value of \(p(x)\) is not bounded to \([0,1]\), and therefore the resulting lx approximation is not strictly positive or monotonically non-increasing, so downstream usage of this result is limited. For example, is not advisable to use it in the standard way to derive the lifetable dx.
# 1960 vs 1970 pops pop1 <- c(3831870,4502304,5397061,4630775,4193184,4114704,3770907,3274822, 2744786,2559755,2160716,1839025,1494043,1133409,870238,577972,313781) pop2 <- c(4292503,3988292,3852101,4492096,5347327,4571868,4190340,4085338, 3674127,3198934,2648360,2382691,1970485,1584699,1172155,736258,408191) interval <- 10 survN(pop1,pop2,interval)#> [1] 1.0000000 1.0429078 1.0047911 0.9125239 1.0015734 0.9989119 0.9650474 #> [8] 0.9650575 0.9538966 0.9761038 0.9074620 0.8923755 0.8366291 0.7626398 #> [15] 0.6726113 0.4965859 0.3092449