Forecasting with Bayesian Grouped Random Effects in Panel Data

88 Pages Posted: 15 Oct 2020 Last revised: 19 Oct 2020

See all articles by Boyuan Zhang

Boyuan Zhang

University of Pennsylvania - Department of Economics

Date Written: August 26, 2020


In this paper, we estimate and leverage latent constant group structure to generate the point, set, and density forecasts for short dynamic panel data. We implement a nonparametric Bayesian approach to simultaneously identify coefficients and group membership in the random effects which are heterogeneous across groups but fixed within a group. This method allows us to flexibly incorporate subjective prior knowledge on the group structure that potentially improves the predictive accuracy. In Monte Carlo experiments, we demonstrate that our Bayesian grouped random effects (BGRE) estimators produce accurate estimates and score predictive gains over standard panel data estimators. With a data-driven group structure, the BGRE estimators exhibit comparable accuracy of clustering with the Kmeans algorithm and outperform a two-step Bayesian grouped estimator whose group structure relies on Kmeans. In the empirical analysis, we apply our method to forecast the investment rate across a broad range of firms and illustrate that the estimated latent group structure facilitates forecasts relative to standard panel data estimators.

Keywords: Panel Data; Group Heterogeneity, Random Effects, Dirichlet Process, Set Forecast, Density forecast, Investment

JEL Classification: C11, C14, C23, C53, G31

Suggested Citation

Zhang, Boyuan, Forecasting with Bayesian Grouped Random Effects in Panel Data (August 26, 2020). Available at SSRN: or

Boyuan Zhang (Contact Author)

University of Pennsylvania - Department of Economics ( email )

Ronald O. Perelman Center for Political Science
133 South 36th Street
Philadelphia, PA 19104-6297
United States

HOME PAGE: http://

Here is the Coronavirus
related research on SSRN

Paper statistics

Abstract Views
PlumX Metrics