Skip to content

Commit a5a67c4

Browse files
authored
Merge pull request #63 from SebKrantz/development
Development
2 parents b9ee908 + 849ef32 commit a5a67c4

File tree

4 files changed

+74
-8
lines changed

4 files changed

+74
-8
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# dfms 0.3.0
22

3-
* 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).
3+
* 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).
44

55
# dfms 0.2.2
66

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ The package is fully functional though, and you are very welcome to install it u
2121

2222
- 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. <doi:10.1016/j.jeconom.2011.02.012>
2323

24-
- 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. <doi:10.1162/REST_a_00225>
24+
- 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. <doi:10.1162/REST_a_00225>
2525

2626
- 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. <doi:10.1002/jae.2306>
2727

28-
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.
29-
30-
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.
28+
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.
3129

3230
### Comparison with Other R Packages
3331

34-
*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*](<https://CRAN.R-project.org/package=MARSS>) that can be used to fit dynamic factor models, or packages like [*nowcasting*](<https://github.com/nmecsys/nowcasting>) and [*nowcastDFM*](<https://github.com/dhopp1/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. <!-- *dfms* with `em.method = "BM"` does allow mixed-frequency data but performs no specific adjustments for the frequency of the data^[All series are weighted equally, and the prevalence of missing values in lower-frequency series downweights them. To remedy this lower frequency series could be included multiple times in the dataset e.g. include a quarterly series 3 times in a monthly dataset.]. *dfms* currently also does not allow residual autocorrelation in the estimation (i.e. it cannot estimate *approximate factor models*), but the addition of this feature is planned. -->
35-
The package is currently not intended to fit more general forms of the state space model such as provided by [*MARSS*](<https://CRAN.R-project.org/package=MARSS>).
32+
*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*](<https://CRAN.R-project.org/package=MARSS>), or [*nowcasting*](<https://github.com/nmecsys/nowcasting>) and [*nowcastDFM*](<https://github.com/dhopp1/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. <!-- , and EM adjustments for variables at different frequencies. *dfms* with `em.method = "BM"` does allow mixed-frequency data but performs no specific adjustments for the frequency of the data^[All series are weighted equally, and the prevalence of missing values in lower-frequency series downweights them. To remedy this lower frequency series could be included multiple times in the dataset e.g. include a quarterly series 3 times in a monthly dataset.]. *dfms* currently also does not allow residual autocorrelation in the estimation (i.e. it cannot estimate *approximate factor models*), but the addition of this feature is planned. -->
33+
The *dfms* package is not intended to fit more general forms of the state space model such as provided by [*MARSS*](<https://CRAN.R-project.org/package=MARSS>).
3634

3735
<!-- or advanced specifications of Dynamic Factor Models tailored to mixed-frequency nowcasting applications such as [*nowcasting*](<https://github.com/nmecsys/nowcasting>) and [*nowcastDFM*](<https://github.com/dhopp1/nowcastDFM>). Such software could however benefit from the functions and methods provided in *dfms*, most notably *dfms* exports stationary Kalman Filters and Smoothers used in nowcasting applications, that are noticeably faster than the more general implementations provided by the [*FKF*](<https://CRAN.R-project.org/package=FKF>) package. -->
3836

_pkgdown.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ reference:
8383
- contents:
8484
- BM14_Models
8585

86+
external-articles:
87+
- name: dynamic_factor_models
88+
href: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf
89+
8690
articles:
8791
- title: Introduction to dfms
8892
desc: Provides a walk-through of all main features
@@ -91,4 +95,4 @@ articles:
9195
- title: Dynamic Factor Models - A Very Short Introduction
9296
desc: Provides a short theoretical overview of dynamics factor models as used in the economics literature
9397
contents:
94-
- url: https://raw.githubusercontent.com/SebKrantz/dfms/main/vignettes/dynamic_factor_models_paper.pdf
98+
- dynamic_factor_models

pkgdown/extra.css

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.navbar-nav .nav-item > .nav-link {
2+
margin-right: 10px;
3+
}
4+
.template-home img.logo {
5+
width: 150px;
6+
}
7+
img.logo {
8+
width: 150px;
9+
margin-left: 30px;
10+
}
11+
.h1, .h2, .h3, h1, h2, h3 {
12+
margin-top: 35px;
13+
margin-bottom: 10px;
14+
}
15+
body {
16+
font-size: 100%;
17+
}
18+
/*
19+
p {
20+
font-size: 0.875em; 14px/16=0.875em
21+
}
22+
*/
23+
.fa-bluesky {
24+
font-family: "Font Awesome 6 Brands";
25+
font-weight: 400;
26+
}
27+
span.fa.fa-bluesky {
28+
font-size: 15.5px;
29+
}
30+
@media screen and (min-width: 1000px) {
31+
span.fa.fa-bluesky {
32+
padding-left: 12px;
33+
}
34+
}
35+
span.fa.fa-twitter {
36+
font-size: 18px;
37+
}
38+
span.fa.fa-github {
39+
font-size: 18px;
40+
margin-right: 100px;
41+
}
42+
a {
43+
color: #0089b3; /* #007da3 */
44+
}
45+
a:hover {
46+
color: #005873; /* #027ca1; */
47+
}
48+
pre {
49+
color: #cccccc;
50+
}
51+
small.nav-text.text-muted {
52+
color: #999a9c !important; /* #8e8c84 #999a9c; -> Same as navbar */
53+
}
54+
55+
.form-control,
56+
.form-control::placeholder {
57+
color: #999a9c !important;
58+
}
59+
60+
[data-bs-theme="dark"] {
61+
--bs-body-color: #cccccc !important;
62+
--bs-secondary-color: #cccccc !important;
63+
--bs-tertiary-color: #999a9c !important;
64+
}

0 commit comments

Comments
 (0)