Package: foresightr 0.1.1

André Leite

foresightr: Forecasts Chosen by What Would Have Worked

Time series forecasting that replays the past before trusting a model: a rolling-origin backtest, Tashman (2000) <doi:10.1016/S0169-2070(00)00065-0>, refits every candidate at each origin, the choice is made by out-of-sample error, and prediction intervals are quantiles of the errors actually observed, for each horizon and for totals of the next periods. Models include seasonal ARIMA by exact maximum likelihood with automatic orders, Hyndman and Khandakar (2008) <doi:10.18637/jss.v027.i03>; exponential smoothing in state space form, Hyndman, Koehler, Snyder and Grose (2002) <doi:10.1016/S0169-2070(01)00110-8>; the Theta method, Assimakopoulos and Nikolopoulos (2000) <doi:10.1016/S0169-2070(00)00066-2>; a trend with changepoints and events in the manner of Taylor and Letham (2018) <doi:10.1080/00031305.2017.1380080>; TBATS, De Livera, Hyndman and Snyder (2011) <doi:10.1198/jasa.2011.tm09771>; seasonal-trend decompositions by LOESS for one or several seasonal periods, Bandara, Hyndman and Bergmeir (2021) <doi:10.48550/arXiv.2107.13462>; the method of Croston (1972) <doi:10.1057/jors.1972.50> for intermittent demand; and ensembles. The computations are done by the 'Rust' crate 'foresight', bundled with the package.

Authors:André Leite [aut, cre], Marcos Wasiliew [aut], Hugo Vasconcelos [aut], Carlos Amorim [aut], Diogo Bezerra [aut], Júlia Nascimento Barreto [aut], The authors of the dependency Rust crates [ctb]

foresightr_0.1.1.tar.gz
foresightr_0.1.1.zip(r-4.7-x86_64)foresightr_0.1.1.zip(r-4.7-arm64)foresightr_0.1.1.zip(r-4.6-x86_64)foresightr_0.1.1.zip(r-4.6-arm64)foresightr_0.1.1.zip(r-4.5-x86_64)
foresightr_0.1.1.tgz(r-4.6-x86_64)foresightr_0.1.1.tgz(r-4.6-arm64)foresightr_0.1.1.tgz(r-4.5-x86_64)foresightr_0.1.1.tgz(r-4.5-arm64)
foresightr_0.1.1.tar.gz(r-4.7-arm64)foresightr_0.1.1.tar.gz(r-4.7-x86_64)foresightr_0.1.1.tar.gz(r-4.6-arm64)foresightr_0.1.1.tar.gz(r-4.6-x86_64)
foresightr_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
foresightr/json (API)

# Install 'foresightr' in R:
install.packages('foresightr', repos = c('https://strategicprojects.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/strategicprojects/foresightr/issues

Pkgdown/docs site:https://strategicprojects.github.io

On CRAN:

Conda:

rustcargo

4.70 score 2 stars 51 exports 22 dependencies

Last updated from:f4d94e4cdb. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK150
linux-devel-x86_64OK162
source / vignettesOK277
linux-release-arm64OK131
linux-release-x86_64OK189
macos-release-arm64OK136
macos-release-x86_64OK471
macos-oldrel-arm64OK157
macos-oldrel-x86_64OK603
windows-devel-arm64OK417
windows-devel-x86_64OK185
windows-release-arm64OK264
windows-release-x86_64OK144
windows-oldrel-x86_64OK179
wasm-releaseOK166

Exports:autocorrelationsautoplotbacktestbox_coxcandidates_defaultcandidates_thoroughclean_seriesdecompose_mstldecompose_stlfill_gapsfind_outliersfit_modelforecast_modelforesight_threadsfourier_termsguerrero_lambdainv_box_coxkpss_statisticmaemapemasemodel_airlinemodel_arimamodel_auto_arimamodel_auto_etsmodel_box_coxmodel_crostonmodel_decomposedmodel_descriptionmodel_driftmodel_ensemblemodel_etsmodel_holt_wintersmodel_logmodel_log_linearmodel_meanmodel_naivemodel_namemodel_prophetmodel_seasonal_naivemodel_tbatsmodel_thetan_differencesn_seasonal_differencespct_biasrmseseasonal_dummiesseasonal_strengththeme_foresighttotal_forecastwith_name

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigR6RColorBrewerrlangS7scalestibbleutf8vctrsviridisLitewithr

Decomposition and cleaning
STL | Several seasonal periods | Gaps and outliers

Last update: 2026-09-30
Started: 2026-09-30

Regressors and events
Regression with ARIMA errors | Fourier terms | A deflated regression | Events and steps

Last update: 2026-09-30
Started: 2026-09-30

The backtest and its intervals
Replaying the past | The error by horizon | Intervals from the errors actually made | Totals | Looking at it

Last update: 2026-09-30
Started: 2026-09-30

Get started
The data | Choose a model by what would have worked | Totals | One model on its own | Your own candidates | Decomposition

Last update: 2026-09-30
Started: 2026-09-30

The models
Yardsticks | Theta and Holt-Winters | Exponential smoothing | ARIMA | Prophet-style trend | TBATS | Intermittent demand | Combining models | The ready sets

Last update: 2026-09-30
Started: 2026-09-30

Readme and manuals

Help Manual

Help pageTopics
Charts of a backtest or a decompositionautoplot.foresight_backtest autoplot.foresight_decomposition plot.foresight_backtest plot.foresight_decomposition
Choose a model by what would have workedbacktest
Ready sets of candidatescandidates_default candidates_thorough
Decompose a series by STL or MSTLdecompose_mstl decompose_stl
Gaps and outliersclean_series fill_gaps find_outliers
Fit a model and forecastfit_model forecast_model predict.foresight_fit
Threads used by backtests and ensemblesforesight_threads
External variables for a regression with ARIMA errorsfourier_terms seasonal_dummies
Tests and transformationsautocorrelations box_cox guerrero_lambda inv_box_cox kpss_statistic n_differences n_seasonal_differences seasonal_strength
Accuracy of forecastsmae mape mase pct_bias rmse
Seasonal ARIMAmodel_airline model_arima
ARIMA with automatic ordersmodel_auto_arima
A model on the log or Box-Cox scalemodel_box_cox model_log
Intermittent demandmodel_croston
Forecast the seasonally adjusted seriesmodel_decomposed
Several models combinedmodel_ensemble
Exponential smoothingmodel_auto_ets model_ets
Holt-Wintersmodel_holt_winters
Log-linear regressionmodel_log_linear
Benchmark modelsmodel_drift model_mean model_naive model_seasonal_naive
Name and description of a modelmodel_description model_name
Prophet-style trend with changepoints and eventsmodel_prophet
TBATSmodel_tbats
Theta methodmodel_theta
The theme of the package's chartstheme_foresight
Forecast of a totaltotal_forecast
Rename a modelwith_name