This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Endogenous Switching Regression module. It is intended to support computational reproducibility and software transparency. Detailed statistical methodology, mathematical derivations, and user guidance are provided separately in the official module documentation.
The code blocks below demonstrate the computation behind each reported result using the ImpactData dataset supplied with the endoSwitch package (adoption of conservation agriculture by 408 farm households in Zambia).
R Core Team. (2025). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/
Chen, B., Yun, S., & Gramig, B. (n.d.). endoSwitch: Endogenous Switching Regression Models (R package version 1.0.0, GitHub commit d572d57). https://github.com/cbw1243/endoSwitch
Henningsen, A., & Toomet, O. (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics, 26(3), 443-458. https://doi.org/10.1007/s00180-010-0217-1
Jackson, C. H. (2011). Multi-State Models for Panel Data: The msm Package for R. Journal of Statistical Software, 38(8), 1-29. https://doi.org/10.18637/jss.v038.i08
Barrett, T., Dowle, M., Srinivasan, A., Gorecki, J., Chirico, M., Hocking, T., Schwendinger, B., & Krylov, I. (2025). data.table: Extension of ‘data.frame’ (R package version 1.18.6.1). https://doi.org/10.32614/CRAN.package.data.table
Fox, J., Kleiber, C., & Zeileis, A. (2025). ivreg: Instrumental-Variables Regression by ‘2SLS’, ‘2SM’, or ‘2SMM’, with Diagnostics (R package version 0.6-8). https://doi.org/10.32614/CRAN.package.ivreg
Fox, J., & Weisberg, S. (2019). An R Companion to Applied Regression (3rd ed.). Sage, Thousand Oaks, CA. https://www.john-fox.ca/Companion/
Heckman, J. J. (1979). Sample Selection Bias as a Specification Error. Econometrica, 47(1), 153-161. https://doi.org/10.2307/1912352
Lokshin, M., & Sajaia, Z. (2004). Maximum likelihood estimation of endogenous switching regression models. The Stata Journal, 4(3), 282-289. https://doi.org/10.1177/1536867X0400400306
Di Falco, S., Veronesi, M., & Yesuf, M. (2011). Does Adaptation to Climate Change Provide Food Security? A Micro-Perspective from Ethiopia. American Journal of Agricultural Economics, 93(3), 829-846. https://doi.org/10.1093/ajae/aar006
Bascle, G. (2008). Controlling for endogeneity with instrumental variables in strategic management research. Strategic Organization, 6(3), 285-327. https://doi.org/10.1177/1476127008094339
Allaire, J. J., Xie, Y., Dervieux, C., McPherson, J., Luraschi, J., Ushey, K., Atkins, A., Wickham, H., Cheng, J., Chang, W., & Iannone, R. (2025). rmarkdown: Dynamic Documents for R (R package version 2.30). https://github.com/rstudio/rmarkdown