surv10 | R Documentation |
This function reproduces calculations through column H of CENSUR~1.XLS
by Griff Feeney. Censuses are assumed to be spaced 10 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.
surv10(pop1, pop2)
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. |
Checking for census spacing of 10 years must happen prior to this function. Also, we assume the open age group has already been trimmed off.
Survival function lx as a numeric vector with radix 1.
# 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)
surv10(pop1,pop2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.