detectseparation
0.4.0Detect and Check for Separation and Infinite Maximum Likelihood Estimates
Overview
Provides pre-fit and post-fit methods for detecting separation and infinite maximum likelihood estimates in generalized linear models with categorical responses. The pre-fit methods apply on binomial-response generalized liner models such as logit, probit and cloglog regression, and can be directly supplied as fitting methods to the glm() function. They solve the linear programming problems for the detection of separation developed in Konis (2007, https://ora.ox.ac.uk/objects/uuid:8f9ee0d0-d78e-4101-9ab4-f9cbceed2a2a) using 'ROI' https://cran.r-project.org/package=ROI or 'lpSolveAPI' https://cran.r-project.org/package=lpSolveAPI. The post-fit methods apply to models with categorical responses, including binomial-response generalized linear models and multinomial-response models, such as baseline category logits and adjacent category logits models; for example, the models implemented in the 'brglm2' https://cran.r-project.org/package=brglm2 package. The post-fit methods successively refit the model with increasing number of iteratively reweighted least squares iterations, and monitor the ratio of the estimated standard error for each parameter to what it has been in the first iteration. According to the results in Lesaffre & Albert (1989, https://www.jstor.org/stable/2345845), divergence of those ratios indicates data separation.
Install
Health
- NOTE r-devel-linux-x86_64-debian-clang
- NOTE r-devel-linux-x86_64-debian-gcc
- NOTE r-devel-linux-x86_64-fedora-gcc
- NOTE r-devel-windows-x86_64
- NOTE2026-07-1611 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 50%
- References docs
- 67%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
4 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/ikosmidis/detectseparation on 2026-07-19.
Dependencies
Code & Tests
- Cyclomatic complexity
- 3.0 median / 22 max
- Test cases
- 64 / 0.00 per code line
Test coverage
Line coverage
89%
Expression
87.4%
Tests / Examples
89.3% / 62% ex
Functions
14 4 exported
Complexity
5.3 avg / 22 max
Call network
14 nodes / 4 edges
Call graph
Open call graph →Lowest coverage
14 functions| Function | Cyclo | Coverage |
|---|---|---|
| plot.inf_check | 1 | 0% |
| print.detect_infinite_estimates | 3 | 0% |
| check_infinite_estimates.glm | 6 | 69% |
| .detect_infinite_estimates | 14 | 92% |
| print.detect_separation | 5 | 93% |
| separation_type_ROI | 3 | 93% |
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| endometrial | data.frame | 79 × 4 | in 6 packages |
| lizards | data.frame | 23 × 6 | in 3 packages |
| silvapulle1981 | data.frame | 35 × 2 | – |
People & History
4 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 0.4.0Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.32022-08-26 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.22021-04-22 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.12020-03-25
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2020-03-25
- Total releases
- 4 / 6 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.3.0
- Bundled data
- 1.2 KB / 3 files
- Download size
- 104 KB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet