Construct model life tables based on the Log-Quadratic (Wilmoth) estimates
with various choices of 2 input parameters:
q0_5, q0_1, q15_45, q15_35
and e0
. There are 8 possible
combinations (see examples below).
lt_model_lq( Sex, fitted_logquad = NULL, q0_5 = NULL, q0_1 = NULL, q15_45 = NULL, q15_35 = NULL, e0 = NULL, radix = 1e+05, tol = 1e-09, maxit = 200, axmethod = "pas", a0rule = "ak", IMR = NA, region = "w", mod = TRUE, SRB = 1.05 )
Sex | Choose the sex of the population. This choice defines the use
of a corresponding Log-Quadratic (
|
---|---|
fitted_logquad | Optional, defaults to |
q0_5 | 5q0. The probability that a new-born will die during the subsequent 5 years; |
q0_1 | 1q0. The probability that a life aged 0 will die during the following year; |
q15_45 | 45q15. The probability that a life aged 15 will die during the subsequent 45 years; |
q15_35 | 35q15. The probability that a life aged 15 will die during the subsequent 35 years; |
e0 | Life expectancy at birth; |
radix | Life table radix. Default: 10^5; |
tol | Tolerance level for convergence. The tolerance level, is relevant for case 7 and 8 (e0 and 45q15 or 35q15 are known); |
maxit | Maximum number of iterations allowed. Default: 100; |
axmethod | character. Either |
a0rule | character. Either |
IMR | numeric. Infant mortality rate q0, in case available and |
region | character. North, East, South, or West: code"n", code"e", code"s", code"w". Default code"w". |
mod | logical. If |
SRB | the sex ratio at birth (boys / girls), default 1.05 |
The output is of class lt_model_lq
with the components:
Life table matching given inputs
Associated values of q0_5, q0_1, q15_45, q15_35
and e0
.
Due to limitations of the R language the notation for probability
of dying nqx
is written qx_n
, where x
and n
are
integers. For example 45q15
is represented as q45_15
.
This function is ported from MortalityEstimate::wilmothLT
experimental package by Marius Pascariu. The package is no longer maintained. The latest version can be found here: https://github.com/mpascariu/MortalityEstimate
# Build life tables with various choices of 2 input parameters # case 1: Using 5q0 and e0 L1 <- lt_model_lq(Sex = "b", q0_5 = 0.05, e0 = 65) L1#> $lt #> Age AgeInt nMx nAx nqx lx ndx #> 0 0 1 0.0410512359 0.183536 0.039719948 1.000000e+05 3.971995e+03 #> 1 1 4 0.0026943632 1.497275 0.010705264 9.602801e+04 1.028005e+03 #> 5 5 5 0.0011225675 2.500000 0.005597130 9.500000e+04 5.317273e+02 #> 10 10 5 0.0008953863 2.500000 0.004466932 9.446827e+04 4.219834e+02 #> 15 15 5 0.0017669443 2.500000 0.008795867 9.404629e+04 8.272187e+02 #> 20 20 5 0.0024185992 2.500000 0.012020315 9.321907e+04 1.120523e+03 #> 25 25 5 0.0025644970 2.500000 0.012740800 9.209855e+04 1.173409e+03 #> 30 30 5 0.0029683912 2.500000 0.014732626 9.092514e+04 1.339566e+03 #> 35 35 5 0.0038330218 2.500000 0.018983201 8.958557e+04 1.700621e+03 #> 40 40 5 0.0052138343 2.500000 0.025733743 8.788495e+04 2.261609e+03 #> 45 45 5 0.0074290244 2.500000 0.036467821 8.562334e+04 3.122497e+03 #> 50 50 5 0.0108456672 2.500000 0.052796795 8.250085e+04 4.355780e+03 #> 55 55 5 0.0159271191 2.500000 0.076586106 7.814507e+04 5.984826e+03 #> 60 60 5 0.0243028860 2.500000 0.114554422 7.216024e+04 8.266275e+03 #> 65 65 5 0.0373146602 2.500000 0.170653598 6.389397e+04 1.090374e+04 #> 70 70 5 0.0590139447 2.500000 0.257133559 5.299023e+04 1.362557e+04 #> 75 75 5 0.0932241868 2.500000 0.378019527 3.936466e+04 1.488061e+04 #> 80 80 5 0.1439130103 2.500000 0.529176569 2.448405e+04 1.295639e+04 #> 85 85 5 0.2168414376 2.500000 0.703070268 1.152767e+04 8.104759e+03 #> 90 90 5 0.3080561894 2.500000 0.870146166 3.422907e+03 2.978429e+03 #> 95 95 5 0.4244002008 2.500000 0.880208315 4.444775e+02 3.912328e+02 #> 100 100 5 0.5495844154 2.500000 0.935939164 5.324471e+01 4.983381e+01 #> 105 105 5 0.6700558318 2.500000 0.964925439 3.410901e+00 3.291265e+00 #> 110 110 NA 0.7610553490 2.613939 1.000000000 1.196359e-01 1.196359e-01 #> nLx Sx Tx ex #> 0 9.675701e+04 0.95659243 6.500007e+06 65.000066 #> 1 3.815392e+05 0.99032914 6.403250e+06 66.681064 #> 5 4.736707e+05 0.99496638 6.021710e+06 63.386425 #> 10 4.712864e+05 0.99337345 5.548040e+06 58.729133 #> 15 4.681634e+05 0.98959903 5.076753e+06 53.981431 #> 20 4.632940e+05 0.98762162 4.608590e+06 49.438273 #> 25 4.575592e+05 0.98626967 4.145296e+06 45.009351 #> 30 4.512768e+05 0.98315786 3.687737e+06 40.557943 #> 35 4.436763e+05 0.97767387 3.236460e+06 36.127021 #> 40 4.337707e+05 0.96896918 2.792784e+06 31.777722 #> 45 4.203105e+05 0.95551933 2.359013e+06 27.551048 #> 50 4.016148e+05 0.93563106 1.938702e+06 23.499181 #> 55 3.757633e+05 0.90518564 1.537088e+06 19.669669 #> 60 3.401355e+05 0.85910020 1.161324e+06 16.093687 #> 65 2.922105e+05 0.79014013 8.211888e+05 12.852368 #> 70 2.308872e+05 0.69134090 5.289783e+05 9.982563 #> 75 1.596218e+05 0.56401632 2.980911e+05 7.572554 #> 80 9.002929e+04 0.41515854 1.384693e+05 5.655488 #> 85 3.737643e+04 0.25867800 4.843997e+04 4.202063 #> 90 9.668460e+03 0.12869739 1.106354e+04 3.232207 #> 95 1.244306e+03 0.11382978 1.395084e+03 3.138705 #> 100 1.416390e+02 0.06231574 1.507781e+02 2.831795 #> 105 8.826342e+00 0.03421804 9.139063e+00 2.679369 #> 110 3.127208e-01 0.00000000 3.127208e-01 2.613939 #> #> $values #> k q0_1 q0_5 q15_35 q15_45 e0 #> 0.5544684 0.03971995 0.05 0.1227634 0.2327157 65.00007 #> #> attr(,"class") #> [1] "lt_model_lq"#> [1] "lt" "values"L1f <- lt_model_lq(Sex = "f", q0_5 = 0.05, e0 = 65) L1m <- lt_model_lq(Sex = "m", q0_5 = 0.05, e0 = 65) # case 2: Using 5q0 and 45q15 L2 <- lt_model_lq(Sex = "b", q0_5 = 0.05, q15_45 = 0.2) # case 3: Using 5q0 and 35q15 L3 <- lt_model_lq(Sex = "b", q0_5 = 0.05, q15_35 = 0.125) # case 4: Using 1q0 and e0 L4 <- lt_model_lq(Sex = "b", q0_1 = 0.01, e0 = 65) # case 5: Using 1q0 and 45q15 L5 <- lt_model_lq(Sex = "b", q0_1 = 0.05, q15_45 = 0.2) # case 6: Using 1q0 and 35q15 L6 <- lt_model_lq(Sex = "b", q0_1 = 0.05, q15_35 = 0.125) # case 7: Using 45q15 and e0 L7 <- lt_model_lq(Sex = "b", q15_45 = 0.125, e0 = 65) # case 8: Using 35q15 and e0 L8 <- lt_model_lq(Sex = "b", q15_35 = 0.15, e0 = 65)