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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.