glmthetaf.RdThis function implements the Theta method using a Generalized Linear Model (GLM)
glmthetaf(
y,
h = ifelse(frequency(y) > 1, 2 * frequency(y), 10),
level = 95L,
fit_func = stats::glm,
predict_func = predict,
fan = FALSE,
x = y,
type_pi = c("gaussian", "conformal-split", "conformal-surrogate",
"conformal-bootstrap", "conformal-block-bootstrap", "conformal-kde",
"conformal-fitdistr"),
attention = TRUE,
attention_type = c("dot_product", "scaled_dot_product", "cosine", "exponential",
"gaussian", "linear", "value_based", "hybrid", "parametric"),
attention_method = c("heuristic", "historical"),
scale_ctxt = 1,
historical_lookback = 50L,
max_adjustment = 0.5,
B = 250L,
nsim = B,
...
)The time series data
The number of periods to forecast
The confidence level for the forecast intervals
The function to use for fitting the GLM (and other models)
The function to use for predict the other models (not GLMs)
Logical flag for fan plot
The time series data
Logical flag for using attention mechanism
The type of attention mechanism to use
The method for computing attention-based adjustments: "heuristic" (original) or "historical" (new evidence-based)
Scaling coefficient for context vector
Number of periods to consider for historical matching
Maximum allowed adjustment percentage (0-1)
Number of bootstrap replications or number of simulations (alias: nsim)
Alias for B
Additional arguments to pass to the fit_func
A forecast object