IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2303.14125.html
   My bibliography  Save this paper

sparseDFM: An R Package to Estimate Dynamic Factor Models with Sparse Loadings

Author

Listed:
  • Luke Mosley
  • Tak-Shing Chan
  • Alex Gibberd

Abstract

sparseDFM is an R package for the implementation of popular estimation methods for dynamic factor models (DFMs) including the novel Sparse DFM approach of Mosley et al. (2023). The Sparse DFM ameliorates interpretability issues of factor structure in classic DFMs by constraining the loading matrices to have few non-zero entries (i.e. are sparse). Mosley et al. (2023) construct an efficient expectation maximisation (EM) algorithm to enable estimation of model parameters using a regularised quasi-maximum likelihood. We provide detail on the estimation strategy in this paper and show how we implement this in a computationally efficient way. We then provide two real-data case studies to act as tutorials on how one may use the sparseDFM package. The first case study focuses on summarising the structure of a small subset of quarterly CPI (consumer price inflation) index data for the UK, while the second applies the package onto a large-scale set of monthly time series for the purpose of nowcasting nine of the main trade commodities the UK exports worldwide.

Suggested Citation

  • Luke Mosley & Tak-Shing Chan & Alex Gibberd, 2023. "sparseDFM: An R Package to Estimate Dynamic Factor Models with Sparse Loadings," Papers 2303.14125, arXiv.org.
  • Handle: RePEc:arx:papers:2303.14125
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2303.14125
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Giannone, Domenico & Reichlin, Lucrezia & Small, David, 2008. "Nowcasting: The real-time informational content of macroeconomic data," Journal of Monetary Economics, Elsevier, vol. 55(4), pages 665-676, May.
    2. Doz, Catherine & Giannone, Domenico & Reichlin, Lucrezia, 2011. "A two-step estimator for large approximate dynamic factor models based on Kalman filtering," Journal of Econometrics, Elsevier, vol. 164(1), pages 188-205, September.
    3. Jushan Bai & Serena Ng, 2002. "Determining the Number of Factors in Approximate Factor Models," Econometrica, Econometric Society, vol. 70(1), pages 191-221, January.
    4. Catherine Doz & Domenico Giannone & Lucrezia Reichlin, 2012. "A Quasi–Maximum Likelihood Approach for Large, Approximate Dynamic Factor Models," The Review of Economics and Statistics, MIT Press, vol. 94(4), pages 1014-1024, November.
    5. R. H. Shumway & D. S. Stoffer, 1982. "An Approach To Time Series Smoothing And Forecasting Using The Em Algorithm," Journal of Time Series Analysis, Wiley Blackwell, vol. 3(4), pages 253-264, July.
    6. Seung C. Ahn & Alex R. Horenstein, 2013. "Eigenvalue Ratio Test for the Number of Factors," Econometrica, Econometric Society, vol. 81(3), pages 1203-1227, May.
    7. Harvey,Andrew C., 1991. "Forecasting, Structural Time Series Models and the Kalman Filter," Cambridge Books, Cambridge University Press, number 9780521405737.
    8. Alexei Onatski, 2009. "Testing Hypotheses About the Number of Factors in Large Factor Models," Econometrica, Econometric Society, vol. 77(5), pages 1447-1479, September.
    9. Poncela, Pilar & Ruiz, Esther & Miranda, Karen, 2021. "Factor extraction using Kalman filter and smoothing: This is not just another survey," International Journal of Forecasting, Elsevier, vol. 37(4), pages 1399-1425.
    10. Matteo Luciani, 2015. "Monetary Policy and the Housing Market: A Structural Factor Analysis," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 30(2), pages 199-218, March.
    11. Reichlin, Lucrezia & Giannone, Domenico & Small, David, 2005. "Nowcasting GDP and Inflation: The Real Time Informational Content of Macroeconomic Data Releases," CEPR Discussion Papers 5178, C.E.P.R. Discussion Papers.
    12. Ayhan Kose, M. & Otrok, Christopher & Whiteman, Charles H., 2008. "Understanding the evolution of world business cycles," Journal of International Economics, Elsevier, vol. 75(1), pages 110-130, May.
    13. Marta Bańbura & Michele Modugno, 2014. "Maximum Likelihood Estimation Of Factor Models On Datasets With Arbitrary Pattern Of Missing Data," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 29(1), pages 133-160, January.
    14. S. J. Koopman & J. Durbin, 2000. "Fast Filtering and Smoothing for Multivariate State Space Models," Journal of Time Series Analysis, Wiley Blackwell, vol. 21(3), pages 281-296, May.
    15. Durbin, James & Koopman, Siem Jan, 2012. "Time Series Analysis by State Space Methods," OUP Catalogue, Oxford University Press, edition 2, number 9780199641178.
    16. Henry Kaiser, 1958. "The varimax criterion for analytic rotation in factor analysis," Psychometrika, Springer;The Psychometric Society, vol. 23(3), pages 187-200, September.
    17. Eddelbuettel, Dirk & Sanderson, Conrad, 2014. "RcppArmadillo: Accelerating R with high-performance C++ linear algebra," Computational Statistics & Data Analysis, Elsevier, vol. 71(C), pages 1054-1063.
    18. Mario Forni & Luca Gambetti, 2021. "Policy and Business Cycle Shocks: A Structural Factor Model Representation of the US Economy," JRFM, MDPI, vol. 14(8), pages 1-21, August.
    19. E. Andreou & P. Gagliardini & E. Ghysels & M. Rubin, 2019. "Inference in Group Factor Models With an Application to Mixed‐Frequency Data," Econometrica, Econometric Society, vol. 87(4), pages 1267-1305, July.
    20. repec:hal:journl:peer-00844811 is not listed on IDEAS
    21. Grassi, Stefano & Proietti, Tommaso & Frale, Cecilia & Marcellino, Massimiliano & Mazzi, Gianluigi, 2015. "EuroMInd-C: A disaggregate monthly indicator of economic activity for the Euro area and member countries," International Journal of Forecasting, Elsevier, vol. 31(3), pages 712-738.
    22. Roberto S. Mariano & Yasutomo Murasawa, 2010. "A Coincident Index, Common Factors, and Monthly Real GDP," Oxford Bulletin of Economics and Statistics, Department of Economics, University of Oxford, vol. 72(1), pages 27-46, February.
    23. Thomas Despois & Catherine Doz, 2022. "Identifying and interpreting the factors in factor models via sparsity : Different approaches," Working Papers halshs-03626503, HAL.
    24. Jushan Bai, 2003. "Inferential Theory for Factor Models of Large Dimensions," Econometrica, Econometric Society, vol. 71(1), pages 135-171, January.
    25. R. Jennrich & P. Sampson, 1966. "Rotation for simple loadings," Psychometrika, Springer;The Psychometric Society, vol. 31(3), pages 313-323, September.
    26. Peter Molenaar, 1985. "A dynamic factor model for the analysis of multivariate time series," Psychometrika, Springer;The Psychometric Society, vol. 50(2), pages 181-202, June.
    27. John Carroll, 1953. "An analytical solution for approximating simple structure in factor analysis," Psychometrika, Springer;The Psychometric Society, vol. 18(1), pages 23-38, March.
    28. Thomas J. Sargent & Christopher A. Sims, 1977. "Business cycle modeling without pretending to have too much a priori economic theory," Working Papers 55, Federal Reserve Bank of Minneapolis.
    29. Foroni, Claudia & Marcellino, Massimiliano, 2014. "A comparison of mixed frequency approaches for nowcasting Euro area macroeconomic aggregates," International Journal of Forecasting, Elsevier, vol. 30(3), pages 554-568.
    30. Thomas Despois & Catherine Doz, 2022. "Identifying and interpreting the factors in factor models via sparsity : Different approaches," PSE Working Papers halshs-03626503, HAL.
    31. Stock J.H. & Watson M.W., 2002. "Forecasting Using Principal Components From a Large Number of Predictors," Journal of the American Statistical Association, American Statistical Association, vol. 97, pages 1167-1179, December.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Poncela, Pilar & Ruiz, Esther & Miranda, Karen, 2021. "Factor extraction using Kalman filter and smoothing: This is not just another survey," International Journal of Forecasting, Elsevier, vol. 37(4), pages 1399-1425.
    2. Stock, J.H. & Watson, M.W., 2016. "Dynamic Factor Models, Factor-Augmented Vector Autoregressions, and Structural Vector Autoregressions in Macroeconomics," Handbook of Macroeconomics, in: J. B. Taylor & Harald Uhlig (ed.), Handbook of Macroeconomics, edition 1, volume 2, chapter 0, pages 415-525, Elsevier.
    3. Matteo Barigozzi & Matteo Luciani, 2017. "Common Factors, Trends, and Cycles in Large Datasets," Finance and Economics Discussion Series 2017-111, Board of Governors of the Federal Reserve System (U.S.).
    4. Matteo Barigozzi & Matteo Luciani, 2019. "Quasi Maximum Likelihood Estimation and Inference of Large Approximate Dynamic Factor Models via the EM algorithm," Papers 1910.03821, arXiv.org, revised Feb 2022.
    5. Catherine Doz & Peter Fuleky, 2019. "Dynamic Factor Models," Working Papers 2019-4, University of Hawaii Economic Research Organization, University of Hawaii at Manoa.
    6. Catherine Doz & Peter Fuleky, 2019. "Dynamic Factor Models," PSE Working Papers halshs-02262202, HAL.
    7. Catherine Doz & Peter Fuleky, 2019. "Dynamic Factor Models," Working Papers halshs-02262202, HAL.
    8. Matteo Barigozzi, 2023. "Quasi Maximum Likelihood Estimation of High-Dimensional Factor Models: A Critical Review," Papers 2303.11777, arXiv.org, revised Dec 2023.
    9. Bańbura, Marta & Giannone, Domenico & Lenza, Michele, 2015. "Conditional forecasts and scenario analysis with vector autoregressions for large cross-sections," International Journal of Forecasting, Elsevier, vol. 31(3), pages 739-756.
    10. Matteo Barigozzi & Marc Hallin, 2023. "Dynamic Factor Models: a Genealogy," Papers 2310.17278, arXiv.org, revised Jan 2024.
    11. Juho Koistinen & Bernd Funovits, 2022. "Estimation of Impulse-Response Functions with Dynamic Factor Models: A New Parametrization," Papers 2202.00310, arXiv.org, revised Feb 2022.
    12. Jin, Sainan & Miao, Ke & Su, Liangjun, 2021. "On factor models with random missing: EM estimation, inference, and cross validation," Journal of Econometrics, Elsevier, vol. 222(1), pages 745-777.
    13. Pilar Poncela & Esther Ruiz, 2016. "Small- Versus Big-Data Factor Extraction in Dynamic Factor Models: An Empirical Assessment," Advances in Econometrics, in: Dynamic Factor Models, volume 35, pages 401-434, Emerald Group Publishing Limited.
    14. Karim Barhoumi & Olivier Darné & Laurent Ferrara, 2014. "Dynamic factor models: A review of the literature," OECD Journal: Journal of Business Cycle Measurement and Analysis, OECD Publishing, Centre for International Research on Economic Tendency Surveys, vol. 2013(2), pages 73-107.
    15. Marcellino, Massimiliano & Sivec, Vasja, 2016. "Monetary, fiscal and oil shocks: Evidence based on mixed frequency structural FAVARs," Journal of Econometrics, Elsevier, vol. 193(2), pages 335-348.
    16. Hindrayanto, Irma & Koopman, Siem Jan & de Winter, Jasper, 2016. "Forecasting and nowcasting economic growth in the euro area using factor models," International Journal of Forecasting, Elsevier, vol. 32(4), pages 1284-1305.
    17. Alain Galli, 2018. "Which Indicators Matter? Analyzing the Swiss Business Cycle Using a Large-Scale Mixed-Frequency Dynamic Factor Model," Journal of Business Cycle Research, Springer;Centre for International Research on Economic Tendency Surveys (CIRET), vol. 14(2), pages 179-218, November.
    18. Kihwan Kim & Norman Swanson, 2013. "Diffusion Index Model Specification and Estimation Using Mixed Frequency Datasets," Departmental Working Papers 201315, Rutgers University, Department of Economics.
    19. Martin Solberger & Erik Spånberg, 2020. "Estimating a Dynamic Factor Model in EViews Using the Kalman Filter and Smoother," Computational Economics, Springer;Society for Computational Economics, vol. 55(3), pages 875-900, March.
    20. Matteo Barigozzi & Antonio M. Conti & Matteo Luciani, 2014. "Do Euro Area Countries Respond Asymmetrically to the Common Monetary Policy?," Oxford Bulletin of Economics and Statistics, Department of Economics, University of Oxford, vol. 76(5), pages 693-714, October.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:arx:papers:2303.14125. 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.

    If CitEc recognized a bibliographic 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.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    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.