thetaBenchmark: thetaBenchmark

Description Usage Arguments Value Examples

View source: R/benchmarks.R

Description

Auxiliary function for the Theta forecasting method. From https://github.com/M4Competition/M4-methods/blob/master/Benchmarks%20and%20Evaluation.R

Usage

1
thetaBenchmark(input, h)

Arguments

input
  • Input time series (numeric vector)

h
  • Forecasting horizon (numeric scalar)

Value

h-step forecast for the Theta method (numeric vector - length h)

Examples

1
2
3
4
5
x <- AirPassengers
splitting_point <- round(2*length(x)/3)
x_train <- x[1:splitting_point]
h <- 5
x_hat <- thetaBenchmark(x_train,h)

jdestefani/MM4Benchmark documentation built on Dec. 20, 2021, 10:05 p.m.