Package: ErrorTracer 1.4.2

ErrorTracer: Bayesian Error Propagation and Forecast Uncertainty Decomposition

Provides a full pipeline from regularized or standard regression models (elastic net, linear models, generalized linear models, random forests) to informed Bayesian priors, structured forecast uncertainty decomposition (parameter / environmental / residual, plus a temporal component when the model carries an autocorrelation term), and forecast shelf life analysis (the quantification of when a forecast becomes uninformative). Designed for ecological and genomic forecasting with climate or environmental covariates. Methods build on Bürkner (2017) <doi:10.18637/jss.v080.i01> for Bayesian regression via 'Stan', Friedman, Hastie, and Tibshirani (2010) <doi:10.18637/jss.v033.i01> for elastic net regularization, Wright and Ziegler (2017) <doi:10.18637/jss.v077.i01> for random forests, and Vehtari, Gelman, and Gabry (2017) <doi:10.1007/s11222-016-9696-4> for leave-one-out cross-validation.

Authors:Luis Javier Madrigal-Roca [aut, cre], John Kelly [aut]

ErrorTracer_1.4.2.tar.gz
ErrorTracer_1.4.2.zip(r-4.7-any)ErrorTracer_1.4.2.zip(r-4.6-any)ErrorTracer_1.4.2.zip(r-4.5-any)
ErrorTracer_1.4.2.tgz(r-4.6-any)ErrorTracer_1.4.2.tgz(r-4.5-any)
ErrorTracer_1.4.2.tar.gz(r-4.7-any)ErrorTracer_1.4.2.tar.gz(r-4.6-any)
ErrorTracer_1.4.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
ErrorTracer/json (API)

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

Bug tracker:https://github.com/luismadrigal98/errortracer/issues

On CRAN:

Conda:

5.18 score 1 stars 6 scripts 322 downloads 25 exports 77 dependencies

Last updated from:3cad00268b. Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develERROR162
source / vignettesOK451
linux-releaseERROR190
macos-releaseERROR152
macos-oldrelERROR207
windows-develERROR112
windows-releaseERROR177
windows-oldrelERROR92
wasm-releaseOK173

Exports:as_et_modeldecompose_uncertaintyet_calibrateet_diagnoseet_fitet_pitet_plot_calibrationet_plot_coefficientset_plot_decompositionet_plot_forecastet_plot_pitet_plot_prior_posterioret_plot_sensitivityet_plot_shelf_lifeet_predictet_priors_splitet_sensitivity_profileet_shelf_life_poolet_skill_scoreet_sobolet_themeextract_priorsshelf_lifestandardizeunstandardize

Dependencies:abindbackportsbayesplotBHbridgesamplingbrmsBrobdingnagcallrcheckmateclicodacodetoolscpp11descdigestdistributionaldplyrfarverfuturefuture.applygenericsggdistggplot2ggridgesglobalsgluegridExtragtableinlineisobandlabelinglatticelifecyclelistenvloomagrittrMatrixmatrixStatsmgcvmvtnormnleqslvnlmenumDerivotelparallellypillarpkgbuildpkgconfigplyrposteriorprocessxpspurrrquadprogQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelreshape2rlangrstanrstantoolsS7scalesStanHeadersstringistringrtensorAtibbletidyrtidyselectutf8vctrsviridisLitewithr

Getting Started with ErrorTracer
Introduction | The simulated dataset | Setup | Exploring the dataset | Visualise the training data | Single-cluster workflow: Cluster A | Step 1 — Elastic net for prior extraction | Step 2 — Extract informed priors | Step 3 — Fit the Bayesian model | Step 4 — Diagnose convergence and model fit | Step 5 — Predict with environmental noise propagation | Step 6 — Uncertainty decomposition | Step 7 — Forecast shelf life | Step 8 — Calibration assessment | Visualisations | Forecast fan chart | Prior versus posterior | Forest plot: Bayesian vs. elastic net | Parameter recovery validation | Multi-cluster grouped workflow | Fitting | Diagnostics | Prediction and decomposition | Shelf life comparison | Calibration and forecast plots | Long-horizon forecasting with GCM projections | Using lm instead of glmnet | Standardising and back-transforming | Summary | Session information

Last update: 2026-10-28
Started: 2026-04-13

A one-predictor worked example
What this vignette is for | Setup: simulate one predictor, one response — over years | Stage 1: turn a quick frequentist fit into a prior | Stage 2: Bayesian refit with the informed prior | Stage 3: posterior prediction across the forecast horizon | Stage 4: decompose the variance over time | Stage 5: when does the forecast become uninformative? | The whole-pipeline figure | What this example does not show | Session info

Last update: 2026-05-23
Started: 2026-05-23

Readme and manuals

Help Manual

Help pageTopics
Extract or recompute uncertainty decompositiondecompose_uncertainty
Assess calibration of posterior predictive intervalset_calibrate
Diagnose a fitted ErrorTracer modelet_diagnose
Use a model fitted outside ErrorTraceras_et_model et_diagnose.brmsfit et_predict.brmsfit
Fit a Bayesian regression model with informed priorset_fit
Probability integral transform (PIT) for calibration diagnosticset_pit
Plot calibration: observed vs nominal coverageet_plot_calibration
Forest plot of regression coefficientset_plot_coefficients
Plot uncertainty decompositionet_plot_decomposition
Plot posterior predictive fan chartet_plot_forecast
Plot a PIT / rank histogram for calibrationet_plot_pit
Plot prior vs posterior distributions for model coefficientset_plot_prior_posterior
Plot a sensitivity profileet_plot_sensitivity
Plot forecast shelf lifeet_plot_shelf_life
Posterior prediction with uncertainty decompositionet_predict
Extract priors from data held out from the likelihoodet_priors_split
Sensitivity profile of the environmental uncertainty componentet_sensitivity_profile
Pool forecast shelf lives across multiple forecast originset_shelf_life_pool
Simulated allele-frequency-change dataset for ErrorTracer tutorialset_sim
Null-model-relative forecast skill (CRPS)et_skill_score
Global (Sobol) variance-based sensitivity of the predictive meanet_sobol
Minimal ggplot2 theme for ErrorTracer plotset_theme
Extract brms prior specification from a regularized or standard regression modelextract_priors extract_priors.cv.glmnet extract_priors.glm extract_priors.glmnet extract_priors.lm extract_priors.ranger
Compute the forecast shelf lifeshelf_life
Standardize a numeric vector (mean-centre, unit-variance)standardize
Reverse standardizationunstandardize