Skip to content

How does one forecast next point in time series using GAS package in R as well as retrieving fited values? #7

@GoranDiz

Description

@GoranDiz

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 your 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions