vwBaseYear {bayesPop} | R Documentation |
Datasets on Migration Base Year and Type, and Mortality and Fertility Age Patterns
Description
Datasets giving information on the baseyear and type of migration for each country. The 2012, 2015, 2017, 2019, 2022 and 2024 datasets also give information on country's specifics regarding mortality, fertility and migration age patterns.
Usage
data(vwBaseYear2024)
data(vwBaseYear2022)
data(vwBaseYear2019)
data(vwBaseYear2017)
data(vwBaseYear2015)
data(vwBaseYear2012)
data(vwBaseYear2010)
Format
A data frame containing the following variables:
country_code
Numerical Location Code (3-digit codes following ISO 3166-1 numeric standard) - see https://en.wikipedia.org/wiki/ISO_3166-1_numeric.
country
Country name. Not used by the package.
isSmall
UN internal code. Not used by the package.
ProjFirstYear
The base year of migration.
MigCode
Type of migration. Zero means migration is evenly distributed over each time interval. Code 9 means migration is captured at the end of each interval.
WPPAIDS
Dummy indicating if the country has generalized HIV/AIDS epidemics.
AgeMortalityType
Type of mortality age pattern. Only relevant for countries with the entry “Model life tables”. In such a case, the
b_x
Lee-Carter parameter is not estimated from historical data. Instead is taken from the datasetMLTbx
using a pattern given in theAgeMortalityPattern
column.AgeMortalityPattern
If
AgeMortalityType
is equal to “Model life tables”, this value determines whichb_x
is selected from theMLTbx
dataset. It must sorrespond to one of the rownames ofMLTbx
, e.g. “CD East”, “CD West”, “UN Latin American”.AgeMortProjMethod1
Method for projecting age-specific mortality rates. It is one of “LC” (modified Lee-Carter, uses function
mortcast
), “PMD” (pattern mortality decline, uses functioncopmd
), “modPMD” (modified pattern mortality decline, uses functioncopmd(... use.modpmd = TRUE)
), “MLT” (model life tables, uses functionmlt
), “LogQuad” (log quadratic method, uses functionlogquad
), or “HIVmortmod” (HIV model life tables as implemented in the HIV.LifeTables package which can be installed from the PPgP/HIV.LifeTables GitHub repo).AgeMortProjMethod2
If the mortality rates are to be projected via a blend of two methods (see
mortcast.blend
), this column determines the second method. The options are the same as in the columnAgeMortProjMethod1
.AgeMortProjPattern
If one of the
AgeMortProjMethodX
colums contains the “MLT” method, this column determines the type of the life table (see the argumenttype
in themlt
function).AgeMortProjMethodWeights
If the mortality rates are to be projected via a blend of two methods, this column determines the weights in the first and the last year of the projection, respectively. It should be given as an R vector, e.g. “c(1, 0.5)” (see the argument
weights
inmortcast.blend
).AgeMortProjAdjSR
Code determining how the “PMD” method should be adjusted if it's used. 0 means no adjustment, 1 means the argument
sexratio.adjust
incopmd
is set toTRUE
, and code 3 means that the argumentadjust.sr.if.needed
incopmd
is set toTRUE
.LatestAgeMortalityPattern
,LatestAgeMortalityPattern1
Indicator
n
for how many latest time periods of historical mortality rates should be averaged to compute thea_x
Lee-Carter and modPMD parameter. Ifn
is zero, all time periods are used. Ifn
is one, only the latest time period is used. Ifn
is negative, the latestn
time periods are excluded. This can have also a form of a vector where the first element is either a negative or a zero. If it is negative, the vector must have only two elements. In such a case, the first element (must be negative) determines how many latest time periods should be excluded, while the second element (must be positive) determines how many latest time periods to include after the exclusion. If the vector starts with a zero, the following numbers are interpreted as individual indices to the time periods starting from the latest time point. Here are a few examples, assuming the available mortality rates are on annual scale, from 1950 to 2023:- “0”:
using all years from 1950 to 2023
- “3”:
using 2023, 2022, 2021
- “-3”:
using 1950 - 2020
- “c(-2, 3)”:
2023 and 2022 are excluded; using 2021, 2020, 2019
- “c(-2, 1, 3)”:
invalid specification - must have two elements if it starts with a negative
- “c(0, 3)”:
interpreted as an individual index; thus, using 2021 only
- “c(0, 1, 3, 4)”:
interpreted as individual indices; using 2023, 2021, 2020
If the
LatestAgeMortalityPattern1
column is present, it should contain values related to an annual simulation (1x1) while theLatestAgeMortalityPattern
column relates to a 5x5 simulation.SmoothLatestAgeMortalityPattern
If
LatestAgeMortalityPattern
is not zero, this column indicates if thea_x
should be smoothed.SmoothDFLatestAgeMortalityPattern
,SmoothDFLatestAgeMortalityPattern1
Degree of freedom for smoothing
a_x
. By default (value 0) a half of the number of age groups is taken. If theSmoothDFLatestAgeMortalityPattern1
column is present, it should contain values related to a 1x1 simulation while theSmoothDFLatestAgeMortalityPattern
column relates to a 5x5 simulation.PasfrNorm
Type of norm for computing age-specific fertility pattern to which the country belongs to. Currently only “GlobalNorm” is used.
PasfrGlobalNorm, PasfrFarEastAsianNorm, PasfrSouthAsianNorm
Dummies indicating which country to include to compute the specific norms.
- MigFDMb0, MigFDMb1, MigFDMmin, MigFDMsrin, MigFDMsrout
Available in the 2024 dataset. These are parameters of the Flow Difference Method to generate age-specific net migration patterns (Sevcikova et. al, 2024). They correspond to the intercept, slope, minimum flow rate, female sex ratio for the in-flow and out-flow, respectively.
Details
There is one record for each country. See Sevcikova et al (2016) on how information from the various columns is used for projections.
Source
Data provided by the United Nations Population Division.
References
H. Sevcikova, N. Li, V. Kantorova, P. Gerland and A. E. Raftery (2016). Age-Specific Mortality and Fertility Rates for Probabilistic Population Projections. In: Dynamic Demographic Analysis, ed. Schoen R. (Springer), pp. 285-310. Earlier version in arXiv:1503.05215.
H. Sevcikova, J. Raymer J., A. E. Raftery (2024). Forecasting Net Migration By Age: The Flow-Difference Approach. arXiv:2411.09878.
Examples
data(vwBaseYear2019)
str(vwBaseYear2019)