Outlier Robust Two-Stage Least Squares Inference and Testing
Overview
An implementation of easy tools for outlier robust inference in two-stage least squares (2SLS) models. The user specifies a reference distribution against which observations are classified as outliers or not. After removing the outliers, adjusted standard errors are automatically provided. Furthermore, several statistical tests for the false outlier detection rate can be calculated. The outlier removing algorithm can be iterated a fixed number of times or until the procedure converges. The algorithms and robust inference are described in more detail in Jiao (2019) https://drive.google.com/file/d/1qPxDJnLlzLqdk94X9wwVASptf1MPpI2w/view.
This version only updates the unit tests and vignettes.
Changes to Unit Tests
- discovered slight changes in 14th or 15th decimals
- discovered changes to some random number generations from
generate_data(),
which were traced back to changes in the environment and changes in the MASS pkg
- restructured the tests to rely on fixtures
- created fixed datasets, stored in tests/testthat/testdata/
- replaced
generate_data()withreadRDS()where possible - for
mc_grid(), artifical data generation happens within the function body
using generate_data(); to make it use fixed datasets, used the mockery pkg
and macked the function to read in the stored datasets instead of drawing
randim data
Show all changes in 0.2.4Hide the rest of the changes in 0.2.4
- fixed GH issue #19, making parallel execution more robust
- introduced some tolerance to numerical comparisons
- sup_test simulates pvalue, allowed for 0.015 tolerance diff (e.g. across OS)
- iis_init snapshots rounded to tolerance 12 digits, set to 0 if smaller than that
Detailed Comments
- created two tags, which represented steps along the way of these improvements:
- v0.2.3-fixtures was developed on the old environment, changed tests to rely
on the fixed datasets and ensured all tests still passed; then converted to
new environment
- v0.2.3-ivreg-fixes updated code (tests and vignettes) to avoid new warnings
about collinearity, which did not appear previously
- also updated the
getspkg to v0.40, no changes were required
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- WARNING12 OK, 1 WARNING2026-06-07
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
- Help pages
- 49 (10 internal)includes a package overview page
- Examples that run
- no examples
- Exported functions with examples
- 0%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 61%
- Median days to close, 50 most recently updated closed issues
- 201
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Issues over time
PRs over time
Commits over time
8 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/jkurle/robust2sls on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 2 practices
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.4Latest
- RR 4.6.0 released · 2026-04-24
- 0.2.32025-05-21 · 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
- 0.2.22023-01-11 · diff ↗
- 0.2.1
- RR 4.2.0 released · 2022-04-22
- 0.2.02022-02-14 · diff ↗ ·
added 8 exports
counttest, gauge_covar, globaltest, multi_cutoff, mvn_sup, proptest, sumtest, suptest - 0.1.02021-11-23
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2021-11-23
- Total releases
- 6 / 5 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 2.10
- Download size
- 738 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("robust2sls")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.