I am using the GAS (Generalised Auto regressive score) package in R in order to forecast a chosen time series. I have read package documentation as well as author published paper and I struggle with understanding how they forecast the next time step.
Here is some code:
gas_model <- UniGASSpec(Dist = "std", ScalingType = "Identity", GASPar = list(location = TRUE, scale = TRUE, shape = FALSE)) gas_fit <- UniGASFit(gas_model, time_series) gas_forecast <- UniGASFor(gas_fit, H = 1, ReturnDraws = T) prediction_point <- mean(gas_forecast@Draws)
So how does this work exactly? The gas_forecast function forecasts parameters of a predictive distribution of the next time step? Then we draw samples from that distribution and take mean to estimate expected value of predicted distribution? Is this the next forecasted value in the time series, i.e. prediction of time point t+1 (given H = 1)? Have does one simply forecast next point in time series using this package? The natural follow up question is: How does one retrieve fitted values?