Description Usage Arguments Details Value See Also Examples
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, e0
and k
. There are 13 possible
combinations (see examples below).
1 2 3 4 5 6 7 8 9 10 11 12 13 |
object |
An object of class |
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; |
k |
k-parameter in the log-quadratic model; |
radix |
Life table radix. Default: 10^5; |
tol |
Tolerance level for convergence. The tolerance level, is relevant for case 12 and 13 (e0 and 45q15 or 35q15 are known); |
maxit |
Maximum number of iterations allowed. Default: 100; |
... |
Additional arguments affecting the predictions produced. |
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
.
The output is of class wilmothLT
with the components:
lt |
Life table matching given inputs |
values |
Associated values of |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ## Not run:
# DATA
HMD719f <- HMD719[HMD719$sex == "female", ]
# Fit Log-quadratic model
x <- c(0,1, seq(5, 110, by = 5))
W <- wilmoth(x = x, LT = HMD719f)
# Build life tables with various choices of 2 input parameters
# case 1: Using 5q0 and k
L1 <- wilmothLT(W, q0_5 = 0.05, k = 0.1)
L1
ls(L1)
# case 2: Using 5q0 and e0
L2 <- wilmothLT(W, q0_5 = 0.05, e0 = 65)
# case 3: Using 5q0 and 45q15
L3 <- wilmothLT(W, q0_5 = 0.05, q15_45 = 0.2)
# case 4: Using 5q0 and 35q15
L4 <- wilmothLT(W, q0_5 = 0.05, q15_35 = 0.125)
# case 5: Using 1q0 and k
L5 <- wilmothLT(W, q0_1 = 0.01, k = 0.1)
# case 6: Using 1q0 and e0
L6 <- wilmothLT(W, q0_1 = 0.01, e0 = 65)
# case 7: Using 1q0 and 45q15
L7 <- wilmothLT(W, q0_1 = 0.05, q15_45 = 0.2)
# case 8: Using 1q0 and 35q15
L8 <- wilmothLT(W, q0_1 = 0.05, q15_35 = 0.125)
# case 9: Using k and e0
L9 <- wilmothLT(W, k = 0.01, e0 = 65)
# case 10: Using k and 45q15
L10 <- wilmothLT(W, k = 0.01, q15_45 = 0.2)
# case 11: Using k and 35q15
L11 <- wilmothLT(W, k = 0.01, q15_35 = 0.125)
# case 12: Using 45q15 and e0
L12 <- wilmothLT(W, q15_45 = 0.125, e0 = 65)
# case 13: Using 35q15 and e0
L13 <- wilmothLT(W, q15_35 = 0.15, e0 = 65)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.