Learn R Programming

fableCount (version 0.1.0)

forecast.INGARCH: Forecast a model from the fable package

Description

Produces forecasts from a trained model.

Usage

# S3 method for INGARCH
forecast(object, new_data, ...)

Value

A list of forecasts.

Arguments

object

A model for which forecasts are required.

new_data

Tsibble, it has to contains the time points and exogenous regressors to produce forecasts for.

...

Other arguments passed to methods

Details

Predict future observations based on a fitted GLM-type model for time series of counts. For 1 step ahead, it returns parametric forecast, based on the 'distr' param especified distribution, for multiples steps forecast, the distribution is not know analytically, so it uses a parametric bootstrap

Examples

Run this code
 # 1 step ahead parametric forecast
tsibbledata::aus_production |>
  fabletools::model(manual_ing = INGARCH(Beer ~ pq(1,1) + PQ(1,1))) |>
  dplyr::select(manual_ing) |>
  fabletools::forecast(h = 1)

# Multiples steap ahead parametric bootstrap forecast
tsibbledata::aus_production |>
  fabletools::model(manual_ing = INGARCH(Beer ~ pq(1,1) + PQ(1,1))) |>
  dplyr::select(manual_ing) |>
  fabletools::forecast(h = 4)

Run the code above in your browser using DataLab