Skip to content

Commit 07dc1c7

Browse files
authored
Merge pull request #39 from SebKrantz/development
Adding CRAN badges + minor improvements in description and documentat…
2 parents 6865424 + 6d51c05 commit 07dc1c7

File tree

9 files changed

+49
-13
lines changed

9 files changed

+49
-13
lines changed

DESCRIPTION

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ Title: Dynamic Factor Models
44
Authors@R: c(person("Sebastian", "Krantz", role = c("aut", "cre"), email = "[email protected]"),
55
person("Rytis", "Bagdziunas", role = "aut"))
66
Description: Efficient estimation of Dynamic Factor Models using the Expectation Maximization (EM) algorithm
7-
or Two-Step (2S) estimation, supporting datasets with missing data. The implementation follows advances in the
8-
econometric literature: estimation can be done either by running the Kalman Filter and Smoother once with initial
9-
values from PCA - 2S estimation following Doz, Giannone and Reichlin (2011) <doi:10.1016/j.jeconom.2011.02.012> -
10-
or via iterated Kalman Filtering and Smoothing until EM convergence - following Doz, Giannone and Reichlin (2012)
7+
or Two-Step (2S) estimation, supporting datasets with missing data. The estimation options follow advances in the
8+
econometric literature: either running the Kalman Filter and Smoother once with initial values from PCA -
9+
2S estimation as in Doz, Giannone and Reichlin (2011) <doi:10.1016/j.jeconom.2011.02.012> - or via iterated
10+
Kalman Filtering and Smoothing until EM convergence - following Doz, Giannone and Reichlin (2012)
1111
<doi:10.1162/REST_a_00225> - or using the adapted EM algorithm of Banbura and Modugno (2014) <doi:10.1002/jae.2306>,
1212
allowing arbitrary patterns of missing data. The implementation makes heavy use of the 'Armadillo' 'C++' library and
1313
the 'collapse' package, providing for particularly speedy estimation. A comprehensive set of methods supports
1414
interpretation and visualization of the model as well as forecasting. Information criteria to choose the number
1515
of factors are also provided - following Bai and Ng (2002) <doi:10.1111/1468-0262.00273>.
1616
URL: https://sebkrantz.github.io/dfms/
1717
BugReports: https://github.com/SebKrantz/dfms/issues
18-
Depends: R (>= 3.0.0)
18+
Depends: R (>= 3.3.0)
1919
Imports: Rcpp (>= 1.0.1), collapse (>= 1.8.0)
2020
LinkingTo: Rcpp, RcppArmadillo
2121
Suggests: xts, vars, magrittr, testthat (>= 3.0.0), knitr, rmarkdown, covr

R/methods.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ plot.dfm_forecast <- function(x,
569569
F_fcst <- x$F_fcst[, factors, drop = FALSE]
570570
if(scale.factors) {
571571
fcstat <- qsu(Fa)
572-
F_fcst <- setop(TRA.matrix(F_fcst, fcstat[, "Mean"], "-"), "/", fcstat[, "SD"], rowwise = TRUE)
572+
F_fcst <- setop(TRA.matrix(F_fcst, fcstat[, "Mean"], "-"), "/", fcstat[, "SD"], rowwise = TRUE) # Unscale ??
573573
Fa <- fscale(Fa)
574574
}
575575
if(nyliml) Fr <- frange(Fa)
@@ -706,6 +706,9 @@ as.data.frame.dfm_forecast <- function(x, ...,
706706
#' plot(ics)
707707
#' screeplot(ics)
708708
#'
709+
#' # Optimal lag-order with 6 factors chosen
710+
#' VARselect(ics$F_pca[, 1:6])
711+
#'
709712
#' @references
710713
#' Bai, J., Ng, S. (2002). Determining the Number of Factors in Approximate Factor Models. \emph{Econometrica, 70}(1), 191-221. \doi{10.1111/1468-0262.00273}
711714
#'

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# **dfms**: Dynamic Factor Models for R
22
<!-- badges: start -->
33
[![R-CMD-check](https://github.com/SebKrantz/dfms/workflows/R-CMD-check/badge.svg)](https://github.com/SebKrantz/dfms/actions)
4+
[![CRAN status](https://www.r-pkg.org/badges/version/dfms)](https://cran.r-project.org/package=dfms)
5+
[![cran checks](https://cranchecks.info/badges/worst/dfms)](https://cran.r-project.org/web/checks/check_results_dfms.html)
6+
![downloads per month](http://cranlogs.r-pkg.org/badges/dfms?color=blue)
7+
![downloads](http://cranlogs.r-pkg.org/badges/grand-total/dfms?color=blue)
48
[![Codecov test coverage](https://codecov.io/gh/SebKrantz/dfms/branch/main/graph/badge.svg)](https://app.codecov.io/gh/SebKrantz/dfms?branch=main)
9+
[![minimal R version](https://img.shields.io/badge/R%3E%3D-3.3.0-6666ff.svg)](https://cran.r-project.org/)
10+
[![status](https://tinyverse.netlify.com/badge/dfms)](https://CRAN.R-project.org/package=dfms)
511
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
612
<!-- badges: end -->
713

docs/articles/introduction.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/news/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ pkgdown: 2.0.6
33
pkgdown_sha: ~
44
articles:
55
introduction: introduction.html
6-
last_built: 2022-10-10T22:13Z
6+
last_built: 2022-10-12T14:48Z
77

docs/reference/ICr.html

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ICr.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)