From 03b9527736878cb0ff0569585a3a9fdb8abc14f9 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 01:56:24 -0400 Subject: [PATCH 01/11] Try RNW. --- _pkgdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 6e85eb0..58406ab 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -91,4 +91,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 From dff5fa9c40aed8e8cded93112b8b616a0514c4b3 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 09:49:55 -0400 Subject: [PATCH 02/11] Try again url. --- _pkgdown.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 58406ab..4379536 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -90,5 +90,4 @@ articles: - introduction - 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: - - dynamic_factor_models + url: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf From 4fc585abf11f599b80338f24a474bee9f82baad5 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:04:14 -0400 Subject: [PATCH 03/11] Update README. --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 81a4a9e..e752908 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 `"DGR"` following Doz, Giannone & Reichlin (2012) if there are no missing values, and `"BM"` following Banbura & Modugno (2014) with missing data or mixed frequency. 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 - support blocking of variables into different groups for which factors are to be estimated and evaluation of news releases. 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 also 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*](). From c70c7ca9508f457e96c6bba70cf951282dca85e0 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:10:22 -0400 Subject: [PATCH 04/11] Use external articles. --- _pkgdown.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 4379536..7eb4ab7 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -88,6 +88,9 @@ articles: desc: Provides a walk-through of all main features contents: - introduction - - title: Dynamic Factor Models - A Very Short Introduction + +external-articles: + - name: dynamic_factor_models + title: Dynamic Factor Models - A Very Short Introduction desc: Provides a short theoretical overview of dynamics factor models as used in the economics literature - url: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf + href: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf From 8eee5d5f2aef6fbc9cc7e9761f1d4d53fffa563c Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:15:23 -0400 Subject: [PATCH 05/11] Need description. --- _pkgdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 7eb4ab7..53d94e5 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -92,5 +92,5 @@ articles: external-articles: - name: dynamic_factor_models title: Dynamic Factor Models - A Very Short Introduction - desc: Provides a short theoretical overview of dynamics factor models as used in the economics literature + description: Provides a short theoretical overview of dynamics factor models as used in the economics literature href: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf From 78ba4ffe77c938ad2f66c220dd7f005c3f1532ef Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:15:36 -0400 Subject: [PATCH 06/11] Minors. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e752908..a9daaca 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The package is fully functional though, and you are very welcome to install it u - 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, and `"BM"` following Banbura & Modugno (2014) with missing data or mixed frequency. 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. +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 From eac40c5f865b982b2829eed5efbd7846fc201596 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:18:06 -0400 Subject: [PATCH 07/11] Further minors. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9daaca..b272572 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The default is `em.method = "auto"`, which chooses `"BM"` following Banbura & Mo ### 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 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 - support blocking of variables into different groups for which factors are to be estimated and evaluation of news releases. 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 also the [example](http://www.chadfulton.com/topics/statespace_large_dynamic_factor_models.html) by Chad Fulton. +*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*](). From 6da06048436c2246f0a795424c27f98dbc614369 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:26:10 -0400 Subject: [PATCH 08/11] Also add here. --- _pkgdown.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 53d94e5..0894c23 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -83,14 +83,18 @@ reference: - contents: - BM14_Models -articles: - - title: Introduction to dfms - desc: Provides a walk-through of all main features - contents: - - introduction - external-articles: - name: dynamic_factor_models title: Dynamic Factor Models - A Very Short Introduction description: Provides a short theoretical overview of dynamics factor models as used in the economics literature 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 + contents: + - introduction + - 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: + - dynamic_factor_models From 6865b89abedf569d391b21d8e9cb34993d29fef5 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:27:49 -0400 Subject: [PATCH 09/11] Minors. --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 1778a1c2324d0a0cbf3b8a946d0c6a82424368f4 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:37:26 -0400 Subject: [PATCH 10/11] Cut down. --- _pkgdown.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 0894c23..494ac47 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -85,8 +85,6 @@ reference: external-articles: - name: dynamic_factor_models - title: Dynamic Factor Models - A Very Short Introduction - description: Provides a short theoretical overview of dynamics factor models as used in the economics literature href: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf articles: From 849ef32216f4fc982a03fedf264df932830cc521 Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Mon, 17 Mar 2025 10:37:37 -0400 Subject: [PATCH 11/11] Add extra css. --- pkgdown/extra.css | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 pkgdown/extra.css 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; +}