% Combile settings:
% Build and View: txs:///pdflatex | txs:///biber | txs:///pdflatex | txs:///view-pdf-internal
% Default Compiler: PdfLaTeX


%!TeX spellcheck = en_US 

\documentclass[12pt]{article}

\usepackage{amssymb,amsmath,amsfonts,eurosym,ulem,graphicx,caption,color,setspace,comment,pdflscape,array,hyperref}
\usepackage[left=1.2in,right=1.2in,top=1in,bottom=1.2in]{geometry}


\usepackage[utf8]{inputenc}



\usepackage[style=authoryear-comp, backend=biber, maxnames=2, maxbibnames=10, uniquelist=false]{biblatex}
\DeclareNameAlias{sortname}{family-given} %In reference list: change the order of names to "Family, Given" (i.e. "Last, First").
\addbibresource{refs_doi.bib}

\usepackage{enumitem} % To change enumerate-environment to only numbers (instead of letter-number-roman combination)
\usepackage[linewidth=1pt]{mdframed} % To create box around text. Supports a page break.


\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{subcaption}
\usepackage{tabu} 

\usepackage[para]{threeparttable} 

\usepackage[table]{xcolor} 
\definecolor{lightgray}{gray}{0.95}
\usepackage[bottom]{footmisc} %put footnotes in bottom of page


\DeclareLabeldate[misc]{%
	\field{date}
	\field{year}
	\field{eventdate}
	\field{origdate}
	\field{urldate}
}



\DeclareSortingTemplate{MySorting}{
	\sort{
		\field{presort}
	}
	\sort[final]{
		\field{sortkey}
	}
	\sort{
		\field{sortname}
		\field{author}
		\field{editor}
		\field{translator}
	}
	\sort{
		\field{sortyear}
		\field{year}
	}
	\sort{
		\field{sorttitle}
		\field{title}
	}
}



\definecolor{g5}{rgb}{0.75, 0.75, 0.75}
\definecolor{g4}{rgb}{0.80, 0.80, 0.80}
\definecolor{g3}{rgb}{0.84, 0.84, 0.84}
\definecolor{g2}{rgb}{0.9, 0.9, 0.9}
\definecolor{g1}{rgb}{0.93,0.93,0.93}



\normalem

\renewcommand{\baselinestretch}{1.1}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}{Proposition}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}

\newtheorem{hyp}{Hypothesis}
\newtheorem{subhyp}{Hypothesis}[hyp]
\renewcommand{\thesubhyp}{\thehyp\alph{subhyp}}

