Skip to content

johannestang/ladfactor-rep

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 

Replication material for: 'Factor-based forecasting in the presence of outliers: Are factors better selected and estimated by the median than the mean?'

Johannes Tang Kristensen.

Link to the paper


This repository contains the material necessary to replicate the empirical application in: 'Factor-based forecasting in the presence of outliers: Are factors better selected and estimated by the median than the mean?' The code is a partial re-write of the code originally released with the paper. Since the original version of the code changes in the KFAS package has caused the code for the Kalman-filter-based benchmark model included in the paper to break. I have, therefore, not included that model here. However, the original code for the model can be found at the link above.

Required packages

The forecastexp package is required for the estimation and the macrods package provides the data functions:

library('devtools')
install_github('johannestang/forecastexp')
install_github('johannestang/macrods')

In addition the following packages should be installed : pryr, and xtable, both available from CRAN.

Note: Total runtime is approximately 5 hours when using a 20 core machine (2 E5-2680 v2 CPUs @ 2.8 GHz).

/app

  • forecastapp.R estimates the models and produces all output.
  • simple.R function for forecasting using simple means/medians.
  • FRED.rda the dataset.

About

Replication material for: 'Factor-based forecasting in the presence of outliers: Are factors better selected and estimated by the median than the mean?'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published