Skip to main content Accessibility help

Modeling Heterogeneity and Serial Correlation in Binary Time-Series Cross-sectional Data: A Bayesian Multilevel Model with AR(p) Errors

  • Xun Pang (a1)


This paper proposes a Bayesian generalized linear multilevel model with a pth-order autoregressive error process to analyze unbalanced binary time-series cross-sectional (TSCS) data. The model specification is motivated by the generic TSCS data structure and is intended to handle the associated inefficiency and endogeneity problems. It accommodates heterogeneity across units and between time periods in the form of random intercepts and random-effect coefficients. At the same time, its pth-order autoregressive error process, employed either by itself or in concert with other dynamic methods, adequately corrects serial correlation and improves statistical inference and forecasting. With a stationarity restriction on the error process, the model can also be used as a residual-based cointegration test on discrete TSCS data. This is especially valuable because cointegration testing on discrete TSCS data is methodologically challenging and rarely conducted in practice. To handle the estimation difficulties, I developed an efficient Markov chain Monte Carlo (MCMC) algorithm by orthogonalizing the error term with the Cholesky decomposition and adding an auxiliary variable. The parameter expansion method, that is, partial group move—multigrid Monte Carlo updating (PGM-MGMC), is employed to further improve MCMC mixing and speed up convergence. The paper also provides a computational scheme to approximate the Bayes's factor for the purposes of serial correlation diagnostics, lag order determination, and variable selection. Simulated and empirical examples are used to assess the model and techniques.

    • Send article to Kindle

      To send this article to your Kindle, first ensure is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

      Note you can select to send to either the or variations. ‘’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

      Find out more about the Kindle Personal Document Service.

      Modeling Heterogeneity and Serial Correlation in Binary Time-Series Cross-sectional Data: A Bayesian Multilevel Model with AR(p) Errors
      Available formats

      Send article to Dropbox

      To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

      Modeling Heterogeneity and Serial Correlation in Binary Time-Series Cross-sectional Data: A Bayesian Multilevel Model with AR(p) Errors
      Available formats

      Send article to Google Drive

      To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

      Modeling Heterogeneity and Serial Correlation in Binary Time-Series Cross-sectional Data: A Bayesian Multilevel Model with AR(p) Errors
      Available formats



