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.
翻译:sparseDFM是一个用于实现动态因子模型(DFM)主流估计方法的R语言包,其中包含Mosley等人(2023)提出的新型稀疏DFM方法。该稀疏DFM通过约束载荷矩阵仅保留少数非零元素(即稀疏性),改善了经典DFM中因子结构的可解释性问题。Mosley等人(2023)构建了一种高效的期望最大化(EM)算法,通过正则化拟极大似然估计实现模型参数估计。本文详细阐述了该估计策略,并展示了如何以计算高效的方式实现该算法。随后通过两个真实数据案例研究作为教程,展示sparseDFM包的使用方法:第一个案例研究聚焦于对英国季度消费价格指数(CPI)数据子集的结构进行总结;第二个案例则将本包应用于大规模月度时间序列数据集,用于对英国全球九大主要贸易商品进行即时预测。