Python re-implementation of Soroye et al. 2020 pipeline applied to the original Bombus dataset
Two intentional deviations from the original lme4/MCMC implementation: (i) the species random effect is fit by variational Bayes (statsmodels.BinomialBayesMixedGLM) rather than full MCMC, a fast approximation that typically underestimates posterior credible-interval width by approximately 10–20%; (ii) the climateLimits[[1]]/[[2]] precomputation step is reconstructed from the available R helper scripts because the precomputation script itself is not in the public Figshare release.
All five preprocessing and modelling steps in the original R pipeline (Cleandata_and_makeMCPs.R, CalcSpeciesPr_Rich.R, CalcSamplingEffort_Cont.R, the climate-position computation, and binomialGLMM4Presence.R) were re-implemented in Python 3.12 using xarray, pandas, statsmodels, and scipy. The mixed-effects logistic GLMM was fit with the species random effect and the same fixed-effect interactions as the original (thermal-position baseline + delta + their interaction, precipitation analogues, baseline × baseline interaction, delta × delta interaction). The datasets are the authors' bundled Bombus + CRU TS 3.24.01 monthly climate data (Figshare 10.6084/m9.figshare.9956471) on a 100 km cylindrical equal-area grid for the 1901–1974 baseline and 2000–2014 recent periods.
The complete claim — that local extirpation rate in bumble bee species rises with the frequency at which local temperatures exceed species-specific historically observed thermal tolerances — is tested on the authors' original dataset across all 66 bumble bee species and the entire North America + Europe study area. Both the regression specification (mixed-effects logistic with thermal-position baseline + delta + their interaction, precipitation analogues, and species random effect) and the response variable (binary local extirpation between the 1901–1974 baseline and 2000–2014 recent period) match the original.
NP created using Declaring a replication study design according to FORRT