fitforecast | R Documentation |
Fit and forecast for benchmarking purposes
fitforecast(
y,
h = NULL,
pct_train = 0.9,
pct_calibration = 0.5,
method = c("thetaf", "arima", "ets", "te", "tbats", "tslm", "dynrmf", "ridge2f",
"naive", "snaive"),
level = 95,
B = 1000L,
seed = 17223L,
graph = TRUE,
conformalize = FALSE,
type_calibration = c("splitconformal", "cv1", "loocv"),
gap = 3L,
agg = c("mean", "median"),
vol = c("constant", "garch"),
type_sim = c("kde", "surrogate", "bootstrap"),
...
)
y |
A univariate time series of class |
h |
Forecasting horizon (default is |
pct_train |
Percentage of data in the training set, when |
pct_calibration |
Percentage of data in the calibration set for conformal prediction |
method |
For now "thetaf" (default), "arima", "ets", "tbats", "tslm", "dynrmf" (from ahead), "ridge2f" (from ahead), "naive", "snaive" |
level |
Confidence level for prediction intervals in %, default is 95 |
B |
Number of bootstrap replications or number of simulations (yes, 'B' is unfortunate) |
seed |
Reproducibility seed |
graph |
Plot or not? |
conformalize |
Calibrate or not? |
type_calibration |
"splitconformal" (default conformal method), "cv1" (do not use), "loocv" (do not use) |
gap |
length of training set for loocv conformal (do not use) |
agg |
"mean" or "median" (aggregation method) for |
vol |
"constant" or "garch" (type of volatility modeling for calibrated residuals) |
type_sim |
"kde", "surrogate", "bootstrap" (type of simulation for calibrated residuals) |
... |
additional parameters |
an object of class 'forecast' with additional information
par(mfrow=c(2, 2))
obj1 <- ahead::fitforecast(AirPassengers)
obj2 <- ahead::fitforecast(AirPassengers, conformalize = TRUE)
plot(AirPassengers)
plot(obj1)
obj2$plot()
obj2$plot("simulations")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.