Repository navigation
YieldLag 0.2.0
YieldLag models regional crop yields from seasonal climate with chronological tuning and evaluation.
Documentation website · Poland results and plots
New in 0.2.0
- Seasonal stress-lag estimator: asymmetric weather-anomaly responses, explicitly mapped compound hot-dry interactions, and smooth seasonal coefficients. Training-window climatology and preprocessing are refitted at each forecast origin.
- Prediction decomposition: additive trend, regional, weather, compound, and residual components reproduce the fitted prediction.
- Training-support diagnostics: identify weather terms outside training ranges and previously unseen regions.
- Deterministic nonlinear example: a documented synthetic response supports reproducible method comparison and recovery tests.
- Updated documentation: model equations, validation assumptions, data specifications, and rendered tutorials.
The package and repository are now named YieldLag; the R package name is yieldlag.
Installation
install.packages("remotes")
remotes::install_github("MR-Eini/yieldlag", ref = "v0.2.0",
build_vignettes = FALSE)
library(yieldlag)The attached source archive includes rendered tutorials. It requires R 4.2 or later; model estimation uses R's standard libraries.
Verification
The local R 4.5.2 package check completed with zero errors, warnings, or notes. All four GitHub checks passed: current R on Linux, Windows, and macOS, and R 4.2 on Linux. Tests cover transformed features, temporal leakage, prediction decomposition, diagnostics, and nonlinear response recovery. The 19 bundled numeric-input checksums are verified.
For the declared synthetic response, later-period province-year RMSE was 0.172 for stress_lag and 1.696 for panel_ridge over 90 province-years. This is a controlled recovery test, not evidence of predictive superiority on real crops.
SHA256SUMS.txt and verification.json document the attached archive and checks.
Model and data interpretation
The nonlinear basis estimates associations in monthly weather; anomaly thresholds are not physiological crop-damage thresholds. Complete harvest-year weather and fixed area weights make the bundled Poland example a retrospective benchmark. Code is MIT licensed; data attribution and provider terms are documented separately.