These codes come without technical support of any kind. The code is free to use, provided that the paper is cited properly.
Codes based on M. Marcellino & M. Pfarrhofer (2025): "Nonparametric Mixed Frequency Monitoring Macro-at-Risk" Economics Letters 255 112498, using state space MF-VARs estimated with precision sampling (including MF-BART). See also mf-bavart for related work.
Estimation is integrated with the alfred R-package to access real-time data from alfred.stlouisfed.org for the United States.
setup_mfvaris the main estimation file which downloads and transforms data (requires user input)est_mfvarestimates the model and produces outputs (is sourced automatically fromsetup_mfvar)utilscontains several helper functions (is sourced automatically fromest_mfvar)
- Data settings are described in the file
run_meanrefers to the conditional mean estimation and approximation, choose from:bart-hsestimates a BART model and uses the shrinkage-based linear approximationbart-projestimates a BART model and uses the projection-based approximationlinestimates a linear BVAR model with horseshoe prior
outlierrefers to whether a homoskedastic (whenFALSE) or outlier (whenTRUE) specification is estimated
Model outputs (MCMC draws for the data) are saved in the directory results and associated charts for variables defined in output_var are collected in the directory plots.