Skip to content

sampleSelection

Sample Selection Models

v1.2-14 · Jan 20, 2026 · GPL (>= 2)

Description

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

Downloads

6.1K

Last 30 days

1582nd

20.5K

Last 90 days

86.3K

Last year

Trend: -7.7% (30d vs prior 30d)

CRAN Check Status

1 NOTE
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 NOTE
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (1 non-OK)
NOTE r-release-macos-arm64

tests

Running ‘Mroz87SelectionTest.R’ [1s/1s]
  Comparing ‘Mroz87SelectionTest.Rout’ to ‘Mroz87SelectionTest.Rout.save’ ...76c76
< imrData$IMR1  -1.097620   1.252900   -0.88     0.38    
---
> imrData$IMR1  -1.097619   1.252900   -0.88     0.38    
88c88
< Return code 2: successive function values within tolerance limit (tol)
---
> Return code 1: gradient close to zero (gradtol)
120c120
<     -1.097620  
---
>     -1.097619  
144c144
< invMillsRatio -1.097620    1.26599  -0.867 3.86e-01
---
> invMillsRatio -1.097619    1.26599  -0.867 3.86e-01
171c171
< 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
196c196
< 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’ [2s/2s]
  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/1s]
  Comparing ‘probit.Rout’ to ‘probit.Rout.save’ ...4426c4426
< Return code 2: successive function values within tolerance limit (tol)
---
> Return code 1: gradient close to zero (gradtol)
6183c6183
<  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’ [3s/3s]
  Comparing ‘selection.Rout’ to ‘selection.Rout.save’ ... OK

Check History

NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-macos-arm64

tests

Running ‘Mroz87SelectionTest.R’ [1s/1s]
  Comparing ‘Mroz87SelectionTest.Rout’ to ‘Mroz87SelectionTest.Rout.save’ ...76c76
< imrData$IMR1  -1.097620   1.252900   -0.88     0.38    
---
> imrData$IMR1  -1.097619   1.252900   -0.88     0.38    
88c88
<
...[truncated]...
 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’ [3s/3s]
  Comparing ‘selection.Rout’ to ‘selection.Rout.save’ ... OK
NOTE r-release-macos-arm64

tests

Running ‘Mroz87SelectionTest.R’ [1s/1s]
  Comparing ‘Mroz87SelectionTest.Rout’ to ‘Mroz87SelectionTest.Rout.save’ ...76c76
< imrData$IMR1  -1.097620   1.252900   -0.88     0.38    
---
> imrData$IMR1  -1.097619   1.252900   -0.88     0.38    
88c88
<
...[truncated]...
 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’ [3s/3s]
  Comparing ‘selection.Rout’ to ‘selection.Rout.save’ ... OK

Reverse Dependencies (15)

Dependency Network

Dependencies Reverse dependencies maxLik miscTools systemfit Formula (>= 1.1-1) VGAM mvtnorm EMSS HeckmanEM localIV ssmrob xtsum AER OPSR fastqrs hpa insight marginaleffects micsr parameters ssmodels urbin sampleSelection

Version History

new 1.2-14 Mar 10, 2026
updated 1.2-14 ← 1.2-12 diff Jan 19, 2026
updated 1.2-12 ← 1.2-10 diff Dec 14, 2020
updated 1.2-10 ← 1.2-6 diff Nov 3, 2020
updated 1.2-6 ← 1.2-2 diff May 2, 2019
updated 1.2-2 ← 1.2-0 diff Feb 18, 2019
updated 1.2-0 ← 1.0-4 diff Dec 6, 2017
updated 1.0-4 ← 1.0-2 diff Nov 2, 2015
updated 1.0-2 ← 0.7-2 diff Jun 23, 2014
updated 0.7-2 ← 0.7-0 diff Aug 13, 2012
updated 0.7-0 ← 0.6-12 diff Mar 4, 2012
updated 0.6-12 ← 0.6-10 diff Nov 12, 2011
updated 0.6-10 ← 0.6-8 diff Aug 11, 2010
updated 0.6-8 ← 0.6-6 diff Oct 15, 2009
updated 0.6-6 ← 0.6-4 diff Jul 17, 2009
updated 0.6-4 ← 0.6-2 diff Jan 25, 2009
updated 0.6-2 ← 0.6-1 diff Sep 15, 2008
updated 0.6-1 ← 0.6-0 diff Jul 17, 2008
updated 0.6-0 ← 0.5-5 diff Jul 13, 2008
updated 0.5-5 ← 0.5-3 diff Jun 4, 2008