Hide All
Achen, Christopher H. 2001. Why lagged dependent variables can suppress the explanatory power of other independent variables. Working paper.
Albert, James A., and Chib, Siddhartha. 1993. Bayesian analysis of binary and polychotomous response data. Journal of the American Statistical Association 88: 669–79.
Alston, Clair, Kuhnert, Petra, Choy, Low S., McVinish, R., and Mengersen, K. 2005. Bayesian model comparison: Review and discussion. International Statistical Insitute, 55th session.
Andrews, Donald W. K. 1991. Heteroskedasticity and autocorrelation consistent covariance matrix estimation. Econometrica 59: 817–58.
Aschbacher, Michael. 2000. Finite group theory. Cambridge: Cambridge University Press.
Bai, Jushan, and Ng, Serena. 2004. A panic attack on unit roots and cointegration. Econometrica 72: 1127–77.
Beck, Nathaniel. 1993. The methodology of cointegration. Political Analysis 4: 237–48.
Beck, Nathaniel, Epstein, David, Jackman, Simon, and O'Halloran, Sharyn. 2002. Alternative models of dynamics in binary time-series-cross-section models: The example of state failure. Working paper.
Beck, Nathaniel, and Katz, Jonathan N. 1995. What to do (and not to do) with time-series cross-section data. American Political Science Review 89: 634–47.
Beck, Nathaniel, and Katz, Jonathan N. 1996. Nuisance vs. substance: Specifying and estimating time-series-cross-section models. Political Analysis 6: 136.
Beck, Nathaniel, and Katz, Jonathan N. 2007. Random coefficient models for time-series-cross-section data: Monte Carlo experiments. Political Analysis 15: 182–95.
Beck, Nathaniel, and Katz, Jonathan N. 2009. Modeling dynamics in time-series-cross-section political economy data. Working paper.
Beck, Nathaniel, Katz, Jonathan N., and Tucker, Richard. 1998. Taking time seriously: Time-series-cross-section analysis with a binary dependent variable. American Journal of Political Science 42: 1260–88.
Bogopolski, Oleg. 2008. Introduction to group theory. Zürish, Switzerland: European Mathematical Society.
Borsch-Supan, A., and Hajivassiliou, V. 1993. Smooth unbiased multivariate probability simulators for maximum likelihood estimation of limited dependent variable models. Journal of Econometrics 58: 347–68.
Box, George E.P., Jenskins, Gwilym M., and Reinsel, Gregory C. 1994. Time series analysis: Forecasting and control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall.
Box-Steffensmeier, Janet M., and Tomlinson, Andrew R. 2000. Fractional integration methods in political science. Electoral Studies 19: 6376.
Breslow, Norman E. 1996. Statistics in epidemiology: The case-control study. Journal of the American Statistical Association 91: 1428.
Briggs, William L. 1987. A multigrid tutorial. Philadelphia, PA: Society for Industrial and Applied Mathematics.
Carlin, Bradley P. 1996. Hierarchical longitudinal modeling. In Markov chain Monte Carlo in practice, ed. Richardson, S., Gilks, W. R., and Spiegelharlter, D. J., 303–19. London: Chapman and Hall.
Cederman, Lars-Erik, and Girardin, Luc. 2007. Beyond fractionalization: Mapping ethnicity onto nationalist insurgencies. American Political Science Review 101: 173–85.
Chib, Siddhartha. 1993. Bayes regression with autoregressive errors: A Gibbs sampling approach. Journal of Econometrics 58: 275–94.
Chib, Siddhartha. 1995. Marginal likelihood from the Gibbs output. Journal of the American Statistical Association 90: 1313–21.
Chib, Siddhartha, and Greenberg, Edward. 1994. Bayesian inference in regression models with ARMA (p, q) errors. Journal of Econometrics 64: 183206.
Chib, Siddhartha, and Jeliazkov, Ivan. 2001. Marginal likelihood from the Metropolis-Hastings output. Journal of the American Statistical Association 96: 270–81.
Chib, Siddhartha, and Jeliazkov, Ivan. 2006. Inference in semiparametric dynamic models for binary longitudinal data. Journal of the American Statistical Association 101: 685700.
Choi, In. 2001. Unit root tests for panel data. Journal of International Money and Finance 20: 249–72.
Collier, Paul, and Hoeffler, Anke. 2004. Greed and grievance in civil war. Oxford Economic papers 56: 563–95.
Collier, Paul, Hoeffler, Anke, and Soderbom, Mans. 2004. On the duration of civil war. Journal of Peace Research 41: 253–73.
Cowles, Mary K., Carlin, Bradley P., and Connett, John E. 1996. Bayesian tobit modeling of longitudinal ordinal clinical trial compliance data with nonignorable missingness. Journal of the American Statistical Association 91: 8698.
DeBoef, Suzanna. 2001. Modeling equilibrium relationships: Error correction models with strongly autoregressive data. Political Analysis 9: 7894.
Doyle, Michael W., and Sambanix, Nicholas. 2000. International peacebuilding: A theoretical and quantitative analysis. American Political Science Review 94: 779802.
Durr, Robert. 1993. An essay on cointegration and error correction models. Political Analysis 4: 185228.
Engle, Robert F., and Granger, Clive W. J. 1987. Cointegration and error correction: Representation, estimation and testing. Econometrica 55: 251–76.
Fearon, James D. 2004. Why do some civil wars last so much longer than others. Journal of Peace Research 41: 275301.
Fearon, James D., Kasara, Kmuli, and Laitin, David D. 2007. Ethnic minority rule and civil war onset. American Political Science Review 101: 187–93.
Fearon, James D., and Laitin, David D. 2003. Ethnicity, insurgency, and civil war. American Political Science Review 97: 7590.
Franzse, Robert J., and Hays, Jude C. 2007. Spatial econometric models of cross-sectional interdependence in political science panel and time-series-cross-section data. Political Analysis 15: 140–64.
Franzse, Robert J., and Hays, Jude C. 2008a. Empirical models of spatial interdependence. In Oxford handbook of political ethodology, ed. Box-Steffensmeier, J., Brady, H., and Dollier, D., 570604. Oxford: Oxford University Press.
Franzse, Robert J., and Hays, Jude C. 2008b. Empirical modeling of spatial interdependence in time-series cross-sections. In Methods of comparative political and social science: New developments & applications, ed. Pickel, S., Pickel, G., Lauth, H.-J., and Jahn, D. Wiesbaden: Westdeutscher Verlag.
Garrett, Geoffrey. 1998. Global markets and national politics: Collision course or virtuous circle? International Organization 52: 787824.
Gelman, Andrew, Carlin, John B., HalStern, S., and Rubin, Donald B. 1995. Bayesian data analysis. New York: Chapman and Hall.
Gelman, Andrew, and Hill, Jennifer. 2006. Data analysis using regression and multilevel/hierarchical models. New York: Cambridge University Press.
Geweke, John. 1991. Efficient simulation from the multivariate normal and student-t distributions subject to linear constaints. In Computing Science and Statistics: Proceedings of the Twenty Third Symposium on the Interface, ed. Keramidas, E. M., 571–8. Fairfax, VA: Interface Foundation of North America.
Geweke, John. 1996. Bayesian inference for linear models subject to linear inequality constraints. In Modeling and prediction: Honouring Seymour Geisser, ed. Johnson, W. O., Lee, J. C., and Zellner, A. New York: Springer.
Gill, Jeff. 2007. Bayesian methods: A social and behavioral sciences approach. 2nd ed. Boca Raton, FL: Chapman and Hall.
Goldstone, Jack A., Gurr, Ted Robert, Harff, Barbara, Levy, Marc A., Marshall, Monty G., Bates, Robert H., Epstein, David L., Kahl, Colin H., Surko, Pamela T., Ulfelder, John C., and Unger, Alan U. 2000. State failure task force report: Phase III findings. McLean, VA: Science Applications International Corporation.
Goodman, Jonathan, and Sokal, Alan D. 1989. Multigrid Monte Carlo method: Conceptual foundations. Physical Review D 40(6): 2035–72.
Gourieroux, Christian, Monfort, A., and Trognon, A. 1984. Estimation and test in probit models with serial correlation. In Alternative approaches to time series analysis, ed. Florens, J. P., Mouchart, M., Raoult, J. P., and Simar, L. Brussels: Publications des Facultes Universitaires Saint-Louis.
Gourieroux, Christian, Monfort, A., and Trognon, A. 1985. A general approach to serial correlation. Econometric Theory 1: 315–40.
Hagenaars, Jacques A. 1990. Categorical longitudinal data: Log-linear analysis of panel, trend and cohort data. London: Sage.
Hamilton, James Douglas 1994. Time series analysis. Princeton, NJ: Princeton University Press.
Han, Cong, and Carlin, Bradley. 2001. Markov chain Monte Carlo methods for computing Bayes factors: A comprehensive review. Journal of the American Statistical Association 96: 1122–32.
Heckman, James. 1981. Heterogeneity and state dependence. In Labor markets, ed. Rosen, S., 91131. Chicago, IL: University of Chicago Press.
Hubrich, Kirstin, Luetkepohl, Helmut, and Saikkonen, Pentti. 2001. A review of systems cointegration tests. Econometric Reviews 20: 247318.
Ibrahim, Joseph G., and Klainman, Kenneth. 1998. Bayesian inference for random effect models. In Practical nonparametric and semiparametric Bayesian statistics, ed. Dey, D., Mueller, P., and Sinha, D. New York: Springer.
Im, Kyung So, Hashem Pesaran, M., and Shin, Yongcheol. 2003. Testing for unit roots in heterogeous panels. Journal of Econometrics 115: 5374.
Kao, Chihwa. 1999. Spurious regression and residual-based tests for cointegration in panel data. Journal of Econometrics 90: 144.
Keane, Michael P. 1994. A computational practical simulation estimator for panel data. Econometrica 62: 95116.
King, Gary, and Zeng, Langche. 2001a. Explaining rare events in international relations. International Organization 55: 693715.
King, Gary, and Zeng, Langche. 2001b. Improving forecasts of state failure. World Politics 53: 623–58.
King, Gary, and Zeng, Langche. 2001c. Logistic regression in rare events data. Political Analysis 9: 137–63.
Liu, Jun S., and Sabatti, Chiara. 2000. Generalised Gibbs sampler and multigrid Monte Carlo for Bayesian computation. Biometrika 87: 353–69.
Liu, Jun S., and Wu, Ying Nian. 1999. Parameter expansion for data augmentation. Journal of American Statistical Association 94: 1264–74.
Lumley, Thomas, and Heagerty, Patrick. 1999. Weighted empirical adaptive variance estimators for correlated data regression. Journal of the Royal Statistical Society: Series B 61: 459–77.
Miguel, Edward, Satyanath, Shanker, and Sergenti, Ernest. 2004. Economic shocks and civil conflict: An instrumental variables approach. Journal of Political Economy 112: 725–53.
Molenberghs, Geert, and Verbeke, Geert. 2005. Models for discrete longitudinal data. New York: Spriner.
Mueller, Gernot, and Czado, Claudia. 2005. An autoregressive ordered probit model with application to high-frequency financial data. Journal of Computational & Graphical Statistics 14: 320338.
Ng, Edmond S.W., Carpenter, James R., Goldstein, Harvey, and Rasbash, Jon. 2006. Estimation in generalized linear mixed models with binary outcomes by simulated maximum likelihood. Statistical Modelling 6: 2342.
Olsen, Karen K., and Schafer, Joseph L. 2001. A two-part random-effects model for semicontinuous longitudinal data. Journal of the American Statistical Association 96: 730–45.
Pang, Xun. 2008. Binary time series with AR(p) errors: Bayes factor for lag order determination and model selection. Working paper.
Pang, Xun, and Gill, Jeff. 2010. Spike and slab prior distributions for simultaneous Bayesian hypothesis testing, model selection, and prediction, of nonlinear outcomes. Working paper.
Pedroni, Peter. 1999. Critical values for cointegration tests in heterogeneous panels with multiple regressors. Oxford Bulletin of Economics and Statistics 61: 653–70.
Pedroni, Peter. 2004. Panel cointegration: Asymptotic and finite sample properties of pooled time series tests with an application to the PPP hypothesis. Econometric Theory 3: 579625.
Peters, B. Guy, Pierre, Jon, and King, Desmond S. 2005. The politics of path dependency: Political conflict in historical institutionalism. The Journal of Politics 67: 1275–300.
Philips, Peter C.B., and Sul, Donggyu. 2003. Dynamic panel estimation and homogeneity testing under cross section dependence. Econometrics Journal 6: 217–59.
Pierson, Paul, and Skocpol, Theda. 2002. Historical insitutionalism in contemporary political science. In Political science: State of the discipline, ed. Katznelson, Ira, and Helen Milner, V. 692721. New York: W.W. Norton.
Poirier, Dale J., and Ruud, Paul A. 1988. Probit with dependent observations. The Review of Economic Studies 55: 593614.
Renard, Didier, Molenberghs, Geert, and Geys, Helena. 2004. A pairwise likelihood approach to estimation in multilevel probit models. Computational Statistics & Data Analysis 44: 649–67.
Rodriguez-Yam, Gabriel, Davis, Richard A., and Scharf, Louis L. 2004. Efficient Gibbs sampling of truncated multivariate normal with application to constrained inear regression. Unpublished manuscript, Colorado State University.
Rudra, Nita. 2002. Globalization and the decline of the welfare state in less-developed countries. International Organization 56: 411–45.
Sambanis, Nicholas. 2001. Do ethnic and nonethnic civil wars have the same causes?: A theoretical and empirical inquiry (Part I). The Journal of Conflict Resolution 45: 259–82.
Sambanis, Nicholas. 2002. A review of recent advances and future directions in the quantitative literature on civil war. Defence and Peace Economics 13: 215–43.
Sandor, Zsolt, and Andras, Peter. 2004. Alternative sampling methods for estimating multivariate normal probabilities. Journal of Econometrics 120: 207–34.
Schafer, Joseph L., and Yucel, Recai M. 2002. Computational strategies for multivariate linear mixed-effects models with missing values. Journal of Computational & Graphical Statistics 11: 437–57.
Shor, Boris, Bafumi, Joseph, Keele, Luke, and Park, David. 2007. A Bayesian multilevel modeling approach to time-series cross-sectional data. Political Analysis 15: 165–81.
Singer, Judith D., and Willett, John B. 2003. Applied longitudinal data analysis: Modelling change and event occurrence. New York: Oxford University Press.
Skrondal, Anders, and Rabe-Hesketh, Sophia. 2004. Generalized latent variable modeling: Multilevel, longitudinal, and structural equation models. New York: Chapman and Hall.
Skrondal, Anders, and Rabe-Hesketh, Sophia. 2008. Multilevel and related models for longitudinal data. In Handbook of multilevel analysis, ed. de Leeuw, Jan and Meijer, Erik, 275300. New York: Springer.
Smith, Robert. 1993. Error correction, attractions, and cointegration: Substantive and methodological issues. Political Analysis 4: 249–54.
Sul, Donggyu. 2009. Panel unit root tests under cross section dependence with recursive mean adjustment. Economics Letter 105(1): 123–6.
Thelen, Kathleen. 1999. Historical institutionalism in comparative politics. Annual Review of Political Science 2: 369404.
Williams, John. 1993. What goes around, comes around: Unit root tests and cointegration. Political Analysis 4: 229–36.
Wilson, Sven E., and Butler, Daniel M. 2007. A lot more to do: The sensitivity of time-series-cross-section analyses to simple alternative specifications. Political Analysis 15: 101–23.
Woods, Ngaire. 2001. International political economy in an age of globalization. In The globalization of world politics, ed. Baylis, John and Smith, Steve. New York: Oxford University Press.
Yang, Yang, Fu, Wenjiang, and Land, Kenneth C. 2004. A methodological comparison of age-period-cohort models: The intrinsic estimator and conventional generalized linear models. Sociological Methodology 34(1): 75110.
Zeileis, Achim. 2004. Econometric computing with HC and HAC covariance matix estimators. Journal of Statistical Software 11 (i10): 117.
MathJax is a JavaScript display engine for mathematics. For more information see

Related content

Powered by UNSILO

Modeling Heterogeneity and Serial Correlation in Binary Time-Series Cross-sectional Data: A Bayesian Multilevel Model with AR(p) Errors

  • Xun Pang (a1)


Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed.