Skip to content

sampleSelection

1.2-16Package record

Sample Selection Models

5packages dependsuggested by 11
87.9Kdownloads / year
74.4%test coverage
12/13flavors OK

Overview

About

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

Changes in 1.2-16
  • 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

CRAN checks
1NOTE12OK
Check messages
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

CRAN check page ↗

Slowest check: 7.1 min · r-oldrel-windows-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 1.2-16
READMENoVignettesYes · 3 · dynamicNEWSYes · 33% structured · mentions 1.2-16Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
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

87.9K
CRAN downloads in the past year
Rank #1,463 · ~241/day · ~7.3K/mo
Daily download trend is not available in this view yet.
7.3K30 days
17.6K90 days
87.9K1 year
Compare downloads with other packages →
Also on1.6K r2u7 autocran128 c2d4u

Repository

PracticesBeta

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.

How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)

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.

Depends (2)
R >= 2.10stats
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
5direct
0indirect
Imports 5
Suggested by 11
Show all 16 packagesHide all 16 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (3)
Author, Maintainer since 0.5-3 (2008)
Contributor · added in 1.2-0
Releases (21)

Pick two releases to compare their code metrics.

  • 1.2-16Latest
    record
    2026-10-04 · current release · diff ↗ ·
    added 2 exports
    nObs, stdEr
    ·
    13 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.
  • R
    R 4.6.0 released · 2026-04-24
  • 1.2-14
    record
    2026-01-20 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 1.2-12
    record
    2020-12-15 · diff ↗
  • 1.2-10
    record
    2020-11-04 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 1.2-6
    record
    2019-05-03 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 1.2-2
    record
    2019-02-19 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 1.2-0
    record
    2017-12-07 · diff ↗ ·
    added 1 export
    treatReg
Show 29 earlier eventsHide 29 earlier events
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • 1.0-4
    record
    2015-11-03 · diff ↗ ·
    added 1 export
    heckitTfit
  • R
    R 3.2.0 released · 2015-04-16
  • 1.0-2
    record
    2014-06-24 · diff ↗ ·
    added 1 export
    tobit2Bfit
  • R
    R 3.1.0 released · 2014-04-10
  • R
    R 3.0.0 released · 2013-04-03
  • 0.7-2
    record
    2012-08-14 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 0.7-0
    record
    2012-03-05 · diff ↗
  • 0.6-12
    record
    2011-11-13 · diff ↗ ·
    added 1 export
    binaryChoice
  • R
    R 2.14.0 released · 2011-10-31
  • R
    R 2.13.0 released · 2011-04-13
  • R
    R 2.12.0 released · 2010-10-15
  • 0.6-10
    record
    2010-08-12 · diff ↗ ·
    added 10 exports
    heckit, heckit2fit, heckit5fit, heckitVcov, invMillsRatio, probit, selection, tobit2fit, tobit5fit, linearPredictors
  • R
    R 2.11.0 released · 2010-04-22
  • R
    R 2.10.0 released · 2009-10-26
  • 0.6-8
    record
    2009-10-16 · diff ↗
  • 0.6-6
    record
    2009-07-18 · diff ↗
  • R
    R 2.9.0 released · 2009-04-17
  • 0.6-4
    record
    2009-01-26 · diff ↗
  • R
    R 2.8.0 released · 2008-10-20
  • 0.6-2
    record
    2008-09-16 · diff ↗
  • 0.6-1
    record
    2008-07-18 · diff ↗
  • 0.6-0
    record
    2008-07-14 · diff ↗
  • 0.5-5
    record
    2008-06-05 · diff ↗
  • R
    R 2.7.0 released · 2008-04-22
  • 0.5-3
    record
    2008-02-27
  • R
    R 2.6.0 released · 2007-10-03
Across CRAN, the median accepted release of the past year spent 23 hours in the queue, 90% under 11 days.How queue time is measured

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
Appears in task views

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for sampleSelection version 1.2-16 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy