Ordered Probit Switching Regression
Overview
Estimates ordered probit switching regression models - a Heckman type selection model with an ordinal selection and continuous outcomes. Different model specifications are allowed for each treatment/regime. For more details on the method, see Wang & Mokhtarian (2024) doi:10.1016/j.tra.2024.104072 or Chiburis & Lokshin (2007) doi:10.1177/1536867X0700700202.
opsr_simulate()now takesseedargument to enable reproducibility.plot.opsr()andopsr_te()definetypearg list to behave similarly topredict.opsr().
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
Show 4 earlier changesHide 4 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-04-22
- ERROR13 OK, 1 ERROR2026-04-18
- OK14 OK2026-03-10
Documentation
- Help pages
- 31 (1 internal)includes a package overview page
- Examples that run
- 90%9 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 42%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 10% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 0
Forks over time
Releases over time
Issues over time
Commits over time
6 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/dheimgartner/opsr on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-06-09Seen in the repository: CLAUDE.mdPull request it wrote: opened by a project memberCommits: at least 15 crediting it in the message
- Claude Sonnet 4.610 commits · Jun 2026
- Claude Sonnet 54 commits · Aug 2026
- Claude Fable 51 commit · Aug 2026
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.0.1Latest
- 1.0.0
- RR 4.5.0 released · 2025-04-11
- 0.1.22024-11-01
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2024-11-01
- Total releases
- 3 / 2 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 147 KB / 2 files
- Download size
- 1.0 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("OPSR")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.3929/ethz-b-000729641, 10.1016/j.tra.2024.104072.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.