IDEAS home Printed from https://ideas.repec.org/a/bpj/jecome/v5y2016i1p143-152n4.html
   My bibliography  Save this article

An Algorithm to Estimate the Two-Way Fixed Effects Model

Author

Listed:
  • Somaini Paulo

    () (Department of Economics, MIT, Cambridge, MA, USA)

  • Wolak Frank A.

    (Department of Economics, Stanford University, Stanford, CA, USA)

Abstract

We present an algorithm to estimate the two-way fixed effect linear model. The algorithm relies on the Frisch-Waugh-Lovell theorem and applies to ordinary least squares (OLS), two-stage least squares (TSLS) and generalized method of moments (GMM) estimators. The coefficients of interest are computed using the residuals from the projection of all variables on the two sets of fixed effects. Our algorithm has three desirable features. First, it manages memory and computational resources efficiently which speeds up the computation of the estimates. Second, it allows the researcher to estimate multiple specifications using the same set of fixed effects at a very low computational cost. Third, the asymptotic variance of the parameters of interest can be consistently estimated using standard routines on the residualized data.

Suggested Citation

  • Somaini Paulo & Wolak Frank A., 2016. "An Algorithm to Estimate the Two-Way Fixed Effects Model," Journal of Econometric Methods, De Gruyter, vol. 5(1), pages 143-152, January.
  • Handle: RePEc:bpj:jecome:v:5:y:2016:i:1:p:143-152:n:4
    as

    Download full text from publisher

    File URL: https://www.degruyter.com/view/j/jem.2016.5.issue-1/jem-2014-0008/jem-2014-0008.xml?format=INT
    Download Restriction: For access to full text, subscription to the journal or payment for the individual article is required.

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Cornelissen, Thomas, 2008. "The Stata command felsdvreg to fit a linear model with two high–dimensional fixed effects," Stata Journal, StataCorp LP, vol. 8(2), pages 1-20.
    2. Sergio Correia, 2014. "REGHDFE: Stata module to perform linear or instrumental-variable regression absorbing any number of high-dimensional fixed effects," Statistical Software Components S457874, Boston College Department of Economics, revised 18 Nov 2019.
    3. John M. Abowd & Francis Kramarz & David N. Margolis, 1999. "High Wage Workers and High Wage Firms," Econometrica, Econometric Society, vol. 67(2), pages 251-334, March.
    4. repec:ags:stataj:163398 is not listed on IDEAS
    5. Amine Ouazad, 2008. "A2REG: Stata module to estimate models with two fixed effects," Statistical Software Components S456942, Boston College Department of Economics.
    6. Guimarães, Paulo & Portugal, Pedro, 2010. "A simple feasible procedure to fit models with high-dimensional fixed effects," Stata Journal, StataCorp LP, vol. 10(4), pages 1-22.
    7. Jeffrey M Wooldridge, 2010. "Econometric Analysis of Cross Section and Panel Data," MIT Press Books, The MIT Press, edition 2, volume 1, number 0262232588.
    8. Anabela Carneiro & Paulo Guimarães & Pedro Portugal, 2012. "Real Wages and the Business Cycle: Accounting for Worker, Firm, and Job Title Heterogeneity," American Economic Journal: Macroeconomics, American Economic Association, vol. 4(2), pages 133-152, April.
    Full references (including those not matched with items on IDEAS)

    Citations

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


    Cited by:

    1. Frank R. LICHTENBERG, 2018. "The Impact of New Drug Launch on Life-Years Lost in 2015 from 19 Types of Cancer in 36 Countries," JODE - Journal of Demographic Economics, Cambridge University Press, vol. 84(3), pages 309-354, September.
    2. repec:eee:pubeco:v:175:y:2019:i:c:p:94-118 is not listed on IDEAS

    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:bpj:jecome:v:5:y:2016:i:1:p:143-152:n:4. 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: (Peter Golla). General contact details of provider: https://www.degruyter.com .

    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.