IDEAS home Printed from https://ideas.repec.org/p/boc/dsug08/07.html
   My bibliography  Save this paper

Using Stata for a memory-saving fixed-effects estimation of the three-way error-components model

Author

Listed:
  • Thomas Cornelissen

    (Leibniz Universität Hannover)

Abstract

Researchers trying to estimate tens or hundreds of thousands of fixed effects for two or more groups (workers and firms; pupils, teachers and schools; etc.) in datasets with high numbers of observations are often limited by the size of computer memory available. Such a model is commonly estimated by sweeping out one of the effects by the fixed-effects transformation (time-demeaning) and by including the remaining effects as dummy variables. If K is the number of fixed effects to be included as dummy variables, and N is the number of observations, then the design matrix is of dimension N x K (neglecting any remaining right-hand-side regressors). The time-demeaned dummies have to be stored as “float” variables consuming 8 bytes per cell in Stata. For example, with 2 million observations (N) and 10 thousand fixed effects (K), the memory requirement would be 160 gigabytes. This paper describes how the memory requirement can be reduced to store only a K x K matrix, which in the given example reduces the memory requirement to below 1 gigabyte. The paper also describes the Stata program felsdvreg.ado, which implements the method in Mata. Besides implementing the memory-saving estimation method, the program also takes care of checking the identification of the effects and provides useful summary statistics.

Suggested Citation

  • Thomas Cornelissen, 2008. "Using Stata for a memory-saving fixed-effects estimation of the three-way error-components model," German Stata Users' Group Meetings 2008 07, Stata Users Group.
  • Handle: RePEc:boc:dsug08:07
    as

    Download full text from publisher

    File URL: http://fmwww.bc.edu/repec/dsug2008/cornelissen_2008.pdf
    Download Restriction: no
    ---><---

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Davidson, Carl & Heyman, Fredrik & Matusz, Steven & Sjöholm, Fredrik & Zhu, Susan Chun, 2014. "Globalization and imperfect labor market sorting," Journal of International Economics, Elsevier, vol. 94(2), pages 177-194.
    2. Hackl, Franz & Kügler, Agnes & Winter-Ebmer, Rudolf, 2011. "Reputation and Certification in Online Shops," Economics Series 279, Institute for Advanced Studies.
    3. Nikolas Mittag, 2015. "A Simple Method to Estimate Large Fixed Effects Models Applied to Wage Determinants and Matching," CERGE-EI Working Papers wp532, The Center for Economic Research and Graduate Education - Economics Institute, Prague.
    4. Mittag, Nikolas, 2016. "A Simple Method to Estimate Large Fixed Effects Models Applied to Wage Determinants and Matching," IZA Discussion Papers 10447, Institute of Labor Economics (IZA).
    5. Christian Volpe Martincus & Jerónimo Carballo, 2010. "Is Export Promotion Effective in Developing Countries? Firm-Level Evidence on the Intensive and Extensive Margins of Exports," IDB Publications (Working Papers) 36763, Inter-American Development Bank.
    6. Nils Braakmann, 2008. "Crime does pay (at least when it’s violent)!– On the compensating wage differentials of high regional crime levels," Working Paper Series in Economics 91, University of Lüneburg, Institute of Economics.
    7. Braakmann, Nils, 2009. "Is there a compensating wage differential for high crime levels? First evidence from Europe," Journal of Urban Economics, Elsevier, vol. 66(3), pages 218-231, November.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    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:boc:dsug08:07. See general information about how to correct material in RePEc.

    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.

    We have no bibliographic references for this item. You can help adding them by using 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.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F Baum (email available below). General contact details of provider: https://edirc.repec.org/data/stataea.html .

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

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.