OPSR
This introduction to the R package OPSR is a (slightly) modified version of a submis sion to the Journal of Statistical Software. Selection bias may arise if unobserved factors simultaneously influence the selection process for who gets treated (or not), and the out come of (not) receiving the treatment. Different methods exist to correct for this bias depending on whether longitudinal or cross-sectional data is available. A possible cure in the latter case (where the counterfactual treatment outcome is never observed) is to ex plicitly account for the arising error correlation and estimate the covariance matrix of the selection and outcome processes. This is known as endogenous switching regression. The R package OPSR introduced in this article provides an easy-to-use, fast and memory effi cient interface to ordered probit switching regression, accounting for self-selection into an ordinal treatment. It handles log-transformed outcomes which need special consideration when computing conditional expectations and thus treatment effects. Besides the usual R modeling methods (update(), summary(), predict(), etc.) post-estimation routines to compute and visualize (weighted) treatment effects are available.
Publication Details
- Journal
- Repository for Publications and Research Data (ETH Zurich)
- Published
- 2025-04-01
- DOI
- https://doi.org/10.3929/ethz-b-000729641
- Primary Topic
- Advanced Causal Inference Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00