IDEAS home Printed from
   My bibliography  Save this paper

A Within Estimator for Three-Level Data: An Application to the WTO Effect on Trade Flows



This paper proposes a within estimator for three-level data, such as time-variant bilateral trade flows. The estimator helps to address the computational difficulties in estimating, for instance, the gravity model of bilateral trade that needs to control for unobserved country-pair and country-time heterogeneity using fixed effects. Unlike the traditional within transformation that removes cross-sectional heterogeneity, the proposed transformation method removes all three types of heterogeneity, each of which varies in two dimensions of three-level data. We demonstrate the properties of the estimator using empirical examples and Monte Carlo simulations. Simulation results show that the proposed estimators with the adjusted standard errors consistently estimate coefficient parameters and perform correct inference when no data are missing or the missing data are random. When missing data are not random, the proposed within transformation can reduce bias to various degrees, depending on the order of demeaning and sources of bias. As an empirical application, we investigate the WTO effect puzzle by applying the proposed estimator to show that WTO membership has a definite positive effect on bilateral trade flows.

Suggested Citation

  • Juyoung Cheong & Do Won Kwak & Kam Ki Tang, 2014. "A Within Estimator for Three-Level Data: An Application to the WTO Effect on Trade Flows," Discussion Papers Series 501, School of Economics, University of Queensland, Australia.
  • Handle: RePEc:qld:uq2004:501

    Download full text from publisher

    File URL:
    Download Restriction: no

    References listed on IDEAS

    1. James E. Anderson & Eric van Wincoop, 2003. "Gravity with Gravitas: A Solution to the Border Puzzle," American Economic Review, American Economic Association, vol. 93(1), pages 170-192, March.
    2. Andrew K. Rose, 2004. "Do We Really Know That the WTO Increases Trade?," American Economic Review, American Economic Association, vol. 94(1), pages 98-114, March.
    3. Michael Tomz & Judith L. Goldstein & Douglas Rivers, 2007. "Do We Really Know That the WTO Increases Trade? Comment," American Economic Review, American Economic Association, vol. 97(5), pages 2005-2018, December.
    4. I-Hui Cheng & Howard J. Wall, 2005. "Controlling for heterogeneity in gravity models of trade and integration," Review, Federal Reserve Bank of St. Louis, issue Jan, pages 49-63.
    5. Jeffrey M Wooldridge, 2010. "Econometric Analysis of Cross Section and Panel Data," MIT Press Books, The MIT Press, edition 2, volume 1, number 0262232588, July.
    6. Juyoung Cheong & Do Won Kwak & Kam Ki Tang, 2015. "Can Trade Agreements Curtail Trade Creation and Prevent Trade Diversion?," Review of International Economics, Wiley Blackwell, vol. 23(2), pages 221-238, May.
    7. Roy, Jayjit, 2011. "Is the WTO mystery really solved?," Economics Letters, Elsevier, vol. 113(2), pages 127-130.
    8. Eicher, Theo S. & Henn, Christian, 2011. "In search of WTO trade effects: Preferential trade agreements promote trade strongly, but unevenly," Journal of International Economics, Elsevier, vol. 83(2), pages 137-153, March.
    9. Xuepeng Liu, 2009. "GATT/WTO Promotes Trade Strongly: Sample Selection and Model Specification," Review of International Economics, Wiley Blackwell, vol. 17(3), pages 428-446, August.
    10. Cameron,A. Colin & Trivedi,Pravin K., 2008. "Microeconometrics," Cambridge Books, Cambridge University Press, number 9787111235767, March.
    11. Lancaster, Tony, 2000. "The incidental parameter problem since 1948," Journal of Econometrics, Elsevier, vol. 95(2), pages 391-413, April.
    12. Davidson, Russell & MacKinnon, James G., 1993. "Estimation and Inference in Econometrics," OUP Catalogue, Oxford University Press, number 9780195060119.
    13. Baier, Scott L. & Bergstrand, Jeffrey H., 2007. "Do free trade agreements actually increase members' international trade?," Journal of International Economics, Elsevier, vol. 71(1), pages 72-95, March.
    14. Konya, Laszlo & Matyas, Laszlo & Harris, Mark, 2011. "GATT/WTO membership does promote international trade after all – Some new empirical evidence," MPRA Paper 34978, University Library of Munich, Germany, revised 20 Nov 2011.
    15. Yongcheol Shin & Laura Serlenga, 2007. "Gravity models of intra-EU trade: application of the CCEP-HT estimation in heterogeneous panels with unobserved common time-specific factors," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 22(2), pages 361-381.
    Full references (including those not matched with items on IDEAS)

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:


    Access and download statistics


    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:qld:uq2004:501. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (SOE IT). General contact details of provider: .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.