Skip to content

ssmodels

2.0.2Package record

Sample Selection Models

0packages depend
3.6Kdownloads / year
40.0%test coverage
13/13flavors OK

Overview

About

In order to facilitate the adjustment of the sample selection models existing in the literature, we created the 'ssmodels' package. Our package allows the adjustment of the classic Heckman model (Heckman (1976), Heckman (1979) doi:10.2307/1912352), and the estimation of the parameters of this model via the maximum likelihood method and two-step method, in addition to the adjustment of the Heckman-t models introduced in the literature by Marchenko and Genton (2012) doi:10.1080/01621459.2012.656011 and the Heckman-Skew model introduced in the literature by Ogundimu and Hutton (2016) doi:10.1111/sjos.12171. We also implemented functions to adjust the generalized version of the Heckman model, introduced by Bastos, Barreto-Souza, and Genton (2021) doi:10.5705/ss.202021.0068, that allows the inclusion of covariables to the dispersion and correlation parameters, and a function to adjust the Heckman-BS model introduced by Bastos and Barreto-Souza (2020) doi:10.1080/02664763.2020.1780570 that uses the Birnbaum-Saunders distribution as a joint distribution of the selection and primary regression variables. This package extends and complements existing R packages such as 'sampleSelection' (Toomet and Henningsen, 2008) and 'ssmrob' (Zhelonkin et al., 2016), providing additional robust and flexible sample selection models.

Changes in 2.0.2

Bug Fixes

  • Corrected the HeckmanBS() score and standard-error chain rule for rho_star -> rho.
  • Added coefficients_link and gradient_link to HeckmanBS() results for transparent gradient validation on the optimization scale.
  • Moved gradient validation scripts and independent score/log-likelihood helpers to inst/validation/.
  • Cleaned stale dependency declarations and made complete.cases() references namespace-explicit.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.6 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 2.0.2
READMEYes · 381 wordsVignettesNoNEWSYes · 100% structured · mentions 2.0.2Citation fileNoWebsiteYes · pkgdown
Help pages
22 (2 internal)includes a package overview page
Examples that run
100%10 run in a plain check
Exported functions with examples
31%
Documented parameters
84%
Return-value docs
100%
Help pages citing references
41% with a bibliography file

Downloads

3.6K
CRAN downloads in the past year
Rank #9,730 · ~10/day · ~297/mo
Daily download trend is not available in this view yet.
41730 days
1K90 days
3.6K1 year
Compare downloads with other packages →
Also on80 r2u3 autocran

Repository

1Stars
1Forks
1Open issues
0Open PRs
0Releases
75Commits
3Commit identities
75 commits · Last activity 2026-09-28 · The default branch showed an older version (2.0.1) than CRAN on 2026-10-18
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2022-10-05 · 12026-07-07 · 1
PracticesBeta

10 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/fsbmat-ufv/ssmodels on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-28 · The repository has a site deploy workflow

pkgdown site last built 2026-09-28

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Research and citation (1)
CITATION.cff
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing ssmodels adds 10 packages (5 with compiled code, 4.1 MB of source tarballs). Heaviest: rbibutils 1.1 MB, quantreg 903 KB, sn 806 KB.

Depends (1)
R >= 3.6.0
Imports (4)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 1.0.1 (2022)
Releases (4)

Pick two releases to compare their code metrics.

  • 2.0.2Latest
    record
    2026-05-30 · current release · diff ↗ ·
    added 5 exports
    summary.HeckmanBS, summary.HeckmanCL, summary.HeckmanGe, summary.HeckmanSK, summary.HeckmantS
  • R
    R 4.6.0 released · 2026-04-24
  • 2.0.1
    record
    2025-06-02 · diff ↗
  • 2.0.0
    record
    2025-06-02 · diff ↗ ·
    removed 5 exports
    summary.HeckmanBS, summary.HeckmanCL, summary.HeckmanGe, summary.HeckmanSK, summary.HeckmantS
    added 2 exports
    extract_model_components, postprocess_theta
  • 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
  • 1.0.1
    record
    2022-10-04
  • R
    R 4.2.0 released · 2022-04-22

Package metadata

First published
2022-10-04
Total releases
4 / 4 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.6.0
Bundled data
750 KB / 5 files
Download size
859 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ssmodels")
de Souza Bastos, F., & Barreto de Souza, W. (2026). ssmodels: Sample Selection Models (Version 2.0.2) [Computer software]. https://doi.org/10.32614/CRAN.package.ssmodels

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

The repository also keeps a CITATION.cff.

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 ssmodels version 2.0.2 [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