@article{JSSv092c02, title={gdpc: An R Package for Generalized Dynamic Principal Components}, volume={92}, url={https://www.jstatsoft.org/index.php/jss/article/view/v092c02}, doi={10.18637/jss.v092.c02}, abstract={gdpc is an R package for the computation of the generalized dynamic principal components proposed in Peña and Yohai (2016). In this paper, we briefly introduce the problem of dynamical principal components, propose a solution based on a reconstruction criteria and present an automatic procedure to compute the optimal reconstruction. This solution can be applied to the non-stationary case, where the components need not be a linear combination of the observations, as is the case in the proposal of Brillinger (1981). This article discusses some new features that are included in the package and that were not considered in Peña and Yohai (2016). The most important one is an automatic procedure for the identification of both the number of lags to be used in the generalized dynamic principal components as well as the number of components required for a given reconstruction accuracy. These tools make it easy to use the proposed procedure in large data sets. The procedure can also be used when the number of series is larger than the number of observations. We describe an iterative algorithm and present an example of the use of the package with real data.}, number={2}, journal={Journal of Statistical Software, Code Snippets}, author={Peña, Daniel and Smucler, Ezequiel and Yohai, Victor J.}, year={2020}, pages={1–23} }