Description Usage Arguments Value Author(s) References Examples
Forecast with univariate GAS models. The one-step ahead prediction of the conditional density is available in closed form. The multi-step ahead prediction is performed by simulation as detailed in Blasques et al. (2016).
1 2 |
uGASFit |
An object of the class uGASFit created using the function UniGASFit. |
H |
|
Roll |
|
out |
|
B |
|
Bands |
|
ReturnDraws |
|
An object of the class uGASFor.
Leopoldo Catania
Blasques F, Koopman SJ, Lasak K, and Lucas, A (2016). "In-sample Confidence Bands and Out-of-Sample Forecast Bands for Time-Varying Parameters in Observation-Driven Models." International Journal of Forecasting, 32(3), 875-887. doi: 10.1016/j.ijforecast.2016.04.002.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Specify an univariate GAS model with Student-t
# conditional distribution and time-varying location, scale and shape parameter
# Inflation Forecast
set.seed(123)
data("cpichg")
GASSpec = UniGASSpec(Dist = "std", ScalingType = "Identity",
GASPar = list(location = TRUE, scale = TRUE, shape = FALSE))
# Perform H-step ahead forecast with confidence bands
Fit = UniGASFit(GASSpec, cpichg)
Forecast = UniGASFor(Fit, H = 12)
Forecast
# Perform 1-Step ahead rolling forecast
InsampleData = cpichg[1:250]
OutSampleData = cpichg[251:276]
Fit = UniGASFit(GASSpec, InsampleData)
Forecast = UniGASFor(Fit, Roll = TRUE, out = OutSampleData)
Forecast
|
Attaching package: 'GAS'
The following object is masked from 'package:stats':
residuals
------------------------------------------
- Univariate GAS Forecast -
------------------------------------------
Model Specification
Conditional distribution: std
Score scaling type: Identity
Horizon: 12
Rolling forecast: FALSE
------------------------------------------
Parameters forecast:
location scale shape
T+1 0.10130293 0.1523661 6.526135
T+2 0.09499435 0.1736636 6.526135
T+3 0.09381908 0.2151041 6.526135
T+4 0.09255762 0.2576731 6.526135
T+5 0.08746747 0.3019555 6.526135
....................
location scale shape
T+8 0.08345437 0.4219074 6.526135
T+9 0.07792038 0.4574555 6.526135
T+10 0.07382608 0.4899598 6.526135
T+11 0.07558255 0.5198954 6.526135
T+12 0.07507434 0.5465449 6.526135
------------------------------------------
- Univariate GAS Forecast -
------------------------------------------
Model Specification
Conditional distribution: std
Score scaling type: Identity
Horizon: 26
Rolling forecast: TRUE
------------------------------------------
Parameters forecast:
location scale shape CPIAUCSL
2009-09-30 22:00:00 0.8710313 0.4014086 6.374371 0.77988
2009-12-31 23:00:00 0.8407661 0.2959634 6.374371 0.15838
2010-03-31 22:00:00 0.6666247 0.3056644 6.374371 -0.03543
2010-06-30 22:00:00 0.5042359 0.3163431 6.374371 0.29272
2010-09-30 22:00:00 0.4572833 0.2470877 6.374371 0.80662
....................
location scale shape CPIAUCSL
2014-12-31 23:00:00 0.04129509 0.1138605 6.374371 -0.72630
2015-03-31 22:00:00 -0.25352898 0.1942819 6.374371 0.60266
2015-06-30 22:00:00 0.05156038 0.2760946 6.374371 0.34143
2015-09-30 22:00:00 0.18005571 0.2274846 6.374371 0.19128
2015-12-31 23:00:00 0.21543112 0.1789733 6.374371 -0.07815
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.