conformalize: Conformalize a forecasting function

View source: R/conformalize.R

conformalizeR Documentation

Conformalize a forecasting function

Description

This function allows to conformalize any forecasting function.

Usage

conformalize(
  FUN,
  y,
  h,
  level = 95,
  method = c("block-bootstrap", "surrogate", "kde", "bootstrap"),
  nsim = 100L,
  block_size = 5,
  seed = 123L,
  ...
)

Arguments

FUN

A forecasting function.

y

A time series (ts object or vector).

h

Forecasting horizon.

level

Confidence level.

method

Method to be used for conformalization (simulation of calibrated residuals).

nsim

Number of simulations.

block_size

Block size for block-bootstrap.

seed

Seed for reproducibility.

...

Additional arguments to be passed to the forecasting function.

Value

An object of class forecast.

Examples


y <- fdeaths
h <- 25L
obj <- conformalize(FUN=forecast::ets, y, h); plot(obj)
obj <- conformalize(FUN=HoltWinters, y=y, h=h, seasonal = "mult"); plot(obj)


Techtonique/ahead documentation built on Nov. 24, 2024, 10:33 a.m.