EconBase
← Back to paper

Latent Unbalancedness in Three-Way Gravity Models

The exact contents of citations.db main_text.text for this paper — one flattened LaTeX string, title through conclusion, appendix excluded, unmodified except for removing email addresses. This is what our citation measures are computed over.

15,166 characters

Latent Unbalancedness in Three-Way Gravity Models



\maketitle
\thispagestyle{empty}

\begin{abstract}
\small
\noindent Many panel data sets used for pseudo-poisson estimation of three-way gravity models are implicitly unbalanced because uninformative observations  are redundant for the estimation. We show with real data as well as simulations that this phenomenon, which we call latent unbalancedness, amplifies the inference problem recently studied by \textcite{wz2021}.\\[0.5em]
\footnotesize
\vfill
\noindent\textbf{JEL Classification:} C13, C23, C50, F10\\
\textbf{Keywords:} Asymptotic Bias Correction, Complete Separation, Fixed Effects, Pseudo-Poisson Maximum Likelihood\\
\end{abstract}

\clearpage
\onehalfspacing
\setcounter{page}{1}

\section{Introduction}
\label{sec:introduction}



Consider the ``three-way'' gravity model
\begin{equation}
    \label{eq:estimation_equation_gravity}
    y_{ijt} \coloneqq \exp(\beta \, x_{ijt} + \alpha_{it} + \gamma_{jt} + \eta_{ij}) \, \omega_{ijt} \, , \; i, j \in \{1, \ldots, N\} \, , \; t \in \{1, \ldots, T\} \, ,
\end{equation}
where $y_{ijt}$ is the trade flow from country $i$ (exporter) to country $j$ (importer) at time $t$, $x_{ijt}$  a set of trade cost variables, $\beta$  the corresponding trade cost parameters, $\alpha_{it}$, $\gamma_{jt}$, and $\eta_{ij}$ the three sets of fixed effects capturing market sizes, multilateral resistances, and other (unobserved) time-invariant trade costs, respectively, and $\omega_{ijt}$  a multiplicative idiosyncratic error term.\footnote{A theoretical motivation of \eqref{eq:estimation_equation_gravity} is provided in \textcite{hm2014}.} \textcite{wz2021} (hereafter WZ) study the pseudo-poisson maximum likelihood estimator (hereafter FE-PPML) for the model parameters in \eqref{eq:estimation_equation_gravity}.\footnote{FE-PPML is an estimator in spirit of \textcite{gmt1984}, thus only the conditional mean $\operatorname{\mathbb{E}}[y_{ijt} \, | \, x_{ijt}, \alpha_{it}, \gamma_{jt}, \eta_{ij}] = \exp(\beta \, x_{ijt} + \alpha_{it} + \gamma_{jt} + \eta_{ij})$ has to be correctly specified.}  Under asymptotics where $N \rightarrow \infty$ and $T$ is fixed, WZ show that the estimator of $\beta$, $\hat{\beta}$, is consistent but that its distribution is distorted by a constant bias term of order $1 / N$. To improve inference, they suggest to debias $\hat{\beta}$ using a bias correction. Their simulations show, that especially for samples with small $N$, inference can be significantly improved by debiasing $\hat{\beta}$.\footnote{For completeness, WZ also show a downward bias in cluster-robust covariance estimators, which further affects inference.}

One key advantage of FE-PPML is its genuine way of dealing with zero trade flows \parencite{st2006}, which is an important feature of the estimator, because in practice  at least some countries do not trade with each other. However, zero trade flows can  lead to non-unique infinite FE-PPML estimates for $\alpha_{it}$, $\gamma_{jt}$, and $\eta_{ij}$. Consequently, all observations that are affected by these nonexistent estimates have zero log-likelihood contribution and thus are uninformative for the estimation of $\beta$.\footnote{This is essentially the complete separation case described in \textcite{aa1984} and \textcite{st2010} for binary-choice and poisson models, respectively.} Since this phenomenon is not directly apparent to the researcher, we refer to it as \textit{latent unbalancedness} to distinguish it from \textit{classical unbalancedness}, where observations are missing or incomplete.\footnote{WZ (Section 3.4.4) briefly note that their bias corrections can also be applied to panel data with missing values, but do not discuss the consequences for inference.}


