Dynamic Model Averaging and Dynamic Model Selection for Continuous Outcomes

Allows to estimate dynamic model averaging, dynamic model selection and median probability model. The original methods are implemented, as well as, selected further modifications of these methods. In particular the user might choose between recursive moment estimation and exponentially moving average for variance updating. Inclusion probabilities might be modified in a way using 'Google Trends'. The code is written in a way which minimises the computational burden (which is quite an obstacle for dynamic model averaging if many variables are used). For example, this package allows for parallel computations and Occam's window approach. The package is designed in a way that is hoped to be especially useful in economics and finance. Main reference: Raftery, A.E., Karny, M., Ettler, P. (2010) .


fDMA ver. 2.2.4 (Release date: 2018-09-29)


  • Changes to follow STRICT_R_HEADERS via Rcpp made.
  • Small corrections in computations of coefficients in tvp() and tvpcpp() made.
  • Forecast computation of DMA-E in Dynamic Occam's Window method corrected.
  • Adding a small constant to posterior model probabilities fixed.
  • Setting initial values of variances fixed.
  • Google probabilities computations fixed and allowed to cover only selected period.
  • Small changes in fDMA() to increase the speed of computations made.
  • Option to specify the number of cores used in parallel version of fDMA() added.
  • Alternative averaging schemes added to fDMA().
  • forced.models, forbidden.models and forced.variables arguments added to fDMA().
  • reduce.size() added.
  • coef(), fitted(), predict(), residuals() and rvi() for "dma" object added.
  • Non-interactive option to plot methods added.
  • Small changes to improve the performance added.

fDMA ver. (Release date: 2018-06-29)


  • Small correction in NAMESPACE

fDMA ver. 2.2.3 (Release date: 2018-01-28)


  • Vignette added.
  • Possible zero posterior model probabilities corrected in fDMA() and altf4().

fDMA ver. 2.2.2 (Release date: 2018-01-21)


  • Exponentially weighted moving average variance updating corrected.

fDMA ver. 2.2.1 (Release date: 2017-11-24)


  • Warnings of replacing previous imports between Rcpp and utils corrected.

fDMA ver. 2.2 (Release date: 2017-11-15)


  • Crucial part, i.e., tvp(), rewritten in C++ to increase the speed of computations.

fDMA ver. 2.1 (Release date: 2017-10-12)


  • Dynamic Occam's Window extended to work even if not all possible models with a constant are used.
  • Limit of number of models used by Dynamic Occam's Window added.
  • Option to print during computations with Dynamic Occam's Window the number of currently computed recursive DMA round and the number of models used in this round added.
  • grid.DMA() fixed to work with multiple lambda values.
  • Google probabilities computations fixed.
  • NA coefficients in altf() and altf2() fixed.
  • Problem with constant x fixed in tvp().
  • Plotting posterior model probabilities in plot.dma() fixed.
  • Akaike Information Criterion with a correction for finite sample sizes (AICc) added to rec.reg(), roll.reg(), altf2() and altf3().
  • Google probabilities added to altf2().
  • altf3() and altf4() fixed to work with models with constant only.
  • Relative variable importance and expected number of variables added to altf2() and plot.altf2().
  • More outcomes summary added to summary.altf2().
  • Expected window size added to altf3(), altf4(), plot.altf3() and plot.altf4().
  • descstat() for basic descriptive statistics added.
  • standardize() added to rescale variables to have mean 0 and standard deviation 1.
  • onevar() added to quickly create a matrix indicating one-variable models.
  • archtest() outcomes changed to "htest" class.

fDMA ver. 2.0 (Release date: 2017-08-31)


  • Engle's ARCH test added.
  • Forecast accuracy tests added.
  • A few stationarity tests added.
  • grid.roll.reg() (as "grid.roll.reg" object) for roll.reg() with various windows added.
  • rec.reg() for recursive regression added.
  • roll.reg() outcomes as an object of "reg" class.
  • Akaike Information Criterion, Bayesian Information Criterion and Mean Squared Error added to roll.reg() outcomes.
  • Regression coefficients and p-values for t-test for regression coefficients added to roll.reg() outcomes.
  • roll.reg() fixed to work also with constant only.
  • grid.tvp() (as "grid.tvp" object) for tvp() with various lambdas added.
  • Predicitive density and estimated regression coefficients from all periods added to tvp() outcomes.
  • Exponentially weighted moving average variance updating added to tvp().
  • tvp() changed in order to work inside fDMA(), outcomes as "tvp" class.
  • altf4() for averaging over different windows sizes for a time-varying parameters rolling regression added.
  • altf3() for averaging over different windows sizes for a rolling regression added.
  • alft2() for model averaging alternative forecast added.
  • More outcomes added to altf().
  • Direct comparision of a "dma" class object with alternative forecast added to altf().
  • Option to choose which alternative forecast will be computed by altf() added.
  • For forecast quality measure Mean Squared Error replaced by Root Mean Squared Error.
  • Number of models used in Dynamic Occam's Window method and posterior model probabilities added to plot().
  • "inc" display in summary() of fDMA() outcomes fixed.
  • Predicitive densities from the last period added to fDMA() outcomes.
  • fDMA() upgraded to work better with parallel computations on Windows machines.
  • Setting the initial values of variance for the models equations in fDMA() fixed.
  • Estimation of models without constant fixed.

fDMA ver. 1.1 (Release date: 2017-07-11)


  • Plot's menu fixed.

fDMA ver. 1.0 (Release date: 2017-07-09)

  • Initial release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.2.6 by Krzysztof Drachal, 2 years ago


Browse source code at https://github.com/cran/fDMA

Authors: Krzysztof Drachal [aut, cre] (Faculty of Economic Sciences , University of Warsaw , Poland)

Documentation:   PDF Manual  

GPL-3 license

Imports doParallel, forecast, foreach, gplots, graphics, grDevices, iterators, itertools, parallel, psych, png, Rcpp, stats, tseries, utils, xts, zoo

Suggests R.rsp

Linking to Rcpp, RcppArmadillo

See at CRAN