The R package estimates the endogenous switching regression model using full maximum likelihood estimation, and calculates treatment effects of a binary treatment.
The function can replicate the regression results of the movestay command in STATA, though minor difference could occur due to differences in the optimization methods.
To install the package, run the following codes in R:
install.packages("devtools") # Run this if the devtools package is not installed.
devtools::install_github("cbw1243/endoSwitch")
Bowen Chen, PhD (bwchen0719@gmail.com)
The development of this package was supported by USDA-NRCS Agreement No. NR193A750016C001 through the Cooperative Ecosystem Studies Units network. Any opinions, findings, conclusions, or recommendations expressed are those of the author(s) and do not necessarily reflect the view of the U.S. Department of Agriculture.