The remainder of this paper is as follows. Section \ref{sec:inference} explains latent unbalancedness and its consequences for inference. Section \ref{sec:simulation_evidence} demonstrates the inference problem  in a small-scale simulation study.

\section{Latent Unbalancedness and its Consequences for Inference}
\label{sec:inference}

\subsection{Latent Unbalancedness}


Uninformative observations and hence latent unbalancedness are a direct consequence of zero trade flows, which can be derived directly from the first-order conditions (FOC's) of the FE-PPML:
\begin{align}
    \label{eq:feppml_focs}
    \hat{\beta} \colon& \sum_{i, j}^{N} \sum_{t = 1}^{T} (y_{ijt} - \lambda_{ijt}) x_{ijt} = 0 \, ,&
    \hat{\alpha}_{it} \colon& \sum_{j = 1}^{N} y_{ijt} - \lambda_{ijt} = 0 \, ,\\
    \hat{\gamma}_{jt} \colon& \sum_{i = 1}^{N} y_{ijt} - \lambda_{ijt} = 0 \, ,& \hat{\eta}_{ij} \colon& \sum_{t = 1}^{T} y_{ijt} - \lambda_{ijt} = 0 \, , \nonumber
\end{align}
where $\lambda_{ijt} \coloneqq \exp(\beta \, x_{ijt} + \alpha_{it} + \gamma_{jt} + \eta_{ij})$. From equation \eqref{eq:feppml_focs} we can  infer that,  if a country pair $ij$ never trades at any point in time, than the FOC of $\hat{\eta}_{ij}$ is trivially satisfied if we set $\eta_{ij} = - \infty$, i.e. the corresponding estimate does not exist. Consequently, all other parameters of $\{\lambda_{ijt} \colon t \in \{1, \ldots, T\}\}$ become irrelevant for the estimation, since $\eta_{ij} = - \infty$ is sufficient to predict all zero trade flows independently of the remaining model parameters. Thus, for the estimation of $\beta$, all affected observations are uninformative and may as well be discarded from the sample. Similar arguments can be used for the FOC's of $\hat{\alpha}_{it}$ and $\hat{\gamma}_{jt}$. For instance, if a country $i$ does not export to any country at time $t$, we can set $\alpha_{it} = - \infty$, and $\gamma_{jt} = - \infty$ if a country $j$ does not import from any other country at time $t$.

Furthermore, it is likely that after excluding uninformative observations, some country pairs appear only for one time period, i.e. become \textit{singletons}. Independent of the remaining model parameters, $\eta_{ij}$ alone is sufficient to predict the corresponding trade flow for these singletons. Hence, these  observations have zero log-likelihood contribution and thus are uninformative for the estimation of $\beta$. Again, we can use similar arguments for an exporting country $i$ at time $t$ that exports only to one country, or an importing country $j$ at time $t$ that only imports from one country. The supplement sketches a simple iterative algorithm that we used to detect uninformative observations.


\subsection{Consequences for Inference}

Although latent unbalancedness might not be a problem from an estimation point of view, it has consequences for inference.\footnote{$\hat{\beta}$ is identical up to some numerical precision, whether uninformative observations are excluded or not. \textcite{st2010} note that, uninformative observations can cause convergence problems. Therefore,  they recommend to exclude these observations.} Uninformative observations  have zero log-likelihood contribution and thus do not fulfill the assumption that the corresponding second-order derivatives are bounded away from zero (see Theorem 1 / Assumption (iii) in the Appendix of WZ).

To show what latent unbalancedness implies for WZ's asymptotic bias result, it is useful to introduce their heuristic. Let $n$, $p_{\alpha}$, and $p_{\gamma}$ denote the sample size, the number of exporter-time fixed effects, and the number of importer-time fixed, respectively. The order of the bias can be approximated by $\text{bias}(\hat{\beta}) \sim p_{\alpha} / n + p_{\gamma} / n$. Applied to a balanced panel with $n = N^{2}T$, $p_{\alpha} = NT$, and $p_{\gamma} = NT$, we get $\text{bias}(\hat{\beta}) \sim 1 / N + 1 / N$, which is exactly the order of the asymptotic bias derived by WZ. It appears further useful to distinguish between the number of exporters ($I = N$) and importers ($J = N$). Let $n^{\ast} < IJT$, $p_{\alpha}^{\ast} < IT$, and $p_{\gamma}^{\ast} < JT$ denote the sample size, the number of exporter-time fixed effects, and the number of importer-time fixed effects after excluding uninformative observations, respectively. With $n = n^{\ast}$, $p_{\alpha} = p_{\alpha}^{\ast}$, and $p_{\gamma} = p_{\gamma}^{\ast}$, we then get $\text{bias}(\hat{\beta}) \sim 1 / \overline{J} + 1 / \overline{I}$, where $\overline{I} \coloneqq n^{\ast} / p_{\gamma}^{\ast} < N$ and $\overline{J} \coloneqq n^{\ast} / p_{\alpha}^{\ast} < N$ are the average number of exporters and importers, respectively.\footnote{A simulation study in the supplement supports the validity of the heuristic even for unbalanced panels.} The leading order of the bias is given by $1 / \min(\overline{I}, \overline{J})$. Thus, depending on how many observations are uninformative, the bias can be substantially larger than would be expected given the size of the initially balanced sample. As a consequence, researchers may incorrectly conclude that the asymptotic bias in their analysis is negligible, simply because their initial sample has a large $N$.

\begin{figure}[!htbp]
\caption{Consequences of Latent Unbalancedness in Industry-level Trade Data}
\centering
\includegraphics[width=0.9\textwidth]{inverse_bias.pdf}
\begin{minipage}{0.9\textwidth}
	\footnotesize
	\textbf{Notes:} Data taken from the replication package of WZ. Figure shows average number of exporters ($\overline{I}$) and importers ($\overline{J}$) for various 2 digit \textit{ISIC} industries plus aggregate trade after excluding uninformative observations. The solid line indicates $N = 167$, i.e. the initial number of trading countries in the data.
\end{minipage}
\label{fig:latent_unbalancedness}
\end{figure}

Figure \ref{fig:latent_unbalancedness} shows $\overline{I}$ and $\overline{J}$ in the industry-level trade data used by WZ, after excluding uninformative observations. Note that each sample initially covers $N = 167$ countries that trade with each other for $T = 5$ points in time. We find that dis-aggregated industry-level data is heavily affected by latent unbalancedness. This is not surprising, because the more trade flows are dis-aggregated, the more likely it is that some countries either do not have a particular industry or that some countries do not import certain products. On average across all industries, the order of the leading bias is $1 / 75$. This is more than twice than $1 / 167$, which is the order of the bias we would expect from the initial sample. The consequences for inference are most severe in the coal industry (industry 10). Here, the order of the leading bias is $1 / 22$, which is almost eight times $1 / 167$. The inference problem is least pronounced for the aggregated trade data with a leading bias of $1 / 143$.


\section{Simulation Evidence}
\label{sec:simulation_evidence}

A simulation study demonstrates the inference problem. To mimic latent unbalancedness, we first generate balanced panels using DGP I of WZ,
\begin{align}
    y_{ijt} &= \lambda_{ijt} \, \omega_{ijt} \, , \\
    x_{ijt} &= 0.5 \, x_{ijt-1} + \alpha_{it} + \gamma_{jt} + \eta_{ij} + \nu_{ijt} \, , \nonumber \\
    \omega_{ijt} &= \exp(- 0.5 \, \log(1 + \lambda_{ijt}^{- 2}) + (\log(1 + \lambda_{ijt}^{- 2}))^{- 0.5} \, z_{ijt}) \, , \nonumber \\
    z_{ijt} &= 0.3 \, z_{ijt-1} + \xi_{ijt} \, , \nonumber
\end{align}
where $i, j \in \{1, \ldots, N\}$, $t \in \{1, \ldots, T\}$, $\lambda_{ijt} = \exp(\beta \, x_{ijt} + \alpha_{it} + \gamma_{jt} + \eta_{ij})$, $\alpha_{it}$, $\gamma_{jt}$, and $\eta_{ij}$ are $\sim \operatorname{\text{iid.}\;} \operatorname{\mathcal{N}}(0, 0.25)$, $\nu_{ijt} \sim \operatorname{\text{iid.}\;} \operatorname{\mathcal{N}}(0, \sqrt{0.5})$, $x_{ij0} = \eta_{ij} + \nu_{ij0}$, $z_{ij0} \sim \operatorname{\text{iid.}\;} \operatorname{\mathcal{N}}(0, 1)$, $\xi_{ijt} \sim \operatorname{\text{iid.}\;} \operatorname{\mathcal{N}}(0, 0.91)$, and $\operatorname{\mathcal{N}}(a, b)$ denotes the normal distribution with mean $a$ and variance $b$. Then, we set all trade flows of $\psi N^2$ country pairs with the smallest values of $\eta_{ij}$ to zero. Consequently, these observations become uninformative and can be excluded so that the final sample has $n^{\ast} = (1 - \psi) N^2 T \approx N \overline{N} T$ observations.\footnote{This is essentially an attrition process where uninformative observations are conditionally missing at random.} We consider different fractions of missing observations $\psi \in \{0, 0.1, \ldots, 0.8, 0.9\}$ and set $N = 200$, $T = 5$, and $\beta = 1$. Thus, $\psi = 0.9$ is comparable to the situation in the coal industry, where about 90\% of the observations are uninformative. We analyze relative biases and ratios of bias to standard deviation for same estimators as WZ: an uncorrected estimator (FE-PPML), an analytically bias-corrected estimator (ABC), and a split-panel jackknife bias-corrected estimator (SPJ). Our results are based on $10{,}000$ simulated samples for each $\psi$.\footnote{More detailed results are reported in the supplement.}

\begin{figure}[!htbp]
\caption{Relative Bias (in \%) and Bias / SD of $\hat{\beta}$ for Different $\psi$}
\centering
\includegraphics[width=0.9\textwidth]{results_fixed_n.pdf}
\begin{minipage}{0.9\textwidth}
	\footnotesize
	\textbf{Notes:} Figure shows relative biases (in \%) and ratios of bias to standard deviation for different estimators for $\beta$: uncorrected FE-PPML, analytically corrected ABC, and split-panel jackknife corrected SPJ. $N = 200$, $T = 5$, and $\psi \in \{0, 0.1, \ldots, 0.8, 0.9\}$. Results are based on $10{,}000$ simulated samples for each $\psi$.
\end{minipage}
\label{fig:results}
\end{figure}

Figure \ref{fig:results} summarizes the results. We find that biases increase with $\psi$, which is to be expected, given the heuristic, as the average number of trading countries ($\overline{N}$) decreases. Furthermore, the biases also increase relative to the dispersion of the estimators, which means that the centering of the standardized estimator, and thus the inference, gets worse as $\psi$ increases. The results demonstrate the importance of identifying latent unbalancedness in empirical work.

\section{Concluding Remarks}
\label{sec:conclusion}



We pointed out the relevance of latent unbalancedness for pseudo-poisson estimation of three-way gravity models. Researchers who are unaware of latent unbalancedness and thus rely on the initial sample size to assess the severity of the inference problem - recently shown by WZ - may be misled and mistakenly decide against using bias-corrected estimators. Latent unbalancedness appears to be especially prevalent in sparse networks, e.g. when analysing highly dis-aggregated trade flows as in the empirical application of WZ. Moreover, latent unbalancedness is clearly not only a problem for three-way FE-PPML, but also for other fixed effects maximum likelihood estimators. Finally, we should emphasize that our findings also carry over to classical unbalancedness, i.e. unbalancedness due to missing or incomplete observations, and that uninformative observations can also arise from other more complicated separation issues, as recently shown by \textcite{cgz2021}.

\clearpage
\printbibliography

\clearpage