This function implements the Theta method using a Generalized Linear Model (GLM)

glmthetaf(
  y,
  h = ifelse(frequency(y) > 1, 2 * frequency(y), 10),
  level = 95,
  fit_func = stats::glm,
  fan = FALSE,
  x = y,
  type_pi = c("conformal-split", "gaussian"),
  attention = TRUE,
  method = c("adj", "base"),
  ...
)

Arguments

y

The time series data

h

The number of periods to forecast

level

The confidence level for the forecast intervals

fit_func

The function to use for fitting the GLM

fan

Logical flag for fan plot

x

The time series data

attention

Logical flag for using attention mechanism

...

Additional arguments to pass to the fit_func

Value

A forecast object