% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reconciliation.R
\name{forecast.mdl_icomb_lst}
\alias{forecast.mdl_icomb_lst}
\title{Produce coherent forecasts using the information combination method}
\usage{
\method{forecast}{mdl_icomb_lst}(
  object,
  new_data = NULL,
  h = NULL,
  point_forecast = list(.mean = mean),
  ...
)
}
\arguments{
\item{object}{The time series models used to produce the forecasts.}

\item{new_data}{A \code{tsibble} containing future information used to forecast.}

\item{h}{The forecast horizon (can be used instead of \code{new_data} for regular
time series with no exogenous regressors).}

\item{point_forecast}{The point forecast measure(s) which should be returned
in the resulting fable. Specify as a named list of functions which accept
a distribution and return a vector.}

\item{...}{Additional arguments for forecast model methods.}
}
\value{
A fable containing the following columns:
\itemize{
\item \code{.model}: The name of the model used to obtain the forecast. Taken from
the column names of models in the provided mable.
\item The forecast distribution. The name of this column will be the same as the
dependent variable in the model(s). If multiple dependent variables exist,
it will be named \code{.distribution}.
\item Point forecasts computed from the distribution using the functions in the
\code{point_forecast} argument. If \code{bootstrap = TRUE}, point forecasts are generated using bootstrapped sample paths.
}
}
\description{
The forecast function allows you to generate coherent future predictions for hierarchical or grouped time series based on fitted models.
}
\details{
The forecasts returned contain both point forecasts and their distribution.
A specific forecast interval can be extracted from the distribution using the
\code{\link[distributional:hilo]{distributional::hilo()}} function. These intervals are stored in a single column using the \code{hilo} class, to
extract the numerical upper and lower bounds you can use \code{\link[fabletools:unpack_hilo]{fabletools::unpack_hilo()}}.
}
\examples{

library(fable)
library(fabletools)
library(tsibble)
library(distributional)

tourism_hts <- tourism |>
  aggregate_key(State,
                Trips = sum(Trips))

fit <- tourism_hts |>
  model(base = ETS(Trips)) |>
  reconcile(ols = min_trace(base, method = "ols"),
            icomb = icomb(base, train_size = 75))

\donttest{
fit |>
  forecast(bootstrap = TRUE, times = 1000) |>
  hilo(level = c(80, 95))
}

}
