diff --git a/NEWS.md b/NEWS.md index 350105a..3a6940e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # dfms 0.3.0 -* Added argument `quarterly.vars`, enabling mixed-frequency estimation with monthly and quarterly data following Banbura and Modugno (2014). The data matrix should contain the quarterly variables at the end of the matrix (after the monthly ones). +* Added argument `quarterly.vars`, enabling mixed-frequency estimation with monthly and quarterly data following Banbura and Modugno (2014). The data matrix should contain the quarterly variables at the end (after the monthly ones). # dfms 0.2.2 diff --git a/README.md b/README.md index 81a4a9e..b272572 100644 --- a/README.md +++ b/README.md @@ -21,18 +21,16 @@ The package is fully functional though, and you are very welcome to install it u - Doz, C., Giannone, D., & Reichlin, L. (2011). A two-step estimator for large approximate dynamic factor models based on Kalman filtering. *Journal of Econometrics, 164*(1), 188-205. -- Doz, C., Giannone, D., & Reichlin, L. (2012). A quasi-maximum likelihood approach for large, approximate dynamic factor models. *Review of economics and statistics, 94*(4), 1014-1024. +- Doz, C., Giannone, D., & Reichlin, L. (2012). A quasi-maximum likelihood approach for large, approximate dynamic factor models. *Review of Economics and Statistics, 94*(4), 1014-1024. - Banbura, M., & Modugno, M. (2014). Maximum likelihood estimation of factor models on datasets with arbitrary pattern of missing data. *Journal of Applied Econometrics, 29*(1), 133-160. -The default is `em.method = "auto"`, which chooses `"DGR"` following Doz, Giannone & Reichlin (2012) if there are no missing values in the data, and `"BM"` following Banbura & Modugno (2014) with missing data. Using `em.method = "none"` generates Two-Step estimates following Doz, Giannone & Reichlin (2011). This is extremely efficient on bigger datasets. PCA and Two-Step estimates are also reported in EM-based methods. - -All 3 estimation methods support missing data, with various preprocessing options, but `em.method = "DGR"` does not account for them in the EM iterations, and should only be used if a few values are missing at random. For all other cases `em.method = "BM"` or `em.method = "none"` is the way to go. +The default is `em.method = "auto"`, which chooses `"BM"` following Banbura & Modugno (2014) with missing data or mixed frequency, and `"DGR"` following Doz, Giannone & Reichlin (2012) otherwise. Using `em.method = "none"` generates Two-Step estimates following Doz, Giannone & Reichlin (2011). This is extremely efficient on bigger datasets. PCA and Two-Step estimates are also reported in EM-based methods. All 3 estimation methods support missing data, but `em.method = "DGR"` does not account for them in the EM iterations. ### Comparison with Other R Packages -*dfms* is intended to provide a simple, numerically robust, and computationally efficient baseline implementation of (linear Gaussian) Dynamic Factor Models for R, allowing straightforward application to various contexts such as time series dimensionality reduction and multivariate forecasting. The implementation is based on efficient C++ code, making *dfms* orders of magnitude faster than packages such as [*MARSS*]() that can be used to fit dynamic factor models, or packages like [*nowcasting*]() and [*nowcastDFM*](), which fit dynamic factor models specific to mixed-frequency nowcasting applications. The latter two packages additionally support blocking of variables into different groups for which factors are to be estimated, and EM adjustments for variables at different frequencies. -The package is currently not intended to fit more general forms of the state space model such as provided by [*MARSS*](). +*dfms* is intended to provide a simple, numerically robust, and computationally efficient baseline implementation of (linear Gaussian) Dynamic Factor Models for R, allowing straightforward application to various contexts such as time series dimensionality reduction and forecasting. The implementation is based on efficient C++ code, making *dfms* orders of magnitude faster than packages that can be used to fit dynamic factor models such as [*MARSS*](), or [*nowcasting*]() and [*nowcastDFM*]() geared to mixed-frequency nowcasting applications - supporting blocking of variables into different groups for which factors are to be estimated and evaluation of news content. For large-scale nowcasting models the [`DynamicFactorMQ`](https://www.statsmodels.org/dev/generated/statsmodels.tsa.statespace.dynamic_factor_mq.DynamicFactorMQ.html) class in the `statsmodels` Python library is probably the most robust implementation - see the [example](http://www.chadfulton.com/topics/statespace_large_dynamic_factor_models.html) by Chad Fulton. +The *dfms* package is not intended to fit more general forms of the state space model such as provided by [*MARSS*](). diff --git a/_pkgdown.yml b/_pkgdown.yml index 6e85eb0..494ac47 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -83,6 +83,10 @@ reference: - contents: - BM14_Models +external-articles: + - name: dynamic_factor_models + href: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf + articles: - title: Introduction to dfms desc: Provides a walk-through of all main features @@ -91,4 +95,4 @@ articles: - title: Dynamic Factor Models - A Very Short Introduction desc: Provides a short theoretical overview of dynamics factor models as used in the economics literature contents: - - url: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf + - dynamic_factor_models diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..a1eb455 --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,64 @@ +.navbar-nav .nav-item > .nav-link { + margin-right: 10px; +} +.template-home img.logo { + width: 150px; +} +img.logo { + width: 150px; + margin-left: 30px; +} +.h1, .h2, .h3, h1, h2, h3 { + margin-top: 35px; + margin-bottom: 10px; +} +body { + font-size: 100%; +} +/* +p { + font-size: 0.875em; 14px/16=0.875em +} +*/ +.fa-bluesky { + font-family: "Font Awesome 6 Brands"; + font-weight: 400; +} +span.fa.fa-bluesky { + font-size: 15.5px; +} +@media screen and (min-width: 1000px) { + span.fa.fa-bluesky { + padding-left: 12px; + } +} +span.fa.fa-twitter { + font-size: 18px; +} +span.fa.fa-github { + font-size: 18px; + margin-right: 100px; +} +a { + color: #0089b3; /* #007da3 */ +} +a:hover { + color: #005873; /* #027ca1; */ +} +pre { + color: #cccccc; +} +small.nav-text.text-muted { + color: #999a9c !important; /* #8e8c84 #999a9c; -> Same as navbar */ +} + +.form-control, +.form-control::placeholder { + color: #999a9c !important; +} + +[data-bs-theme="dark"] { + --bs-body-color: #cccccc !important; + --bs-secondary-color: #cccccc !important; + --bs-tertiary-color: #999a9c !important; +}