Muti-Scenarios Population Projection for Algeria - Using R
Last updated
Last updated
Farid FLICI
Last Revision: 06-05-2020.
Farid FLICI (2020). Multi-scenarios Population Projection for Algeria. A textbook published with Gitbook, Available at: [https://farid-flici.gitbook.io/multi-scenarios-population-projection-for-algeria/], Version of 06-05-2020.
In this manual, we present a methodology of doing a multi-scenarios population projections for Algeria using R. The methodology used consists of the Cohort-Component Method. Mortality Scenarios are defined using the predictive intervals of a stochastic forecast, while the Fertility scenarios are expert-based. 5 scenarios are simulated, the Age-Specific fertility rates are then defined using the Lee-Carter Model for fertility (Lee, 1993). Later on, we shows how to make dynamic visualizations of the multi scenario projections.
The method used is the multi component method. This method considers a population during a year $0$ to be composed from differents $cohorts$ in regard to their year of birth. Hence, the population $Pt$ is composed from different sub-populations $P{x,t}$, with $x$ going from age $0$ to age $w$. Then, the time evolution of each cohort is deduced based of the projected mortality surface.
For $x$ from $0$ to $w$, $P{x+1,t+1}=P{x,t}*(1-q{x,t})$ with $q{x,t}$ is the Age-Specific-Mortality Rate (ASMR).
Then, the population aged $0$ in the begenning of the year $t+1$ is deduced from the population of females $P^{f}$ during the year $t$ (mid-year population) at the procreation ages, i.e., $15-49$, and the corresponding Age Specific Fertility Rates (ASFRs), noted $f_{x,t}$. We can write:
$$P{0,t+1}=\sum{x=15}^{49} \frac{P^{f}{x,t} + P^{f}{x,t+1} }{2}*f_{x,t}$$
If immigration data is available and has a significant effect on ppulation dynamics, the population evolution is adjusted accordingly. If not, we assume simply that immigration sold is null.
A detailed owerview of the cohort component method can be found in Smith et al. (2013).
There is also an $R package$ $popReconstruct$ allowing populations projections using R. [https://cran.r-project.org/web/packages/popReconstruct/popReconstruct.pdf]
In order to perform the projection, a set of information need to be made available:
The horizon of the projection;
A baseline population;
Projected Age Specific Mortality Rates, for males and females, extended from the reference year up to the horizon of the projection;
Projected Age Spefici Fertility Rates, for females at reproduction ages;
The Sex ratio at birth, or the number of males corresponding to 1 female among newborns;
Using a multi-scenarios approach aims at considering the uncertainty in presenting the projection results. The scenarios of the evolution of each compoenent need to be defined; based on it, the population evolution scenarios are defined.
Here, Following the central scenario, Age Specific mortality rates (ASMRs) are projected using the coherent model of Hyndman et al. (2013). A detailed overview can be found in Flici (2016a). The scenarios "High" and "Low" are defined based on the $95%$ prediction interval.
The scenario of fertility were defined to give levels of total fertility rate (TFR) corresponding to "1.5", "2.1", "2.5", "3", and "3.5". Then the corresponding $f_{x,t}$ surfaces are calculated using the model of Lee (1993). This method, as well as an application on the Algerian data, is explained in Flici (2016b).
The final number of scenarios is related to the number of scenario used for each component. Here, in our case, Three scenarios for mortality and five for fertility are adopted. It makes 15 scenarios in total.
In order to perform a multi-scenarios projections, the different components need to be projected according to the corresponding scenarios. A baseline population is also needed.
We use the population of Algeria, 2015, by single age as a reference population. Then, the year-to-year population growth is conducted according the the mortality projected rates.
First, we upload the baseline population, while separating males and females.
Next, the projected Age-Specific Mortality Rates (ASMRs) need to be uploaded for males and females, age detailed from 0 to 120.
In concern of the mortality evolution assumptions, 3 scenarios are considered based on the results of the stockastic forecasts and the underlying confidence intervals at a confidence level of 95%.
In order to simplify the data structure and the cambination of the scenarios when projecting the population, the different ASMRs by scenario are arranged in lists of matrices by sex, namely, $MortM$ and $MortF$ for males and females respectively.
In concern of Fertility, 5 scenarios are considered : Very low, low, medium, high, very high, which correspond to Total Fertility Rates (TFR) of 1.5, 2.1, 2.5, 3 and 3.5 respectively by 2070.
The projected Age-Specific Fertility Rates (ASFRs) provided by the different scenarios are arranged into a list of matrices from the lowest to the highest fertility levels.
According to historical data, the number of males corresponding to $1$ females is equal to $1.045$. In other words, among $2,045$ new-borns, $1,000$ are girls and $1,045$ are boys.
If we define the three scenarios of mortality evolution as (1,2,3) corresponding to (high, average, low) and the five scenarios of fertility evolution as (1,2,3,4,5) to correspond to (very low, low, average, high, very high). The combination of the possible scenarios can be obtained by:
The combination of the three scenarios about mortality with the five scenarios of fertility must lead to a total of 15 scenarios.
This cambination must be managed through a transition matrice,
First, we create listes of matrices to be filled with the projection results. For each sex, a list of 15 matrices (1 matrice per scenario) is created. Each matrix has ages in rows (from $0$ to $120$) and years in columns (from $2015$ to $2070$). The first column is to be filled by the baseline population.
Then, the year-to-year population are deduced using the corresponding survival probabilities. If we set $P{x,t}$ to be the population at age $x$ during the year $t$, and $q{x,t}$ to be the probability of dying at age $x$ during the year $t$, then we can write:
$$P{x+1,t+1}=P{x,t}*(1-q_{x,t})$$
Then, the new-borns during the year $t$, noted $B_t$ are estimated using the formula:
$$Bt=\sum{x=15}^{49}{\frac{P^{f}{x-1,t-1}+P^{f}{x,t}}{2} * f_{x-1, t-1} }$$
with $P^{f}{x,t}$ to be the population of females aged $x$ at the begenning of the year $t$ and $f{x,t}$ the Age-Specific Fertility Rate (ASFR) at age $x$ and year $t$.
The number of new-borns $B_t$ are split into boys and girls and are introduced as Populations at age 0 during the next year. We can write:
$P^{m}{0,t}=B{t-1}*\frac{1.045}{1+1.045}$ for males
and
$P^{f}{0,t}=B{t-1}*\frac{1}{1+1.045}$ for females
It results in:
Trying to make different $ggplot$ objects in a $list$ then trying to plot then usuing a $loop$ will results in duplicating the last plot on all the subplots (for all scenario).
The solution consits in gathering all the datasets in one data frame. It means passing from a matricial form where data is initially structured by age (in rows) and years (in columns) and population number in cells; separatly by sex and scenario into a linear form where each line gives a combination of "Sex", "Age", "year", "Scenario", and "population number". For each scenario, the corresponding scenario of mortality and fecondity are added. This can be done using $melt$ function which is available under $reshape2$ package.
add two columns for fertility (1.5, 2.1, 2.5, 3) and LE (low, Medium, High)
Population numbers for males are set with a negtive sign
This results in a new data structure:
Then, we create a Gif of the evolution of the different scenarios.
To change the label of the variables
`
Flici, F. (2016a). Coherent mortality forecasting for the Algerian population. Presented at Samos Conference in Actuarial Sciences and Finance, Samos, Greece (May).
Flici, F. (2016b). Projection des taux de fécondité de la population algérienne á l'horizon 2050. MPRA Paper No. 99077, posted 12 Mar 2020. [https://mpra.ub.uni-muenchen.de/99077/1/MPRA_paper_99077.pdf]
Flici, F. (2017). Longevity and pension plan sustainability in Algerie: Taking the re- tirees mortality experience into account. Doctoral dissertation, Higher National School of Statistics and Applied Economics (ENSSEA), Kolea, Algeria.
Hyndman, R. J., Booth, H., & Yasmeen, F. (2013). Coherent mortality forecasting: the product-ratio method with functional time series models. Demography, 50 (1), 261-283.
Lee, R. D. (1993). Modeling and forecasting the time series of US fertility: Age distribution, range, and ultimate level. International Journal of Forecasting, 9(2), 187-202.
Smith, S. K., Tayman, J., & Swanson, D. A. (2013). Overview of the Cohort-Component Method. In A Practitioner's Guide to State and Local Population Projections (pp. 45-50). Springer, Dordrecht. DOI: 10.1007/978-94-007-7551-0_3