Sample Selection Models
Overview
Two-step and maximum likelihood estimation of Heckman-type sample selection models: standard sample selection models (Tobit-2), endogenous switching regression models (Tobit-5), sample selection models with binary dependent outcome variable, interval regression with sample selection (only ML estimation), and endogenous treatment effects models. These methods are described in the three vignettes that are included in this package and in econometric textbooks such as Greene (2011, Econometric Analysis, 7th edition, Pearson).
- The sampleSelection package now imports the maxLik package (instead of depending on it)
- Made tests more robust to changes in other packages
From NEWS in the release
Install
Health
NOTEtestsr-oldrel-macos-arm64
Running ‘Mroz87SelectionTest.R’ [2s/2s] Comparing ‘Mroz87SelectionTest.Rout’ to ‘Mroz87SelectionTest.Rout.save’ ...70c70 < imrData$IMR1 -1.097620 1.252900 -0.88 0.38 --- > imrData$IMR1 -1.097619 1.252900 -0.88 0.38 82c82 < Return code 2: successive function values within tolerance limit (tol) --- > Return code 1: gradient close to zero (gradtol) 114c114 < -1.097620 --- > -1.097619 138c138 < invMillsRatio -1.097620 1.26599 -0.867 3.86e-01 --- > invMillsRatio -1.097619 1.26599 -0.867 3.86e-01 165c165 < educ -0.1904 0.000725 -2.53e-05 1.01e-02 -2.82e-03 --- > educ -0.1904 0.000725 -2.53e-05 1.00e-02 -2.82e-03 190c190 < educ -0.1904 0.000725 -2.53e-05 1.01e-02 -2.82e-03 --- > educ -0.1904 0.000725 -2.53e-05 1.00e-02 -2.82e-03 Running ‘binarySelectionOutcome.R’ [3s/3s] Comparing ‘binarySelectionOutcome.Rout’ to ‘binarySelectionOutcome.Rout.save’ ... OK Running ‘fail.R’ [1s/1s] Comparing ‘fail.Rout’ to ‘fail.Rout.save’ ... OK Running ‘heckitIvTest.R’ [1s/1s] Comparing ‘heckitIvTest.Rout’ to ‘heckitIvTest.Rout.save’ ... OK Running ‘intervalTest.R’ [3s/3s] Comparing ‘intervalTest.Rout’ to ‘intervalTest.Rout.save’ ... OK Running ‘invMillsRatioTest.R’ [3s/3s] Comparing ‘invMillsRatioTest.Rout’ to ‘invMillsRatioTest.Rout.save’ ... OK Running ‘probit.R’ [1s/2s] Comparing ‘probit.Rout’ to ‘probit.Rout.save’ ...4420c4420 < Return code 2: successive function values within tolerance limit (tol) --- > Return code 1: gradient close to zero (gradtol) 6177c6177 < 7.04e-02 1.46e-01 1.72e-01 2.22e-01 -4.72e-01 8.95e-06 7.73e-01 7.52e-01 --- > 7.04e-02 1.46e-01 1.72e-01 2.22e-01 -4.72e-01 8.96e-06 7.73e-01 7.52e-01 Running ‘selection.R’ [7s/7s] Comparing ‘selection.Rout’ to ‘selection.Rout.save’ ... OK
- NOTE12 OK, 1 NOTE2026-06-27
- WARNING11 OK, 1 NOTE, 1 WARNING2026-06-14
- NOTE12 OK, 1 NOTE2026-06-09
- ERROR11 OK, 1 NOTE, 1 ERROR2026-06-07
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 27 (3 internal)
- Examples that run
- 100%13 run in a plain check
- Exported functions with examples
- 63%
- Documented parameters
- 62%
- Return-value docs
- 100%
- Help pages citing references
- 37%
Also includes 1 demo script (run with demo())
Downloads
Repository
Repository r-forge.r-project.org/projects/sampleselection is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.
Dependencies
Installing sampleSelection adds 67 packages (35 with compiled code, 61 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.
Show all 16 packagesHide all 16 packages
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.2-16Latest2026-10-04 · current release · diff ↗ ··
added 2 exports
nObs, stdEr13 hours in CRAN's queue
Listed in CRAN's incoming queue from 2026-10-04 00:17 to 2026-10-04 12:59 UTC, in 3 readings. - RR 4.6.0 released · 2026-04-24
- 1.2-142026-01-20 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 1.2-122020-12-15 · diff ↗
- 1.2-102020-11-04 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.2-62019-05-03 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.2-22019-02-19 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 1.2-0
Show 29 earlier eventsHide 29 earlier events
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- 1.0-4
- RR 3.2.0 released · 2015-04-16
- 1.0-2
- RR 3.1.0 released · 2014-04-10
- RR 3.0.0 released · 2013-04-03
- 0.7-22012-08-14 · diff ↗
- RR 2.15.0 released · 2012-03-30
- 0.7-02012-03-05 · diff ↗
- 0.6-12
- RR 2.14.0 released · 2011-10-31
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- 0.6-102010-08-12 · diff ↗ ·
added 10 exports
heckit, heckit2fit, heckit5fit, heckitVcov, invMillsRatio, probit, selection, tobit2fit, tobit5fit, linearPredictors - RR 2.11.0 released · 2010-04-22
- RR 2.10.0 released · 2009-10-26
- 0.6-82009-10-16 · diff ↗
- 0.6-62009-07-18 · diff ↗
- RR 2.9.0 released · 2009-04-17
- 0.6-42009-01-26 · diff ↗
- RR 2.8.0 released · 2008-10-20
- 0.6-22008-09-16 · diff ↗
- 0.6-12008-07-18 · diff ↗
- 0.6-02008-07-14 · diff ↗
- 0.5-52008-06-05 · diff ↗
- RR 2.7.0 released · 2008-04-22
- 0.5-32008-02-27
- RR 2.6.0 released · 2007-10-03
Package metadata
- First published
- 2008-02-27
- Total releases
- 21 / 18 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 2.10
- Bundled data
- 702 KB / 4 files
- Download size
- 2.5 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("sampleSelection")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.