endoSwitch

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.

Package installation

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”)

Note

The package is still under development. I am making regular changes to the package for performance improvement. Please use the most recent version of the package. Install again before using it.

If there is anything wrong, shoot me an email.

Contact: Bowen Chen, PhD ([email protected])