\newcommand{\red}[1]{{\color{red} #1}}
\newcommand{\blue}[1]{{\color{blue} #1}}


\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}





\begin{document}


%----------------------------------------------------------------------------------------------------------------------
% APPENDIX
%----------------------------------------------------------------------------------------------------------------------



\begin{refsection}
\newpage
\appendix	
	
	\section*{Appendix} \label{sec:Appendices}
	\addcontentsline{toc}{section}{\nameref{sec:Appendices}}
	\setcounter{figure}{0} \renewcommand{\thefigure}{A.\arabic{figure}} 
	\setcounter{table}{0} \renewcommand{\thetable}{A.\arabic{table}} 
	\setcounter{page}{1}
	

	\section{Data}
	\label{sec:App_data}
	
	\begin{table}[h!]	
		\centering
		\caption{Overview of countries included in the analysis}
		\label{tab:overview_countries}
			\begin{scriptsize}
				\begin{tabular}{L{0.2\linewidth}L{0.13\linewidth}L{0.25\linewidth}L{0.15\linewidth}R{0.11\linewidth}}
					\hline\\[-1.8ex]
					& HMD code 			& 		 	& HMD data 		&    \\ 
					Country		& (abbreviation) 	& Region	& availability	& \# inclusions	\\
					\hline\\[-1.8ex]
					Australia & AUS & America, Australia, Japan & 1921 - 2018 & 4 \\ 
					\rowcolor{g2}	Austria & AUT & Western Europe & 1947 - 2017 & 3 \\ 
					Belarus & BLR & Eastern Europe & 1959 - 2018 & 2 \\ 
					\rowcolor{g2}	Belgium & BEL & Western Europe & 1841 - 2018 & 4 \\ 
					Bulgaria & BGR & Eastern Europe & 1947 - 2017 & 3 \\ 
					\rowcolor{g2}	Canada & CAN & America, Australia, Japan & 1921 - 2016 & 4 \\ 
					Czechia & CZE & Eastern Europe & 1950 - 2018 & 3 \\ 
					\rowcolor{g2}	Denmark & DNK & Scandinavia & 1835 - 2019 & 4 \\ 
					Estonia & EST & Eastern Europe & 1959 - 2017 & 2 \\ 
					\rowcolor{g2}	Finland & FIN & Scandinavia & 1878 - 2018 & 4 \\ 
					France & FRATNP & Western Europe & 1816 - 2017 & 4 \\ 
					\rowcolor{g2}	East Germany & DEUTE & Eastern Europe & 1956 - 2017 & 2 \\ 
					West Germany & DEUTW & Western Europe & 1956 - 2017 & 2 \\ 
					\rowcolor{g2}	Hungary & HUN & Eastern Europe & 1950 - 2017 & 3 \\ 
					Iceland & ISL & Scandinavia & 1838 - 2018 & 4 \\ 
					\rowcolor{g2}	Ireland & IRL & Great Britain & 1950 - 2017 & 3 \\ 
					Italy & ITA & Southern Europe & 1872 - 2017 & 4 \\ 
					\rowcolor{g2}	Japan & JPN & America, Australia, Japan & 1947 - 2018 & 3 \\ 
					Latvia & LVA & Eastern Europe & 1959 - 2017 & 2 \\ 
					\rowcolor{g2}	Lithuania & LTU & Eastern Europe & 1959 - 2017 & 2 \\ 
					Luxembourg & LUX & Western Europe & 1960 - 2017 & 2 \\ 
					\rowcolor{g2}	Netherlands & NLD & Western Europe & 1850 - 2016 & 4 \\ 
					Norway & NOR & Scandinavia & 1846 - 2018 & 4 \\ 
					\rowcolor{g2}	Poland & POL & Eastern Europe & 1958 - 2016 & 2 \\ 
					Portugal & PRT & Southern Europe & 1940 - 2018 & 3 \\ 
					\rowcolor{g2}	Slovakia & SVK & Eastern Europe & 1950 - 2017 & 3 \\ 
					Spain & ESP & Southern Europe & 1908 - 2016 & 4 \\ 
					\rowcolor{g2}	Sweden & SWE & Scandinavia & 1751 - 2018 & 4 \\ 
					Switzerland & CHE & Western Europe & 1876 - 2016 & 4 \\ 
					\rowcolor{g2}	England \& Wales & GBRTENW & Great Britain & 1841 - 2016 & 4 \\ 
					Scotland & GBR\_SCO & Great Britain & 1855 - 2016 & 4 \\ 
					\rowcolor{g2}	Northern Ireland & GBR\_NIR & Great Britain & 1922 - 2016 & 4 \\ 
					USA & USA & America, Australia, Japan & 1933 - 2017 & 4 \\ 
					\hline
				\end{tabular}
			\end{scriptsize}
	\end{table}%
	

	
	\section{Tree-Based Machine Learning Methods}
	\label{ML_methods}
	
	\subsection{Decision Trees}
		\label{sec:App_DecTree}
	
		The decision tree method was first proposed by \cite{Breiman_etal1984}, and it can be applied to both regression and classification problems. According to \textcite{Hastie_etal2009}, a decision tree is a nonparametric model that repeatedly splits the data into groups according to a set of feature/input variables, $ \mathcal{F} $, in order to identify regions (subsets of the data) that are homogeneous in terms of the response variable, $ m $. At every node, the algorithm identifies a set of possible splits for the feature variables. It then chooses the feature variable and split point that maximizes the homogeneity of the response along each branch. Each branch creates new nodes that again can be split. The splitting continues until a stopping criterion is reached. For regression trees, the response variable is predicted using the mean response observed in each of the terminal nodes (i.e., in each region of the data).
	
	
	Following, e.g., \textcite{Hastie_etal2009}, suppose that data at a given node $ n $ can be represented by $ Q^{^n} $, and that there are $ \theta=\left(f,s_{n}\right) $ candidate splits, each consisting of a feature variable $ f $ and a threshold/split point $ s_{n} $. For each $ \theta $, $ Q^{n} $ is partitioned into two subsets:\begin{align}
		Q^{n}_{left}\left(\theta \right) = \left(\mathcal{F},m\right)|f\leq s_{n},\\
		Q^{n}_{right}\left(\theta \right) = Q^{n}\backslash Q^{n}_{left}\left(\theta \right).
	\end{align} The optimal split is chosen such that it minimizes the impurity at that node, \begin{equation}\label{eq:minImp} 
	\theta^{*}=\arg\min_{\theta} Imp\left(Q^{n},\theta\right) = \frac{N^{n}_{left}}{N^{n}}MSE\left(Q^{n}_{left}\left(\theta \right)\right) + \frac{N^{n}_{right}}{N^{n}}MSE\left(Q^{n}_{right}\left(\theta \right)\right),
	\end{equation} where $ N^{n}_{left} $ and $ N^{n}_{right} $ are the total number of observations in each of the two subsets, $ N^{n}=N^{n}_{left}+N^{n}_{right} $, and \begin{equation}
	MSE\left(Q^{n}\left(\theta \right)\right) = \frac{1}{N^{n}}\sum_{i\in N^{n}}^{}\left(m_{i}-\bar{m}^{n}\right)^{2},
	\end{equation} with $ \bar{m}^{n}=\frac{1}{N^{n}}\sum_{i\in N^{n}}m_{i} $ being the mean response in node $ n $. These steps are repeated until a stopping criterion is met (e.g, maximum number of terminal nodes). The response is then predicted by $ \bar{m}^{n} $ within each terminal node.
	
		In contrast to the traditional stochastic mortality models that only include \textit{year}, \textit{age}, and \textit{cohort} in the set of features, $ \mathcal{F} $, this methodology allows the researcher to include \textit{any} variable in $ \mathcal{F} $ that he/she believes affects mortality.
	

\newpage
	\subsection{Random Forests}
	\label{sec_App_RFalgo}
	
	
	\begin{mdframed}[skipabove=\topsep,skipbelow=\topsep] \label{algo:RF}	
		\medskip
		\textbf{Algorithm 1:} Random forests for regression \vspace{-2mm} \\
		{\small (Algorithm 15.1 in \cite{Hastie_etal2009})}
		
		\begin{enumerate}
			\item For $ k=1,...,K $:
			\begin{enumerate}[label*=\arabic*.]
				\item Draw a bootstrap sample from the training data.
				\item Construct a regression tree (denoted by $ T_{k} $) from the bootstrap sample by recursively repeating the following steps for each node, $ n $, of the tree, until a stopping criterion (e.g., maximum number of terminal nodes) is reached.
				\begin{enumerate}[label*=\arabic*.]
					\item Randomly select $ F_{n} $ feature variables from the $ F $ total number of features in $ \mathcal{F} $.
					\item \label{algo_step} Choose the optimal feature and split point among the set of possible splits for the $ F_{n} $ features according to (\ref{eq:minImp}).
					\item Split the node into two daughter nodes according to the choice in \ref{algo_step}
				\end{enumerate}
			\end{enumerate}
			\item Output the ensemble of regression trees $ \left\{T_{k}\right\}_{k=1,...,K} $.
		\end{enumerate}
		\smallskip
	\end{mdframed}

	
	
	In step \ref{algo_step} of \hyperref[algo:RF]{Algorithm 1}, splitting a categorical variable (like $ country $) is different from splitting a numerical or logical variable. For categorical variables, the split point is represented by an integer, whose base-2 (binary) representation defines the identities of the categories that go to the left (ones) and right (zeros).
	
	

\newpage		

	
	\subsection{Stochastic Gradient Boosting}
	\label{sec_App_GBM}
	
	\begin{mdframed}[skipabove=\topsep,skipbelow=\topsep] \label{algo:GB}	

	\medskip
	\textbf{Algorithm 2:} Stochastic gradient boosting for regression \vspace{-2mm} \\
	{\small (See \cite{Friedman2001} and \cite{Friedman2002})}
	
	\begin{enumerate}
		\item Initialize $ \hat{m}_{0}\left(\mathcal{F}\right)=\arg\min_{\gamma}\sum_{i=1}^{N}L\left(m_{i},\gamma\right) $, given a loss function $ L\left(m,\gamma\right) $ as a function of the response variable, $ m $, and the predicted values, $ \gamma $.
		\item For $ k=1,...,K $:
		\begin{enumerate}[label*=\arabic*.]
			\item For $ i=1,...,N $ compute the pseudo residuals\begin{equation}
			r_{i,k}=-\left[\frac{\partial L\left(m_{i},\hat{m}\left(\mathcal{F}_{i}\right)\right)}{\partial \hat{m}\left(\mathcal{F}_{i}\right)}\right]_{\hat{m}=\hat{m}_{k-1}}.
			\end{equation}
			\item Randomly select a subsample of the training data of size $ p\cdot N $, with $ p $ being a constant, pre-specified subsampling rate.
			\item Fit a regression tree to the $ r_{i,k} $ values creating terminal regions $ R_{j,k} $, $ j=1,2,...,J_{k} $ using only the subsample from the previous step.
			\item For $ j=1,2,...,J_{k} $ compute the output value \begin{equation}
			\gamma_{j,k}=\arg\min_{\gamma}\sum_{\mathcal{F}_{i}\in R_{j,k}}^{}L\left(m_{i},\hat{m}_{k-1}\left(\mathcal{F}_{i}\right)+\gamma\right).
			\end{equation}
			\item Update $ \hat{m}_{k}\left(\mathcal{F}\right)=\hat{m}_{k-1}\left(\mathcal{F}\right)+\nu\sum_{j=1}^{J_{k}}\gamma_{j,k}I\left(\mathcal{F}\in R_{j,k}\right) $, where $ \nu $ is a constant, pre-specified learning rate.
		\end{enumerate}
		\item Output $ \hat{m}\left(\mathcal{F}\right)=\hat{m}_{K}\left(\mathcal{F}\right) $.
	\end{enumerate}
	\smallskip

\end{mdframed}
	
	The optimal number of trees/iterations and the learning rate depend on each other. Smaller values of the learning rate almost always improves the predictive performance, but is associated with higher computational costs (more iterations are required). For small values of the learning rate and large number of iterations, the error rate is very flat. Thus, \textcite{Friedman2001} suggests that one should choose a small value for the learning rate while setting the number of iterations as large as is computationally feasible. For more details about the trade-off between number of trees and the learning rate, see \textcite{Friedman2001}. 
	




	\section{Stochastic Mortality Models}
	\label{sec:App_Stoch_models}
	

	\begin{table}[hb!]	
		\centering
		\caption{Stochastic mortality models considered in this paper}
		\label{tab:stoch_models}
		\setlength{\tabcolsep}{6pt}
			\begin{scriptsize}
				\begin{tabular*}{\linewidth}{lll}
					\hline
					&&\\[-0.8em]
					\textbf{Model and reference} & \textbf{Formula} & \textbf{Identifiability constraints}\\
					&&\\[-1em]
					\hline
					&&\\
					\textbf{Lee-Carter (LC)}	&	$ \eta_{x,t}=\alpha_{x}+\beta_{x}\kappa_{t} $ & $ \sum_{t\in\mathcal{T}}\kappa_{t}=0 $, 
					$\quad \sum_{x\in\mathcal{X}}\beta_{x}=1 $	\\&&\\[-0.8em]
					{\scriptsize \cite{LeeCarter1992}}	&  & \\
					&&\\
					\textbf{Augmented Common}				&	$ \eta^{i}_{x,t}=\alpha^{i}_{x}+B_{x}K_{t}+\beta^{i}_{x}\kappa^{i}_{t},\quad\forall i\in\mathcal{R} $  & $ \sum_{t\in\mathcal{T}}K_{t}=0 $, 
					$\quad \sum_{x\in\mathcal{X}}B_{x}=1 $, \\&&\\[-0.8em]
					\textbf{Factor (ACF)}		&  & $\sum_{t\in\mathcal{T}}\kappa^{i}_{t}=0 $, $\quad\sum_{x\in\mathcal{X}}\beta^{i}_{x}=1,\mbox{ }\forall i\in\mathcal{R} $\\
					{\scriptsize \cite{LiLee2005}}&&\\
					&&\\
					\textbf{Cairns-Blake-Dowd (CBD)}	&$ \eta_{x,t}=\kappa^{\left[1\right]}_{t}+\kappa^{\left[2\right]}_{t}\left(x-\bar{x}\right) $	& \\&&\\[-0.8em]
					{\scriptsize \cite{CairnsBlakeDowd2006}} &&\\
					&&\\
					\textbf{Renshaw-Haberman (RH)}	&	$ \eta_{x,t}=\alpha_{x}+\beta_{x}\kappa_{t}+\gamma_{t-x} $ & $ \sum_{t\in\mathcal{T}}\kappa_{t}=0 $, $\quad \sum_{x\in\mathcal{X}}\beta_{x}=1 $, \\&&\\[-0.8em]
					{\scriptsize\cite{RenshawHaberman2006},} & 		 & $\sum_{t-x\in\mathcal{C}}\gamma_{t-x}=0 $\\
					{\scriptsize\cite{HabermanRenshaw2011}} &	&\\
					&&\\
					\textbf{Age-Period-Cohort (APC)}	&	$ \eta_{x,t}=\alpha_{x}+\kappa_{t}+\gamma_{t-x} $ & $ \sum_{t\in\mathcal{T}}\kappa_{t}=0 $, 
					$\quad \sum_{t-x\in\mathcal{C}}\gamma_{t-x}=0 $,\\&&\\[-0.8em]
					{\scriptsize\cite{Currie2006}}	&	& $\sum_{t-x\in\mathcal{C}}\left(t-x\right)\gamma_{t-x}=0 $\\
					&&\\
					\textbf{M6} 			&	$ \eta_{x,t}=\kappa^{\left[1\right]}_{t}+\kappa^{\left[2\right]}_{t}\left(x-\bar{x}\right)+\gamma_{t-x} $	& $ \sum_{t-x\in\mathcal{C}}\gamma_{t-x}=0 $, 
					\\&&\\[-0.8em]
					{\scriptsize\cite{Cairnsetal2009}}		&	&$\sum_{t-x\in\mathcal{C}}\left(t-x\right)\gamma_{t-x}=0 $\\
					&&\\
					\textbf{M7} 			&	$ \eta_{x,t}=\kappa^{\left[1\right]}_{t}+\kappa^{\left[2\right]}_{t}\left(x-\bar{x}\right) $ & $ \sum_{t-x\in\mathcal{C}}\gamma_{t-x}=0 $, 
					\\&&\\[-0.8em]
					{\scriptsize\cite{Cairnsetal2009}}		& $ \mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }+\kappa^{\left[3\right]}_{t}\left(\left(x-\bar{x}\right)-\hat{\sigma}^{2}_{x}\right)+\gamma_{t-x} $	& $ \sum_{t-x\in\mathcal{C}}\left(t-x\right)\gamma_{t-x}=0 $, \\&&\\[-0.8em]
					&											&$ \sum_{t-x\in\mathcal{C}}\left(t-x\right)^{2}\gamma_{t-x}=0 $\\
					&&\\
					\textbf{(Full) Plat	}			&	$ \eta_{x,t} = \alpha_{x}+\kappa^{\left[1\right]}_{t}+\kappa^{\left[2\right]}_{t}\left(\bar{x}-x\right) $  & $ \sum_{t\in\mathcal{T}}\kappa^{\left[1\right]}_{t}=0 $, 
					$\quad \sum_{t\in\mathcal{T}}\kappa^{\left[2\right]}_{t}=0 $, \\&&\\[-0.8em]
					{\scriptsize\cite{Plat2009}}	& $ \mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }\mbox{ }+\kappa^{\left[3\right]}_{t}\left(\bar{x}-x\right)^{+}+\gamma_{t-x} $	&	$\sum_{t\in\mathcal{T}}\kappa^{\left[3\right]}_{t}=0 $, $\quad\sum_{t-x\in\mathcal{C}}\gamma_{t-x}=0 $,\\&&\\[-0.8em]
					&		& $\sum_{t-x\in\mathcal{C}}\left(t-x\right)\gamma_{t-x}=0 $, \\&&\\[-0.8em]
					&		& $ \sum_{t-x\in\mathcal{C}}\left(t-x\right)^{2}\gamma_{t-x}=0 $\\
					&&\\
					\textbf{(Reduced) Plat}						&	$ \eta_{x,t}=\alpha_{x}+\kappa^{\left[1\right]}_{t}+\kappa^{\left[2\right]}_{t}\left(\bar{x}-x\right)+\gamma_{t-x} $ & $\sum_{t\in\mathcal{T}}\kappa^{\left[1\right]}_{t}=0 $, 
					$\quad \sum_{t\in\mathcal{T}}\kappa^{\left[2\right]}_{t}=0 $, \\&&\\[-0.8em]
					{\scriptsize\cite{Plat2009}}	&	&	 
					$\sum_{t-x\in\mathcal{C}}\gamma_{t-x}=0 $, \\&&\\[-0.8em]
					&& $\sum_{t-x\in\mathcal{C}}\left(t-x\right)\gamma_{t-x}=0 $, \\&&\\[-0.8em]
					&&	$\sum_{t-x\in\mathcal{C}}\left(t-x\right)^{2}\gamma_{t-x}=0 $\\ 
					&&\\
					\hline	
				\end{tabular*}
			\end{scriptsize}
		\smallskip
		\begin{minipage}{\linewidth} \scriptsize
			Notes: $ \mathcal{T} $ is the set of calendar years, $ \mathcal{X} $ is the set of ages, $ \mathcal{C} $ is the set of cohorts, and $ \mathcal{R} $ is the set of regions. Each model is fit and forecast in its pure form, as well as in combination with random forest, using \hyperref[procedure:RF_combined]{Procedure 1}. 
		\end{minipage}
	\end{table}%			

	The Augmented Common Factor (ACF) model developed by \textcite{LiLee2005} is an extended version of the Lee-Carter (LC) model built to handle multiple populations (e.g., men and women, different countries, etc.). In the ACF model, common mortality tendencies across populations are identified using a common factor approach, while at the same time, mortality schedules are allowed to vary between populations. The superscript $ i $ refers to a particular population. Thus, $ \alpha^{i}_{x} $ and $ \beta^{i}_{x}\kappa^{i}_{t} $ are population-specific, while $ B_{x}K_{t} $ is specific to the `pooled' population. The model is fit by first estimating the common factors, $ B_{x} $ and $ K_{t} $, from a LC model of the pooled population, which in this paper is regions (see Table \ref{tab:overview_countries} in Appendix \ref{sec:App_data}). Next, $ \alpha^{i}_{x} $ is estimated for each population as the average $ \log $-mortality rate at each age. Finally, $ \beta^{i}_{x} $, and $ \kappa^{i}_{t} $ are estimated for each population by applying the singular value decomposition (SVD) to the residual matrix $ \ln m^{i}_{x,t} - \alpha^{i}_{x} - B_{x}K_{t} $.




	\section{The Model Confidence Set Procedure}
	\label{sec:App_MCSalgo}

	Formally, the MCS procedure starts from an initial set of models, $ \mathcal{M}_{0} $, consisting of all models described in Section 3. %\ref{sec:all_models}. 
	Assuming the total number of models is $ M $, the MCS procedure then delivers a SSM, $ \hat{\mathcal{M}}_{1-\alpha}^{*} $, consisting of $ M^{*}\leq M $ models, given a user specified confidence level $ 1-\alpha $. Let $ L_{i,t}  $ be the loss function associated with model $ i $ at time $ t $. The loss differential between model $ i $ and model $ j $, $ d_{ij,t} $, can then be defined as \begin{equation}\label{eq:loss_diff}
	d_{ij,t} = L_{i,t} - L_{j,t},\mbox{ }\mbox{ }\mbox{ }\mbox{ }i,j=1,...,M,\mbox{ }\mbox{ }\mbox{ }\mbox{ }t=1,...,T.
	\end{equation} The loss function applied in this paper is the squared error loss,\begin{equation}
	L_{i,t} = \left(\ln m_{t}-\widehat{\ln m}_{t}^{i}\right)^{2}.
	\end{equation} The null hypothesis of equal predictive ability can be formulated based on the expected value of (\ref{eq:loss_diff}),\begin{equation}\label{eq:H0}\begin{split}
	H_{0,\mathcal{M}}&\mbox{ : }\mathbb{E}\left(d_{ij}\right)=0,\mbox{ }\mbox{ }\mbox{ }\mbox{ for all }i,j=1,...,M\\
	H_{A,\mathcal{M}}&\mbox{ : }\mathbb{E}\left(d_{ij}\right)\neq 0,\mbox{ }\mbox{ }\mbox{ }\mbox{ for some }i,j=1,...,M.
	\end{split}\end{equation} At each iteration of the MCS procedure, the hypothesis in (\ref{eq:H0}) is tested for the remaining models. 
	
	\textcite{HansenLundeNason2011} construct the \textit{t}-statistic, \begin{equation}\label{eq:t_ij_stat}
	t_{ij}=\frac{\bar{d}_{ij}}{\sqrt{\widehat{\mbox{var}}\left(\bar{d}_{ij}\right)}}\mbox{ }\mbox{ for }i,j\in \mathcal{M},
	\end{equation} where $ \bar{d}_{ij}=T^{-1}\sum_{t=1}^{T}d_{ij,t} $ is the relative sample loss between model $ i $ and model $ j $, and $ \widehat{\mbox{var}}\left(\bar{d}_{ij}\right) $ is the estimated variance of $ \bar{d}_{ij} $. Using (\ref{eq:t_ij_stat}), \textcite{HansenLundeNason2011} argue that the null hypothesis in (\ref{eq:H0}) maps naturally into the test statistic\begin{equation}
	T_{R,\mathcal{M}}=\max_{i,j\in \mathcal{M}}\left|t_{ij}\right|,
	\end{equation} which has a non-standard, asymptotic distribution that can be estimated with bootstrap methods \parencites(see)()[][]{Kilian1999}[][]{White2000}[][]{Hansen2003}[][]{Hansen2005}[][]{ClarkMcCracken2005}. With the test statistic, $ T_{R,\mathcal{M}} $, the model to be eliminated can be identified via the elimination rule \begin{equation}\label{eq:elim_rule}
	e_{R,\mathcal{M}}=\arg\max_{i\in \mathcal{M}}\sup_{j\in \mathcal{M}}t_{ij},
	\end{equation} because the model, $ e_{R,\mathcal{M}} $, is such that for some $ j\in \mathcal{M} $, $ t_{e_{R,\mathcal{M}},j} =T_{R,\mathcal{M}}$. 
	
	The algorithm behind the MCS procedure is summarized in the following:
	
	
	\begin{mdframed}[skipabove=\topsep,skipbelow=\topsep] \label{algo:MCS}	
		\smallskip
		\textbf{Algorithm 3:} The Model Confidence Set procedure\\
		{\small \parencite[Step 1 through 3, page 5 in][]{MCSpackage}}
		\begin{enumerate}
			\item Set $ \mathcal{M}=\mathcal{M}_{0} $ (where $ \mathcal{M}_{0} $ is the initial set of models).
			\item \label{algo_stepMCS} Test $ H_{0,\mathcal{M}}\mbox{ : }\mathbb{E}\left(d_{ij}\right)=0 $ for all $ i,j\in \mathcal{M} $, given the confidence level $ \alpha $. If $ H_{0,\mathcal{M}} $  cannot be rejected, terminate the algorithm and set $ \hat{\mathcal{M}}_{1-\alpha}^{*}=\mathcal{M} $. If instead $ H_{0,\mathcal{M}} $ is rejected, eliminate the worst-performing model from $ \mathcal{M} $ according to the elimination rule in (\ref{eq:elim_rule}).
			\item Go to step \ref{algo_stepMCS} using the reduced set of models.
		\end{enumerate}
	\end{mdframed}






	
	\section{Robustness Checks}
	\label{sec:App_robustness}


	\subsection{Forecasting Comparison Based on RMSE and MAPE}
	\label{sec:App_RMSE_MAPE}
	
	Table \ref{tab:RMSE_ALL} shows in percentage the frequency at which each model achieves the smallest root mean square error (RMSE) on the test set compared to all competing models. Similarly, Table \ref{tab:MAPE_ALL} shows in percentage the frequency at which each model achieves the smallest mean absolute percentage error (MAPE) on the test set compared to all competing models. The results are displayed for the two different age ranges: 59-89 and 20-89. In both tables, darker shadings are used to mark larger percentages.
	

	\begin{table}[tp!]	
		\centering
		\caption{Lowest RMSE for each training and test set combination}
		\label{tab:RMSE_ALL}
			\begin{scriptsize}
				\begin{tabular}{lccccccccccc}
					\hline
					\\[-1.8ex]
					Forecast horizon:	& \multicolumn{5}{c}{30 years}			&& \multicolumn{5}{c}{16 years}	\\ 
					\cline{2-6}\cline{8-12}
					\\[-1.7ex]
					Fitting period:		& \multicolumn{2}{c}{1936-1986}	&& \multicolumn{2}{c}{1961-1986}	&& \multicolumn{2}{c}{1950-2000}	&& \multicolumn{2}{c}{1975-2000} \\ 
					\cline{2-3}\cline{5-6}\cline{8-9}\cline{11-12}
					\\[-1.7ex]
					Age range:		& 59-89	& 20-89	&&	59-89	& 20-89	&& 59-89	& 20-89	&& 59-89	& 20-89	\\ 
					\\[-1.9ex]
					\hline
					\\[-2ex]
					LC & 0\% & 0\% &  & 2\% & 2\% &  & 0\% & 0\% &  & 2\% & 0\% \\ 
					ACF & 0\% & 0\% &  & 2\% & 0\% &  & 0\% & 0\% &  & 0\% & 3\% \\ 
					CBD & 3\% & 3\% &  & 0\% & 3\% &  & 0\% & \cellcolor{g3}20\% &  & 2\% & \cellcolor{g2}12\% \\ 
					APC & 0\% & \cellcolor{g2}18\% &  & 3\% & 5\% &  & 0\% & 2\% &  & 2\% & 2\% \\ 
					RH & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 0\% &  & 2\% & 0\% \\ 
					M6 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
					M7 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 3\% \\ 
					Plat (full) & 3\% & 3\% &  & 5\% & 3\% &  & 2\% & 0\% &  & 0\% & 5\% \\ 
					Plat (reduced) & 0\% & 9\% &  & 0\% & 6\% &  & 2\% & 2\% &  & 2\% & 0\% \\ 
					Pure RF & 6\% & \cellcolor{g3}21\% &  & \cellcolor{g3}26\% & \cellcolor{g3}29\% &  & \cellcolor{g4}30\% & 6\% &  & \cellcolor{g3}23\% & \cellcolor{g2}18\% \\ 
					Pure GB & \cellcolor{g5}47\% & \cellcolor{g2}12\% &  & \cellcolor{g5}42\% & \cellcolor{g3}20\% &  & \cellcolor{g2}16\% & \cellcolor{g2}12\% &  & \cellcolor{g2}14\% & 5\% \\ 
					RF/ARIMA & 6\% & 0\% &  & 0\% & 3\% &  & 0\% & 8\% &  & 0\% & 3\% \\ 
					RF/LC & 0\% & 6\% &  & 2\% & 0\% &  & 2\% & 0\% &  & 0\% & 0\% \\ 
					RF/ACF & \cellcolor{g2}12\% & 3\% &  & 3\% & 2\% &  & 2\% & 2\% &  & 5\% & 8\% \\ 
					RF/CBD & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
					RF/APC & 0\% & 6\% &  & 3\% & 2\% &  & 0\% & 6\% &  & 5\% & 0\% \\ 
					RF/RH & 0\% & 0\% &  & 0\% & 3\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
					RF/M6 & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
					RF/M7 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
					RF/Plat (full) & 3\% & 0\% &  & 0\% & 0\% &  & 2\% & 2\% &  & 0\% & 6\% \\ 
					RF/Plat (reduced) & 3\% & 0\% &  & 0\% & 2\% &  & 0\% & 4\% &  & 0\% & 6\% \\ 
					GB/ARIMA & 3\% & 0\% &  & 0\% & 3\% &  & 4\% & 8\% &  & 2\% & 3\% \\ 
					GB/LC & 6\% & 6\% &  & 2\% & 2\% &  & 0\% & 0\% &  & 3\% & 0\% \\ 
					GB/ACF & 6\% & 6\% &  & \cellcolor{g2}11\% & 6\% &  & 6\% & 8\% &  & \cellcolor{g2}11\% & 2\% \\ 
					GB/CBD & 0\% & 0\% &  & 2\% & 2\% &  & 0\% & 0\% &  & 8\% & 0\% \\ 
					GB/APC & 3\% & 3\% &  & 0\% & 3\% &  & \cellcolor{g3}26\% & 2\% &  & \cellcolor{g2}18\% & \cellcolor{g2}14\% \\ 
					GB/RH & 0\% & 3\% &  & 0\% & 0\% &  & 4\% & 6\% &  & 0\% & 0\% \\ 
					GB/M6 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 4\% &  & 5\% & 3\% \\ 
					GB/M7 & 0\% & 3\% &  & 0\% & 2\% &  & 0\% & 2\% &  & 0\% & 2\% \\ 
					GB/Plat (full) & 0\% & 0\% &  & 0\% & 0\% &  & 4\% & 0\% &  & 2\% & 5\% \\ 
					GB/Plat (reduced) & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 6\% &  & 0\% & 3\% \\ 
					\hline
					\\[-1.8ex]
					\# country-gender combinations & \multicolumn{2}{c}{34} && \multicolumn{2}{c}{66} && \multicolumn{2}{c}{50} && \multicolumn{2}{c}{66} \\ 
					\hline
				\end{tabular}
			\end{scriptsize}
		\begin{minipage}{0.96\linewidth} \scriptsize
			Notes: Within each column, the percentages are calculated as the frequency at which each model achieves the lowest RMSE across all country-gender combinations. Each column adds up to 100\%, since only one model can have the lowest RMSE. The larger the percentage, the darker is the shade marking the cell.
		\end{minipage}
	\end{table}%

	
	\begin{table}[tp!]	
		\centering
		\caption{Lowest MAPE for each training and test set combination}
		\label{tab:MAPE_ALL}
		\begin{scriptsize}
			\begin{tabular}{lccccccccccc}
				\hline
				\\[-1.8ex]
				Forecast horizon:	& \multicolumn{5}{c}{30 years}			&& \multicolumn{5}{c}{16 years}	\\ 
				\cline{2-6}\cline{8-12}
				\\[-1.7ex]
				Fitting period:		& \multicolumn{2}{c}{1936-1986}	&& \multicolumn{2}{c}{1961-1986}	&& \multicolumn{2}{c}{1950-2000}	&& \multicolumn{2}{c}{1975-2000} \\ 
				\cline{2-3}\cline{5-6}\cline{8-9}\cline{11-12}
				\\[-1.7ex]
				Age range:		& 59-89	& 20-89	&&	59-89	& 20-89	&& 59-89	& 20-89	&& 59-89	& 20-89	\\ 
				\\[-1.9ex]
				\hline
				\\[-2ex]
				LC & 0\% & 0\% &  & 0\% & 5\% &  & 0\% & 0\% &  & 6\% & 0\% \\ 
				ACF & 0\% & 3\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 2\% \\ 
				CBD & 0\% & 3\% &  & 0\% & 8\% &  & 2\% & 6\% &  & 2\% & 3\% \\ 
				APC & 0\% & \cellcolor{g2}18\% &  & 3\% & 2\% &  & 0\% & 4\% &  & 2\% & 2\% \\ 
				RH & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
				M6 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 2\% & 0\% \\ 
				M7 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 2\% \\ 
				Plat (full) & 0\% & 0\% &  & 5\% & 3\% &  & 2\% & 0\% &  & 0\% & 3\% \\ 
				Plat (reduced) & 0\% & 3\% &  & 3\% & 2\% &  & 0\% & 4\% &  & 2\% & 5\% \\ 
				Pure RF & \cellcolor{g2}12\% & \cellcolor{g3}24\% &  & \cellcolor{g3}24\% & \cellcolor{g4}35\% &  & \cellcolor{g4}38\% & 8\% &  & \cellcolor{g2}17\% & \cellcolor{g3}24\% \\ 
				Pure GB & \cellcolor{g5}44\% & \cellcolor{g2}12\% &  & \cellcolor{g4}39\% & \cellcolor{g2}14\% &  & \cellcolor{g2}10\% & \cellcolor{g3}24\% &  & \cellcolor{g2}14\% & 5\% \\ 
				RF/ARIMA & 3\% & 3\% &  & 0\% & 3\% &  & 0\% & \cellcolor{g2}10\% &  & 0\% & 2\% \\ 
				RF/LC & 0\% & 3\% &  & 5\% & 0\% &  & 4\% & 0\% &  & 0\% & 2\% \\ 
				RF/ACF & \cellcolor{g2}12\% & 3\% &  & 5\% & 0\% &  & 2\% & 0\% &  & 3\% & 2\% \\ 
				RF/CBD & 3\% & 0\% &  & 0\% & 3\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
				RF/APC & 0\% & 3\% &  & 2\% & 3\% &  & 2\% & 6\% &  & 5\% & 3\% \\ 
				RF/RH & 0\% & 0\% &  & 2\% & 3\% &  & 0\% & 2\% &  & 0\% & 0\% \\ 
				RF/M6 & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 2\% &  & 2\% & 3\% \\ 
				RF/M7 & 0\% & 0\% &  & 2\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% \\ 
				RF/Plat (full) & 9\% & 0\% &  & 2\% & 0\% &  & 2\% & 4\% &  & 2\% & 5\% \\ 
				RF/Plat (reduced) & 3\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 6\% \\ 
				GB/ARIMA & 0\% & 0\% &  & 0\% & 3\% &  & 4\% & 6\% &  & 3\% & 3\% \\ 
				GB/LC & 6\% & 6\% &  & 2\% & 2\% &  & 2\% & 0\% &  & 3\% & 0\% \\ 
				GB/ACF & 9\% & 3\% &  & 8\% & 8\% &  & 4\% & 2\% &  & \cellcolor{g2}12\% & 2\% \\ 
				GB/CBD & 0\% & 0\% &  & 0\% & 0\% &  & 0\% & 0\% &  & 5\% & 0\% \\ 
				GB/APC & 0\% & \cellcolor{g2}12\% &  & 0\% & 3\% &  & \cellcolor{g2}18\% & 2\% &  & \cellcolor{g2}18\% & \cellcolor{g2}15\% \\ 
				GB/RH & 0\% & 0\% &  & 2\% & 0\% &  & 6\% & 4\% &  & 3\% & 3\% \\ 
				GB/M6 & 0\% & 0\% &  & 0\% & 2\% &  & 0\% & 2\% &  & 2\% & 0\% \\ 
				GB/M7 & 0\% & 3\% &  & 0\% & 2\% &  & 0\% & 2\% &  & 0\% & 2\% \\ 
				GB/Plat (full) & 0\% & 0\% &  & 0\% & 0\% &  & 4\% & 2\% &  & 2\% & 8\% \\ 
				GB/Plat (reduced) & 0\% & 3\% &  & 0\% & 2\% &  & 0\% & 8\% &  & 0\% & 3\% \\ 
				\hline
				\\[-1.8ex]
				\# country-gender combinations & \multicolumn{2}{c}{34} && \multicolumn{2}{c}{66} && \multicolumn{2}{c}{50} && \multicolumn{2}{c}{66} \\ 
				\hline
			\end{tabular}
		\end{scriptsize}
		\begin{minipage}{0.97\textwidth} \scriptsize
			Notes: Within each column, the percentages are calculated as the frequency at which each model achieves the lowest MAPE across all country-gender combinations. Each column adds up to 100\%, since only one model can have the lowest MAPE. The larger the percentage, the darker is the shade marking the cell. 
		\end{minipage}
	\end{table}%


	
\newpage

	\subsection{Head-to-Head Forecasting Comparisons}
	\label{sec:App_head-to-head}
	
	
	This appendix provides additional details about the head-to-head comparison in Section 5.2. %\ref{sec:head}. 
	The head-to-head comparisons are based on the fitting period 1961-1986 with a forecast horizon of 30 years (both age ranges). For the Lee-Carter comparison, we also include the \textcite{LevantesiPizzorusso2019} random forests and gradient boosting improved Lee-Carter models. The procedure for estimating these models is similar to our approach with respect to the fitting part (although using a different transformation) but differs with respect to the forecasting part. In particular, the transformation step (step 2 of Procedure 1 in Section 3.2) is replaced with
	%(step \ref{my_procedure_step2} of \hyperref[procedure:RF_combined]{Procedure 1} in Section \ref{sec:RF_mortality}) is replaced with
	\begin{enumerate}
		\setcounter{enumi}{1}
		\item Construct $ \psi^{LC}_{x,t} = \frac{D_{x,t}}{\hat{D}^{LC}_{x,t}}$, where $ D_{x,t} $ is the actual number of deaths, and $ \hat{D}^{LC}_{x,t} $ is the estimated number of deaths according to the LC model.
	\end{enumerate} Next, they fit $ \psi^{LC}_{x,t} $ using random forests or gradient boosting (similarly to step 3 of Procedure 1) and obtain the fitted values of the random forests/gradient boosting estimator, $ \psi^{LC,ML}_{x,t} $ where ML refers to either RF or GB. Forecasting of the random forests/gradient boosting estimator is based on the original LC framework, as opposed to the random forests/gradient boosting framework. Thus, step 4 of Procedure 1 is replaced with\begin{enumerate}
		\setcounter{enumi}{3}
		\item Fit and forecast $ \ln\psi^{LC,ML}_{x,t} $ using the LC framework, resulting in the following LC model improved by random forests/gradient boosting: \begin{equation}
		\widehat{\ln m}^{LC,ML}_{x,t} = \widehat{\ln m}^{LC}_{x,t}+\ln\psi^{LC,ML}_{x,t} = \left(\alpha^{LC}_{x}+\alpha^{\psi}_{x}\right) + \beta^{LC}_{x}\kappa^{LC}_{t} + \beta^{\psi}_{x}\kappa^{\psi}_{t},
		\end{equation} where both $ \kappa^{LC}_{t} $ and $ \kappa^{\psi}_{t} $ are forecast using random walks with drift. 
	\end{enumerate} These models are denoted ``RF/LC ($ \psi $)'' or ``GB/LC ($ \psi $)'' in Table 3 in Section 5.2 %\ref{tab:SSM_all_head} in Section \ref{sec:head} 
	and in Table \ref{tab:RMSE_LChead_countries}.

		

	\begin{table}[t!]	
		\centering
			\caption{RMSE for 30-year Lee-Carter forecasts with fitting period 1961-1986 for a selection of countries}
			\label{tab:RMSE_LChead_countries}
			\begin{scriptsize}
				\begin{tabular}{lccccccccccc}
					\hline
					\\[-1.8ex]
					\multicolumn{2}{l}{\textbf{Age range: 59-89}} &&&&&&&&&& \\
					\\[-1.8ex]
					& \multicolumn{2}{c}{Italy} &&\multicolumn{2}{c}{France} && \multicolumn{2}{c}{Denmark} && \multicolumn{2}{c}{USA} \\
					\cline{2-3}\cline{5-6}\cline{8-9}\cline{11-12}
					\\[-1.8ex]
					& Female & Male && Female & Male && Female & Male  && Female & Male  \\ 
					\hline
					\\[-1.8ex]
					LC 				& \textbf{0.1554} & \textbf{0.3463} && \textbf{0.1269} & 0.2172 && 0.1999 & \textbf{0.3229} && 0.0899 & \textbf{0.1623} \\ 
					RF/LC ($ r $)	& 0.1593 & 0.3502 && 0.1289 & 0.2212 && \textbf{0.1993} & 0.3303 && \textbf{0.0882} & 0.1660 \\ 
					GB/LC ($ r $)	& 0.1577 & 0.3489 && 0.1278 & \textbf{0.2203} && 0.2000 & 0.3347 && 0.0899 & 0.1626 \\ 
					RF/LC ($ \psi $)& 0.1566 & 0.3474 && 0.1274 & 0.2179 && 0.2034 & 0.3249 && 0.0898 & 0.1624 \\ 
					GB/LC ($ \psi $)& 0.1565 & 0.3474 && 0.1276 & 0.2182 && 0.2053 & 0.3259 && 0.0897 & 0.1625 \\ 
					&&&&&&&&&&&\\
					\hline
					\\[-1.8ex]
					\multicolumn{2}{l}{\textbf{Age range: 20-89}}  &&&&&&&&&& \\
					\\[-1.8ex]
					& \multicolumn{2}{c}{Italy} &&\multicolumn{2}{c}{France} && \multicolumn{2}{c}{Denmark} && \multicolumn{2}{c}{USA} \\
					\cline{2-3}\cline{5-6}\cline{8-9}\cline{11-12}
					\\[-1.8ex]
					& Female & Male && Female & Male && Female & Male  && Female & Male  \\ 
					\hline
					\\[-1.8ex]
					LC				& 0.1563 & 0.3134 && 0.1745 & 0.2942 && 0.3966 & 0.4154 && \textbf{0.1682} & 0.1767 \\ 
					RF/LC ($ r $) 	& 0.1644 & \textbf{0.3105} && 0.1659 & 0.2774 && 0.3768 & 0.3937 && 0.1848 & 0.1671 \\ 
					GB/LC ($ r $) 	& \textbf{0.1536} & 0.3117 && \textbf{0.1636} & \textbf{0.2767} && \textbf{0.3594} & \textbf{0.3790} && 0.1880 & \textbf{0.1668} \\ 
					RF/LC ($ \psi $)& 0.1559 & 0.3129 && 0.1688 & 0.2889 && 0.3938 & 0.4099 && 0.1698 & 0.1748 \\ 
					GB/LC ($ \psi $)& 0.1539 & 0.3128 && 0.1729 & 0.2916 && 0.3974 & 0.4144 && 0.1701 & 0.1748 \\ 
					\hline
				\end{tabular}
			\end{scriptsize}
		\begin{minipage}{0.91\linewidth} \scriptsize
				Notes: Boldface indicates lowest RMSE within a column.
		\end{minipage}
	\end{table}%



\newpage


	\subsection{Forecasting Comparison using the \texttt{distRforest} Package for Random Forests}
	\label{sec:RF_poi}
	
	In this appendix, we produce forecasting results when the random forests algorithm used for estimating the RF variants of the stochastic mortality models is based on the \texttt{R} package \texttt{distRforest} (see \cite{distRforest}). The \texttt{distRforest} package is an extension of the \texttt{rpart} package (see \cite{rpart}) that implements random forests with distribution-based loss functions. In particular, the \texttt{distRforest} package allows for a random forests implementation on count data using the Poisson distribution. The results are produced for the 30-year forecast with fitting period 1961-1986. We consider both age ranges (59-89 and 20-89). 
	
	
	The procedure differs slightly from Procedure 1 in Section 3.2. %\ref{sec:RF_mortality}. 
	In particular, the number of deaths are modeled as in \textcite{DeprezShevchenkoWuthrich2017}, i.e. \begin{equation}
	D\left(x,t\right) \sim Poisson\left(E\left(x,t\right)\cdot q\left(x,t\right)\cdot q_{RF}\left(x,t\right) \right)
	\end{equation} The procedure for estimating and forecasting this model using the stochastic mortality models presented in Table \ref{tab:stoch_models} is similar to Procedure 1, but replacing step 2 with \begin{enumerate}
		\setcounter{enumi}{1}
		\item Construct $ \psi^{model}_{x,t} = \frac{D_{x,t}}{\hat{D}^{model}_{x,t}}$, where $ D_{x,t} $ is the actual number of deaths, and $ \hat{D}^{model}_{x,t} $ is the estimated number of deaths according to some stochastic mortality model.
	\end{enumerate} while step 4 is replaced with \begin{enumerate}
		\setcounter{enumi}{3}
		\item Obtain the random forests forecast values $ \hat{\psi}^{model,RF}_{x,t} $ and construct the random forests improved forecasts $ \widehat{\ln m}^{model,RF}_{x,t+h} = \ln\left[\widehat{m}^{model}_{x,t+h} \cdot \hat{\psi}^{model,RF}_{x,t+h}\right] $
	\end{enumerate} Additionally, the random forests algorithm uses the Poisson deviance (rather than MSE) when making variable split decisions. Table \ref{tab:RMSE_SSM_poi} shows results based on the two performance measures: RMSE (columns 2-3) and MCS (columns 4-5). Comparing these results to the original results in Table \ref{tab:RMSE_ALL}, columns 4-5 in Appendix \ref{sec:App_RMSE_MAPE} and Table 2, 	%\ref{tab:SSM_ALL}, 
	columns 4-5 in Section 5 %\ref{sec:results} 
	reveals that using the Poisson deviance and the procedure described above does not change the results significantly.
		
	
	\begin{table}[t!]	
		\centering
			\caption{Lowest RMSE and superior set of models for 30-year forecast with fitting period 1961-1986 using \texttt{distRforest} for random forest models}
			\label{tab:RMSE_SSM_poi}
			\begin{scriptsize}
				\begin{tabular}{L{0.2\linewidth}C{0.1\linewidth}C{0.1\linewidth}C{0.05\linewidth}C{0.1\linewidth}C{0.1\linewidth}}
					\hline
					\\[-1.8ex]
					& \multicolumn{2}{c}{Lowest RMSE}	&& \multicolumn{2}{c}{Superior set of models} \\ 
					\cline{2-3}\cline{5-6}
					\\[-1.7ex]
					Age range:		& 59-89	& 20-89	&&	59-89	& 20-89	\\ 
					\\[-1.9ex]
					\hline
					\\[-2ex]
					LC & 2\% & 2\% && 3\% & 5\% \\ 
					ACF & 2\% & 0\% && 3\% & 6\% \\ 
					CBD & 0\% & 3\% && 0\% & \cellcolor{g2}14\% \\ 
					APC & 0\% & 2\% && 0\% & 2\% \\ 
					RH & 0\% & 2\% && 0\% & 3\% \\ 
					M6 & 0\% & 0\% && 0\% & 0\% \\ 
					M7 & 0\% & 0\% && 0\% & 2\% \\ 
					Plat (full) & 5\% & 0\% && 6\% & 2\% \\ 
					Plat (reduced) & 0\% & 8\% && 2\% & 8\% \\ 
					Pure RF & \cellcolor{g3}26\% & \cellcolor{g3}29\% && \cellcolor{g3}27\% & \cellcolor{g4}35\% \\ 
					Pure GB & \cellcolor{g4}35\% & \cellcolor{g3}20\% && \cellcolor{g4}39\% & \cellcolor{g3}24\% \\ 
					RF/ARIMA & 0\% & 3\% && 2\% & 6\% \\ 
					RF/LC & 2\% & 0\% && 3\% & 0\% \\ 
					RF/ACF & 9\% & 3\% && \cellcolor{g2}15\% & 5\% \\ 
					RF/CBD & 0\% & 2\% && 2\% & 3\% \\ 
					RF/APC & 3\% & 3\% && 6\% & 3\% \\ 
					RF/RH & 0\% & 2\% && 0\% & 2\% \\ 
					RF/M6 & 0\% & 2\% && 2\% & 2\% \\ 
					RF/M7 & 0\% & 0\% && 0\% & 0\% \\ 
					RF/Plat (full) & 0\% & 3\% && 3\% & 6\% \\ 
					RF/Plat (reduced) & 0\% & 0\% && 2\% & 2\% \\ 
					GB/ARIMA & 0\% & 3\% && 2\% & 5\% \\ 
					GB/LC & 2\% & 2\% && 2\% & 3\% \\ 
					GB/ACF & \cellcolor{g2}12\% & 5\% && \cellcolor{g2}12\% & 9\% \\ 
					GB/CBD & 2\% & 2\% && 2\% & 5\% \\ 
					GB/APC & 3\% & 5\% && 5\% & 9\% \\ 
					GB/RH & 0\% & 2\% && 0\% & 5\% \\ 
					GB/M6 & 0\% & 0\% && 2\% & 0\% \\ 
					GB/M7 & 0\% & 2\% && 0\% & 2\% \\ 
					GB/Plat (full) & 0\% & 0\% && 3\% & 3\% \\ 
					GB/Plat (reduced) & 0\% & 2\% && 2\% & 3\% \\ 
					\hline
				\end{tabular}
			\end{scriptsize}
		\begin{minipage}{0.8\linewidth} \scriptsize
				Notes: Within each column, the percentages are calculated as the frequency at which each model achieves the lowest RMSE (columns 2-3) or is part of the SSM (columns 4-5) across all country-gender combinations. The larger the percentage, the darker is the shade marking the cell. 
		\end{minipage}
	\end{table}%



	\subsection{Forecasting Comparison when Including/Accounting for Mortality Shocks}
	\label{sec:mortality_shocks}
	
	In this appendix, we compare mortality forecasts that accounts for mortality shocks in the estimation phase. The results were produced for the 30-year forecast horizon with fitting period 1936-1986 for both age ranges. For the random forests and gradient boosting models, we include three mortality shock dummies in the set of features corresponding to World War II (1939-1945), the Asian Flu (1957-1958), and the Hong Kong Flu (1968-1969). The stochastic mortality models were fit for the entire period, but the refitting of the time components ($ \kappa_{t} $-s) was based on 1972-1986 (15 years), thereby avoiding any of the mortality shocks mentioned above when refitting $ \kappa_{t} $. Table \ref{tab:RMSE_SSM_shocks} presents the results based on the two performance measures: RMSE (columns 2-3) and MCS (columns 4-5). Comparing these results to the original results in Table \ref{tab:RMSE_ALL}, columns 4-5 in Appendix \ref{sec:App_RMSE_MAPE} and Table 2, %\ref{tab:SSM_ALL}, 
	columns 4-5 in Section 5 %\ref{sec:results} 
	reveals that including/accounting for mortality shocks does not change the results significantly.

	\begin{table}[t!]	
		\centering
			\caption{Lowest RMSE and superior set of models for 30-year forecast with fitting period 1936-1986 when accounting for mortality shocks}
			\label{tab:RMSE_SSM_shocks}
			\begin{scriptsize}
				\begin{tabular}{L{0.2\linewidth}C{0.1\linewidth}C{0.1\linewidth}C{0.05\linewidth}C{0.1\linewidth}C{0.1\linewidth}}
					\hline
					\\[-1.8ex]
					& \multicolumn{2}{c}{Lowest RMSE}	&& \multicolumn{2}{c}{Superior set of models} \\ 
					\cline{2-3}\cline{5-6}
					\\[-1.7ex]
					Age range:		& 59-89	& 20-89	&&	59-89	& 20-89	\\ 
					\\[-1.9ex]
					\hline
					\\[-2ex]
					LC & 0\% & 3\% && 6\% & 6\% \\ 
					ACF & 0\% & 0\% && 6\% & 3\% \\ 
					CBD & 6\% & \cellcolor{g2}12\% && 6\% & \cellcolor{g2}18\% \\ 
					APC & 3\% & 6\% && 3\% & 9\% \\ 
					RH & 0\% & 0\% && 0\% & 6\% \\ 
					M6 & 0\% & 0\% && 0\% & 0\% \\ 
					M7 & 0\% & 0\% && 0\% & 0\% \\ 
					Plat (full) & 0\% & 3\% && 0\% & 3\% \\ 
					Plat (reduced) & 0\% & \cellcolor{g2}12\% && 0\% & \cellcolor{g2}15\% \\ 
					Pure RF & \cellcolor{g2}12\% & \cellcolor{g3}26\% && \cellcolor{g2}15\% & \cellcolor{g4}35\% \\ 
					Pure GB & \cellcolor{g4}35\% & \cellcolor{g2}12\% && \cellcolor{g4}35\% & \cellcolor{g2}18\% \\ 
					RF/ARIMA & 6\% & 3\% && 6\% & 6\% \\ 
					RF/LC & 3\% & 6\% && 6\% & 6\% \\ 
					RF/ACF & \cellcolor{g2}18\% & 0\% && \cellcolor{g2}18\% & 0\% \\ 
					RF/CBD & 0\% & 3\% && 0\% & 6\% \\ 
					RF/APC & 0\% & 0\% && 0\% & 3\% \\ 
					RF/RH & 0\% & 0\% && 0\% & 3\% \\ 
					RF/M6 & 0\% & 0\% && 0\% & 3\% \\ 
					RF/M7 & 0\% & 0\% && 0\% & 0\% \\ 
					RF/Plat (full) & 0\% & 0\% && 3\% & 3\% \\ 
					RF/Plat (reduced) & 0\% & 0\% && 0\% & 0\% \\ 
					GB/ARIMA & 0\% & 0\% && 0\% & 0\% \\ 
					GB/LC & 0\% & 0\% && 3\% & 3\% \\ 
					GB/ACF & \cellcolor{g2}12\% & 6\% && \cellcolor{g2}15\% & 9\% \\ 
					GB/CBD & 3\% & 0\% && 3\% & 0\% \\ 
					GB/APC & 0\% & 9\% && 0\% & \cellcolor{g2}15\% \\ 
					GB/RH & 3\% & 0\% && 3\% & 6\% \\ 
					GB/M6 & 0\% & 0\% && 0\% & 3\% \\ 
					GB/M7 & 0\% & 0\% && 0\% & 0\% \\ 
					GB/Plat (full) & 0\% & 0\% && 0\% & 3\% \\ 
					GB/Plat (reduced) & 0\% & 0\% && 0\% & 6\% \\ 
					\hline
				\end{tabular}
			\end{scriptsize}
		\begin{minipage}{0.8\linewidth} \scriptsize
				Notes: Within each column, the percentages are calculated as the frequency at which each model achieves the lowest RMSE (columns 2-3) or is part of the SSM (columns 4-5) across all country-gender combinations. The larger the percentage, the darker is the shade marking the cell. 
		\end{minipage}
	\end{table}%




	\subsection{Forecasting Comparison when Excluding the \textit{Cohort} Variable for RF and GB Estimation}
	\label{sec:mortality_no_cohort}
	
	In this appendix, we compare mortality forecasts when excluding \textit{cohort} from the set of features used for estimating and forecasting by random forests and gradient boosting. The results are produced for the 30-year forecast with fitting period 1961-1986. We consider both age ranges (59-89 and 20-89). Table \ref{tab:RMSE_SSM_nocohort} presents the results based on the two performance measures: RMSE (columns 2-3) and MCS (columns 4-5). Comparing these results to the original results in Table \ref{tab:RMSE_ALL}, columns 4-5 in Appendix \ref{sec:App_RMSE_MAPE} and Table 2, %\ref{tab:SSM_ALL}, 
	columns 4-5 in Section 5 %\ref{sec:results} 
	reveals that excluding the \textit{cohort} variable does not change the results significantly.


	\begin{table}[b!]	
		\centering
			\caption{Lowest RMSE and superior set of models for 30-year forecast with fitting period 1961-1986 without the cohort variable for RF and GB}
			\label{tab:RMSE_SSM_nocohort}
			\begin{scriptsize}
				\begin{tabular}{L{0.2\linewidth}C{0.1\linewidth}C{0.1\linewidth}C{0.05\linewidth}C{0.1\linewidth}C{0.1\linewidth}}
					\hline
					\\[-1.8ex]
					& \multicolumn{2}{c}{Lowest RMSE}	&& \multicolumn{2}{c}{Superior set of models} \\ 
					\cline{2-3}\cline{5-6}
					\\[-1.7ex]
					Age range:		& 59-89	& 20-89	&&	59-89	& 20-89	\\ 
					\\[-1.9ex]
					\hline
					\\[-2ex]
					LC & 0\% & 3\% && 5\% & 3\% \\ 
					ACF & 2\% & 0\% && 2\% & 3\% \\ 
					CBD & 0\% & 3\% && 2\% & \cellcolor{g2}11\% \\ 
					APC & 0\% & 5\% && 2\% & 5\% \\ 
					RH & 0\% & 2\% && 0\% & 5\% \\ 
					M6 & 0\% & 2\% && 2\% & 2\% \\ 
					M7 & 0\% & 0\% && 2\% & 0\% \\ 
					Plat (full) & 5\% & 3\% && 6\% & 6\% \\ 
					Plat (reduced) & 0\% & 5\% && 2\% & 8\% \\ 
					Pure RF & \cellcolor{g3}23\% & \cellcolor{g3}26\% && \cellcolor{g3}27\% & \cellcolor{g4}35\% \\ 
					Pure GB & \cellcolor{g5}44\% & \cellcolor{g3}24\% && \cellcolor{g5}45\% & \cellcolor{g3}27\% \\ 
					RF/ARIMA & 0\% & 3\% && 2\% & 6\% \\ 
					RF/LC & 0\% & 0\% && 2\% & 2\% \\ 
					RF/ACF & 5\% & 5\% && \cellcolor{g2}11\% & \cellcolor{g2}11\% \\ 
					RF/CBD & 0\% & 2\% && 2\% & 3\% \\ 
					RF/APC & 0\% & 2\% && 0\% & 2\% \\ 
					RF/RH & 0\% & 2\% && 0\% & 5\% \\ 
					RF/M6 & 0\% & 0\% && 2\% & 2\% \\ 
					RF/M7 & 2\% & 0\% && 3\% & 0\% \\ 
					RF/Plat (full) & 2\% & 0\% && 2\% & 2\% \\ 
					RF/Plat (reduced) & 0\% & 3\% && 2\% & 6\% \\ 
					GB/ARIMA & 0\% & 3\% && 2\% & 6\% \\ 
					GB/LC & 5\% & 0\% && 6\% & 2\% \\ 
					GB/ACF & 8\% & 3\% && \cellcolor{g2}11\% & 6\% \\ 
					GB/CBD & 0\% & 0\% && 2\% & 5\% \\ 
					GB/APC & 6\% & 3\% && 8\% & 5\% \\ 
					GB/RH & 0\% & 2\% && 0\% & 2\% \\ 
					GB/M6 & 0\% & 0\% && 0\% & 0\% \\ 
					GB/M7 & 2\% & 2\% && 3\% & 2\% \\ 
					GB/Plat (full) & 0\% & 0\% && 3\% & 2\% \\ 
					GB/Plat (reduced) & 0\% & 2\% && 2\% & 5\% \\ 
					\hline
				\end{tabular}
			\end{scriptsize}
		\begin{minipage}{0.8\linewidth} \scriptsize
				Notes: Within each column, the percentages are calculated as the frequency at which each model achieves the lowest RMSE (columns 2-3) or is part of the SSM (columns 4-5) across all country-gender combinations. The larger the percentage, the darker is the shade marking the cell. 
		\end{minipage}
	\end{table}%

	
	
		
	\section{Random Forests Additional Results}
	
	\subsection{50 Most Frequent Country Combinations}
	\label{sec:App_50most}
	
	
	\begin{table}[h!]
		\centering
		\caption{50 most frequent 4-way groupings of countries for random forests. Fitting period: 1961-1986, age range: 59-89}
		\label{tab:country_groups_50most}
		\begin{scriptsize}
			\begin{tabular}{llllC{2cm}C{2cm}C{2cm}}
				\hline
				&&&&&& \\[-1.2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1ex]
				BGR & BLR & CZE & HUN & 159 & 742 & 23\% \\ 
				BGR & BLR & CZE & LTU & 135 & 699 & 22\% \\ 
				BGR & BLR & CZE & LVA & 137 & 715 & 22\% \\ 
				BGR & BLR & CZE & SVK & 153 & 742 & 23\% \\ 
				BGR & BLR & HUN & LTU & 195 & 763 & 24\% \\ 
				BGR & BLR & HUN & LVA & 185 & 766 & 24\% \\ 
				BGR & BLR & HUN & POL & 112 & 654 & 20\% \\ 
				BGR & BLR & HUN & SVK & 236 & 827 & 26\% \\ 
				BGR & BLR & LTU & LVA & 155 & 723 & 23\% \\ 
				BGR & BLR & LTU & SVK & 192 & 765 & 24\% \\ 
				BGR & BLR & LVA & SVK & 187 & 775 & 24\% \\ 
				BGR & CZE & HUN & LTU & 142 & 712 & 22\% \\ 
				BGR & CZE & HUN & LVA & 146 & 736 & 23\% \\ 
				BGR & CZE & HUN & POL & 120 & 693 & 22\% \\ 
				BGR & CZE & HUN & SVK & 166 & 780 & 24\% \\ 
				BGR & CZE & LTU & LVA & 123 & 687 & 21\% \\ 
				BGR & CZE & LTU & SVK & 132 & 709 & 22\% \\ 
				BGR & CZE & LVA & POL & 116 & 670 & 21\% \\ 
				BGR & CZE & LVA & SVK & 142 & 740 & 23\% \\ 
				BGR & CZE & POL & SVK & 114 & 692 & 22\% \\ 
				BGR & HUN & LTU & LVA & 155 & 722 & 23\% \\ 
				BGR & HUN & LTU & SVK & 194 & 772 & 24\% \\ 
				BGR & HUN & LVA & POL & 118 & 670 & 21\% \\ 
				BGR & HUN & LVA & SVK & 192 & 791 & 25\% \\ 
				BGR & HUN & POL & SVK & 123 & 697 & 22\% \\ 
				BGR & LTU & LVA & SVK & 151 & 725 & 23\% \\ 
				BGR & LVA & POL & SVK & 115 & 672 & 21\% \\ 
				BLR & CZE & HUN & LTU & 135 & 698 & 22\% \\ 
				BLR & CZE & HUN & LVA & 140 & 716 & 22\% \\ 
				BLR & CZE & HUN & SVK & 153 & 739 & 23\% \\ 
				BLR & CZE & LTU & LVA & 122 & 681 & 21\% \\ 
				BLR & CZE & LTU & SVK & 127 & 693 & 22\% \\ 
				BLR & CZE & LVA & SVK & 135 & 719 & 22\% \\ 
				BLR & HUN & LTU & LVA & 150 & 713 & 22\% \\ 
				BLR & HUN & LTU & SVK & 185 & 757 & 24\% \\ 
				BLR & HUN & LVA & POL & 112 & 648 & 20\% \\ 
				BLR & HUN & LVA & SVK & 183 & 770 & 24\% \\ 
				BLR & LTU & LVA & SVK & 148 & 716 & 22\% \\ 
				CZE & DEUTE & HUN & LVA & 112 & 684 & 21\% \\ 
				CZE & DEUTE & LTU & POL & 112 & 650 & 20\% \\ 
				CZE & DEUTE & LVA & POL & 118 & 696 & 22\% \\ 
				CZE & HUN & LTU & LVA & 133 & 694 & 22\% \\ 
				CZE & HUN & LTU & POL & 112 & 644 & 20\% \\ 
				CZE & HUN & LTU & SVK & 134 & 705 & 22\% \\ 
				CZE & HUN & LVA & POL & 122 & 678 & 21\% \\ 
				CZE & HUN & LVA & SVK & 144 & 739 & 23\% \\ 
				CZE & HUN & POL & SVK & 116 & 699 & 22\% \\ 
				CZE & LTU & LVA & SVK & 122 & 692 & 22\% \\ 
				CZE & LVA & POL & SVK & 113 & 677 & 21\% \\ 
				HUN & LTU & LVA & SVK & 153 & 723 & 23\% \\ 
				HUN & LVA & POL & SVK & 118 & 674 & 21\% \\ 
				\hline
			\end{tabular}
		\end{scriptsize}
	\end{table}

	
	
	
	\subsection{All Fitting Periods and Both Age Ranges}
	\label{sec:App_RF_results}
	
	
	\begin{figure*}[h!]
		\centering
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1936_1986_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1936-1986}
			\label{fig:dist_year_age59_1936}
		\end{subfigure}
		~
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1936_1986_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1936-1986}
			\label{fig:dist_year_age20_1936}
		\end{subfigure}%
		\vspace{0.1cm}	
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1961_1986_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1961-1986}
			%	\label{fig:dist_year_age59_1961}
		\end{subfigure}
		~
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1961_1986_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1961-1986}
			\label{fig:dist_year_age20_1961}
		\end{subfigure}%
		\vspace{0.1cm}	
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1950_2000_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1950-2000}
			\label{fig:dist_year_age59_1950}
		\end{subfigure}
		~
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1950_2000_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1950-2000}
			\label{fig:dist_year_age20_1950}
		\end{subfigure}%
		\vspace{0.1cm}	
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1975_2000_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1975-2000}
			\label{fig:dist_year_age59_1975}
		\end{subfigure}
		~
		\begin{subfigure}{.465\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1975_2000_barpplot_year_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1975-2000}
			\label{fig:dist_year_age20_1975}
		\end{subfigure}%
		\vspace{0.1cm}	
		\caption{Distribution of $ year $ split points for random forests}
		\label{fig:dist_year_splits}
	\end{figure*}


	\newpage

	\begin{figure*}[h!]
		\centering
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1936_1986_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1936-1986}
			\label{fig:dist_age_age59_1936}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[trim=0.1cm 0.7cm 2cm 1.7cm,clip=true,width=0.8\linewidth]{30_1936_1986_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1936-1986}
			\label{fig:dist_age_age20_1936}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1961_1986_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1961-1986}
			%	\label{fig:dist_age_age59_1961}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1961_1986_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1961-1986}
			\label{fig:dist_age_age20_1961}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1950_2000_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1950-2000}
			\label{fig:dist_age_age59_1950}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1950_2000_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1950-2000}
			\label{fig:dist_age_age20_1950}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1975_2000_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1975-2000}
			\label{fig:dist_age_age59_1975}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1975_2000_barpplot_age_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1975-2000}
			\label{fig:dist_age_age20_1975}
		\end{subfigure}%
		\vspace{0.2cm}	
		\caption{Distribution of $ age $ split points for random forests}
		\label{fig:dist_age_splits}
	\end{figure*}


	\newpage

	\begin{figure*}[h!]
		\centering
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1936_1986_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1936-1986}
			\label{fig:dist_cohort_age59_1936}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1936_1986_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1936-1986}
			\label{fig:dist_cohort_age20_1936}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1961_1986_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1961-1986}
			%	\label{fig:dist_cohort_age59_1961}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1961_1986_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1961-1986}
			\label{fig:dist_cohort_age20_1961}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1950_2000_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1950-2000}
			\label{fig:dist_cohort_age59_1950}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1950_2000_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1950-2000}
			\label{fig:dist_cohort_age20_1950}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1975_2000_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1975-2000}
			\label{fig:dist_cohort_age59_1975}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1975_2000_barpplot_cohort_leq.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1975-2000}
			\label{fig:dist_cohort_age20_1975}
		\end{subfigure}%
		\vspace{0.2cm}	
		\caption{Distribution of $ cohort $ split points for random forests}
		\label{fig:dist_cohort_splits}
	\end{figure*}


	\newpage
	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1936-1986, age range: 59-89}
		\begin{footnotesize}
			\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				CHE & ESP & FIN & FRATNP & 226 & 345 & 11\% \\ 
				&&&&&& \\[-2ex]
				CHE & ESP & FIN & ITA & 159 & 343 & 11\% \\ 
				&&&&&& \\[-2ex]
				CHE & ESP & FRATNP & ITA & 210 & 344 & 11\% \\ 
				&&&&&& \\[-2ex]
				CHE & FIN & FRATNP & ITA & 160 & 362 & 11\% \\ 
				&&&&&& \\[-2ex]
				DNK & GBRNIR & GBRSCO & GBRTENW & 159 & 474 & 15\% \\ 
				&&&&&& \\[-2ex]
				DNK & GBRNIR & GBRSCO & NOR & 177 & 562 & 18\% \\ 
				&&&&&& \\[-2ex]
				DNK & GBRSCO & GBRTENW & NOR & 159 & 485 & 15\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}


	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1950-2000, age range: 59-89}
		\begin{footnotesize}
			\begin{tabular}{llllC{2.5cm}C{2.5cm}C{2.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				BGR & DNK & HUN & NLD & 221 & 458 & 14\% \\ 
				&&&&&& \\[-2ex]
				BGR & DNK & HUN & SVK & 244 & 480 & 15\% \\ 
				&&&&&& \\[-2ex]
				BGR & DNK & NLD & SVK & 224 & 467 & 15\% \\ 
				&&&&&& \\[-2ex]
				BGR & HUN & NLD & SVK & 230 & 474 & 15\% \\ 
				&&&&&& \\[-2ex]
				DNK & HUN & NLD & SVK & 232 & 497 & 16\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1975-2000, age range: 59-89}
		\begin{footnotesize}
			\begin{tabular}{llllC{2.5cm}C{2.5cm}C{2.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				BGR & HUN & POL & SVK & 227 & 605 & 19\% \\ 
				&&&&&& \\[-2ex]
				DNK & EST & HUN & POL & 210 & 611 & 19\% \\ 
				&&&&&& \\[-2ex]
				DNK & EST & LTU & LVA & 213 & 668 & 21\% \\ 
				&&&&&& \\[-2ex]
				DNK & HUN & LVA & POL & 201 & 613 & 19\% \\ 
				&&&&&& \\[-2ex]
				DNK & HUN & POL & SVK & 224 & 630 & 20\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1936-1986, age range: 20-89}
		\begin{footnotesize}
			\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				AUS & CAN & DNK & USA & 141 & 448 & 14\% \\ 
				&&&&&& \\[-2ex]
				BEL & FIN & FRATNP & GBRTENW & 161 & 326 & 10\% \\ 
				&&&&&& \\[-2ex]
				BEL & FIN & FRATNP & NLD & 143 & 266 & 8\% \\ 
				&&&&&& \\[-2ex]
				BEL & FRATNP & GBRTENW & NLD & 168 & 322 & 10\% \\ 
				&&&&&& \\[-2ex]
				CAN & DNK & SWE & USA & 139 & 450 & 14\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1961-1986, age range: 20-89}
		\begin{footnotesize}
			\begin{tabular}{llllC{2.5cm}C{2.5cm}C{2.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				BGR & BLR & HUN & LTU & 112 & 835 & 26\% \\ 
				&&&&&& \\[-2ex]
				BGR & BLR & HUN & SVK & 112 & 853 & 27\% \\ 
				&&&&&& \\[-2ex]
				BGR & CZE & HUN & SVK & 96 & 862 & 27\% \\ 
				&&&&&& \\[-2ex]
				BGR & HUN & LTU & SVK & 94 & 805 & 25\% \\ 
				&&&&&& \\[-2ex]
				BLR & HUN & LTU & SVK & 104 & 818 & 26\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}

	
	\begin{table}[ht!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1950-2000, age range: 20-89}
		\begin{footnotesize}
			\begin{tabular}{llllC{2.5cm}C{2.5cm}C{2.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				BGR & DNK & HUN & NLD & 206 & 526 & 16\% \\ 
				&&&&&& \\[-2ex]
				BGR & DNK & HUN & NOR & 190 & 500 & 16\% \\ 
				&&&&&& \\[-2ex]
				BGR & DNK & HUN & SVK & 209 & 518 & 16\% \\ 
				&&&&&& \\[-2ex]
				BGR & HUN & NLD & SVK & 190 & 508 & 16\% \\ 
				&&&&&& \\[-2ex]
				DNK & HUN & NLD & SVK & 193 & 540 & 17\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}

	
	\begin{table}[ht!]
		\centering
		\caption{Most frequent 4-way groupings of countries for random forests. Fitting period: 1975-2000, age range: 20-89}
		\begin{footnotesize}
			\begin{tabular}{llllC{2.5cm}C{2.5cm}C{2.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				BGR & BLR & EST & LVA & 284 & 494 & 15\% \\ 
				&&&&&& \\[-2ex]
				BGR & BLR & LTU & LVA & 287 & 521 & 16\% \\ 
				&&&&&& \\[-2ex]
				BGR & EST & HUN & LVA & 283 & 491 & 15\% \\ 
				&&&&&& \\[-2ex]
				BLR & EST & LTU & LVA & 321 & 537 & 17\% \\ 
				&&&&&& \\[-2ex]
				EST & HUN & LTU & LVA & 310 & 609 & 19\% \\ 
				&&&&&& \\[-2ex]
				\hline
			\end{tabular}
		\end{footnotesize}
	\end{table}
	
	\newpage
	
	
	
	

	\section{Gradient Boosting Results: Opening the Box}
	\label{App_gbm_box}
	
	Figure \ref{fig:VarImp_gbm} plots the relative influence (see \cite{Friedman2001}) of each variable in the gradient boosting model. The relative influence is provided by the \texttt{gbm} package in \texttt{R}. The gradient boosting settings used to fit the gradient boosting model (6,000 trees and maximum tree depth of 4) resulted in a total of 30,000 terminal conditions to be analyzed.
	
	
	\begin{figure}[h!]
		\centering
		\begin{subfigure}{.45\textwidth}
			\centering
			\includegraphics[trim=0.1cm 0.1cm 3cm 0.1cm,clip=true,width=\linewidth]{age59_89_VarImpPlot_gbm.pdf}
			\caption{\scriptsize Age range: 59-89}
			\label{fig:VarImp_age59_89_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.52\textwidth}
			\centering
			\includegraphics[trim=0.1cm 0.1cm 0.1cm 0.1cm,clip=true,width=\linewidth]{age20_89_VarImpPlot_gbm.pdf}
			\caption{\scriptsize Age range: 20-89}
			\label{fig:VarImp_age20_89_gbm}
		\end{subfigure}%
		\vspace{0.3cm}	
		\caption{Relative influence of each variable in the gradient boosting model for all fitting periods and both age ranges}
		\label{fig:VarImp_gbm}
	\end{figure}

	
	\begin{figure*}[h!]
		\centering
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1936_1986_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1936-1986}
			\label{fig:dist_year_age59_1936_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1936_1986_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1936-1986}
			\label{fig:dist_year_age20_1936_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1961_1986_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1961-1986}
			%	\label{fig:dist_year_age59_1961_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1961_1986_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1961-1986}
			\label{fig:dist_year_age20_1961_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1950_2000_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1950-2000}
			\label{fig:dist_year_age59_1950_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1950_2000_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1950-2000}
			\label{fig:dist_year_age20_1950_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1975_2000_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1975-2000}
			\label{fig:dist_year_age59_1975_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1975_2000_barpplot_year_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1975-2000}
			\label{fig:dist_year_age20_1975_gbm}
		\end{subfigure}%
		
		\vspace{0.2cm}	
		\caption{Distribution of $ year $ split points for gradient boosting}
		\label{fig:dist_year_splits_gbm}
	\end{figure*}
	
	
	\newpage
	
	\begin{figure*}[h!]
		\centering
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1936_1986_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1936-1986}
			\label{fig:dist_age_age59_1936_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1936_1986_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1936-1986}
			\label{fig:dist_age_age20_1936_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1961_1986_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1961-1986}
			%	\label{fig:dist_age_age59_1961}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1961_1986_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1961-1986}
			\label{fig:dist_age_age20_1961_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1950_2000_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1950-2000}
			\label{fig:dist_age_age59_1950_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1950_2000_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1950-2000}
			\label{fig:dist_age_age20_1950_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1975_2000_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1975-2000}
			\label{fig:dist_age_age59_1975_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1975_2000_barpplot_age_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1975-2000}
			\label{fig:dist_age_age20_1975_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\caption{Distribution of $ age $ split points for gradient boosting}
		\label{fig:dist_age_splits_gbm}
	\end{figure*}
	
	
	\newpage
	
	
	\begin{figure*}[h!]
		\centering
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1936_1986_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1936-1986}
			\label{fig:dist_cohort_age59_1936_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1936_1986_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1936-1986}
			\label{fig:dist_cohort_age20_1936_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a30_1961_1986_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1961-1986}
			%	\label{fig:dist_cohort_age59_1961_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{30_1961_1986_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1961-1986}
			\label{fig:dist_cohort_age20_1961_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1950_2000_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1950-2000}
			\label{fig:dist_cohort_age59_1950_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1950_2000_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1950-2000}
			\label{fig:dist_cohort_age20_1950_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{a16_1975_2000_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 59-89, Fitting period: 1975-2000}
			\label{fig:dist_cohort_age59_1975_gbm}
		\end{subfigure}
		~
		\begin{subfigure}{.47\textwidth}
			\centering
			\includegraphics[width=0.8\linewidth]{16_1975_2000_barpplot_cohort_leq_gbm.pdf}
			\caption{\scriptsize Age range: 20-89, Fitting period: 1975-2000}
			\label{fig:dist_cohort_age20_1975_gbm}
		\end{subfigure}%
		\vspace{0.2cm}	
		\caption{Distribution of $ cohort $ split points for gradient boosting}
		\label{fig:dist_cohort_splits_gbm}
	\end{figure*}
	
	\newpage
	
	
	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1936-1986, age range: 59-89}
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					DNK & GBRNIR & GBRSCO & GBRTENW & 1426.00 & 4492.00 & 15\% \\ 
					&&&&&& \\[-2ex]
					DNK & GBRNIR & GBRSCO & NOR & 1114.00 & 4272.00 & 14\% \\ 
					&&&&&& \\[-2ex]
					DNK & GBRSCO & GBRTENW & NOR & 1240.00 & 4573.00 & 15\% \\ 
					&&&&&& \\[-2ex]
					GBRNIR & GBRSCO & GBRTENW & NLD & 1180.00 & 4128.00 & 14\% \\ 
					&&&&&& \\[-2ex]
					GBRNIR & GBRSCO & GBRTENW & NOR & 1258.00 & 4452.00 & 15\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1961-1986, age range: 59-89}
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					BGR & BLR & EST & LVA & 990.00 & 5597.00 & 19\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & HUN & SVK & 1067.00 & 6164.00 & 21\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & LTU & LVA & 1262.00 & 6296.00 & 21\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & LTU & SVK & 979.00 & 5713.00 & 19\% \\ 
					&&&&&& \\[-2ex]
					BLR & EST & LTU & LVA & 1022.00 & 5545.00 & 18\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1950-2000, age range: 59-89}
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					BGR & CZE & HUN & SVK & 538.00 & 3923.00 & 13\% \\ 
					&&&&&& \\[-2ex]
					BGR & DNK & HUN & SVK & 546.00 & 3491.00 & 12\% \\ 
					&&&&&& \\[-2ex]
					BGR & HUN & IRL & SVK & 511.00 & 3050.00 & 10\% \\ 
					&&&&&& \\[-2ex]
					BGR & HUN & ISL & SVK & 689.00 & 1947.00 & 6\% \\ 
					&&&&&& \\[-2ex]
					ESP & GBRNIR & GBRTENW & IRL & 626.00 & 3914.00 & 13\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

		
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1975-2000, age range: 59-89}	
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					BGR & BLR & EST & LTU & 732.00 & 4151.00 & 14\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & EST & LVA & 664.00 & 4061.00 & 14\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & LTU & LVA & 794.00 & 4658.00 & 16\% \\ 
					&&&&&& \\[-2ex]
					BLR & EST & LTU & LVA & 891.00 & 4800.00 & 16\% \\ 
					&&&&&& \\[-2ex]
					BLR & ISL & LTU & LVA & 663.00 & 2512.00 & 8\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1936-1986, age range: 20-89}
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					BEL & FIN & FRATNP & GBRTENW & 1673.00 & 3106.00 & 10\% \\ 
					&&&&&& \\[-2ex]
					BEL & FIN & FRATNP & NLD & 1838.00 & 2928.00 & 10\% \\ 
					&&&&&& \\[-2ex]
					BEL & FIN & GBRTENW & NLD & 1462.00 & 2617.00 & 9\% \\ 
					&&&&&& \\[-2ex]
					BEL & FRATNP & GBRTENW & NLD & 1509.00 & 3118.00 & 10\% \\ 
					&&&&&& \\[-2ex]
					FIN & FRATNP & GBRTENW & NLD & 1579.00 & 2691.00 & 9\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

	
\begin{table}[h!]
	\centering
	
	\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1961-1986, age range: 20-89}
		\begin{footnotesize}
			\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
				\hline
				&&&&&& \\[-2ex]
				\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
				\hline
				&&&&&& \\[-1.9ex]
				BGR & BLR & HUN & LTU & 644.00 & 5617.00 & 19\% \\ 
				&&&&&& \\[-2ex]
				BLR & EST & LTU & LUX & 675.00 & 2383.00 & 8\% \\ 
				&&&&&& \\[-2ex]
				BLR & EST & LTU & LVA & 1270.00 & 5048.00 & 17\% \\ 
				&&&&&& \\[-2ex]
				BLR & EST & LUX & LVA & 676.00 & 2397.00 & 8\% \\ 
				&&&&&& \\[-2ex]
				BLR & LTU & LUX & LVA & 752.00 & 2862.00 & 10\% \\ 
				&&&&&& \\[-2ex]
				\hline
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
				&&&&&& \\
			\end{tabular}
		\end{footnotesize}
\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1950-2000, age range: 20-89}
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					BGR & DNK & HUN & SVK & 619.00 & 3614.00 & 12\% \\ 
					&&&&&& \\[-2ex]
					BGR & HUN & IRL & SVK & 615.00 & 3464.00 & 12\% \\ 
					&&&&&& \\[-2ex]
					BGR & HUN & ISL & SVK & 794.00 & 2532.00 & 8\% \\ 
					&&&&&& \\[-2ex]
					ESP & GBRNIR & IRL & ISL & 606.00 & 1945.00 & 6\% \\ 
					&&&&&& \\[-2ex]
					ESP & GBRNIR & IRL & PRT & 713.00 & 3618.00 & 12\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

	
	\begin{table}[h!]
		\centering
		\caption{Most frequent 4-way groupings of countries for gradient boosting. Fitting period: 1975-2000, age range: 20-89}
			\begin{footnotesize}
				\begin{tabular}{L{1.9cm}L{1.9cm}L{1.9cm}L{1.9cm}C{1.9cm}C{1.5cm}C{1.5cm}}
					\hline
					&&&&&& \\[-2ex]
					\multicolumn{4}{l}{4-way grouping} & 10-group freq. & Total freq. & \%total \\ 
					\hline
					&&&&&& \\[-1.9ex]
					BGR & BLR & EST & LVA & 1229.00 & 4408.00 & 15\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & HUN & LVA & 1155.00 & 4877.00 & 16\% \\ 
					&&&&&& \\[-2ex]
					BGR & BLR & LTU & LVA & 1214.00 & 4722.00 & 16\% \\ 
					&&&&&& \\[-2ex]
					BLR & EST & LTU & LVA & 1476.00 & 4577.00 & 15\% \\ 
					&&&&&& \\[-2ex]
					EST & HUN & LTU & LVA & 1337.00 & 4779.00 & 16\% \\ 
					&&&&&& \\[-2ex]
					\hline
				\end{tabular}
			\end{footnotesize}
	\end{table}

 

\newpage
\newrefcontext[sorting=MySorting]
\printbibliography[heading=subbibliography]
\end{refsection}
		
%----------------------------------------------------------------------------------------------------------------------
% END OF DOCUMENT
%----------------------------------------------------------------------------------------------------------------------

\end{document}