Type: | Package |
Title: | Interpolating Age-Specific Mortality Rates at All Ages |
Version: | 0.1.2 |
Description: | Mortality rates are typically provided in an abridged format, i.e., by age groups 0, [1, 5], [5, 10]', '[10, 15]', and so on. Some applications necessitate a detailed (single) age description. Despite the large number of proposed approaches in the literature, only a few methods ensure great performance at both younger and higher ages. For example, the 6-term 'Lagrange' interpolation function is well suited to mortality interpolation at younger ages (with irregular intervals), but not at older ages. The 'Karup-King' method, on the other hand, performs well at older ages but is not suitable for younger ones. Interested readers can find a full discussion of the two stated methods in the book Shryock, Siegel, and Associates (1993).The Q2q package combines the two methods to allow for the interpolation of mortality rates across all age groups. It begins by implementing each method independently, and then the resulting curves are linked using a 5-age averaged error between the two partial curves. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)] |
Encoding: | UTF-8 |
LazyData: | true |
LazyDataCompression: | xz |
RoxygenNote: | 7.3.2 |
Depends: | R(≥ 3.5.0) |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
URL: | https://github.com/Farid-FLICI/Q2q |
NeedsCompilation: | no |
Packaged: | 2024-12-19 15:42:50 UTC; farid |
Author: | Farid FLICI |
Maintainer: | Farid FLICI <farid.flici@cread.dz> |
Repository: | CRAN |
Date/Publication: | 2024-12-19 16:00:14 UTC |
Mortality data
Description
A dataset containing mortality rates for Algerian men by 5-age groups over the 1977-2014 period.
Usage
LT
Format
A matrix with 38 columns and 17 rows.
Examples
data(LT)
getqx
Description
It enables interpolating age-specific mortality rates from an annual life-table.
Usage
getqx(Qx, nag)
Arguments
Qx |
Five-ages mortality rates which can be a vector created using combine function 'c()' or a column of a numerical matrix. |
nag |
number of age groups. |
Value
qx : a vector of age-specific mortality rates.
lx : a vector of the age evolution of the population of survivors.
dx : a vector of the theoretical distribution of deaths by age.
qxl : a vector of the age-specific mortality rates interpolated using the Lagrange method.
qxk : a vector of the age-specific mortality rates interpolated using the Karup-King method.
junct_age : the age where qxk and qxl have been joined.
Author(s)
Farid FLICI
Examples
getqx(Qx=LT[,8], nag=17)
getqxt
Description
It enables for interpolating age-specific mortality rates for a multi-annual life tables.
Usage
getqxt(Qxt, nag, t)
Arguments
Qxt |
A numerical matrix of Five-ages mortality rates without an age identification column and a time identification row. |
nag |
The number of age groups. |
t |
The number of years. |
Value
qxt : a matrix containing the age-specific mortality rates by age x in rows and year t in columns.
lxt : a matrix containing the evolution of the population of survivors over age x for each year t.
dxt : a matrix containing the theoretical distribution of deaths by age x for each year t.
qxtl : the age-specific mortality rates interpolated using the Lagrange method for each year t.
qxtk : the age specific mortality rates interpolated using the Karup-King method for each year t.
junct_ages : a vector containing the ages where qxtk and qxtl have been joined, for each year t.
Author(s)
Farid FLICI
Examples
getqxt(Qxt=LT, nag=17, t=38)