R Package “robust2sls”

R-CMD-check Codecov test coverage

The goal of robust2sls is to provide easy-to-use tools for outlier-robust inference and outlier testing in two-stage least squares (2SLS) models.


You can install the released version from CRAN with:


You can install the development version from GitHub with:

# install.packages("devtools")


For a detailed introduction to the model framework, the different trimmed 2SLS algorithms, and examples, see the vignette Introduction to the robust2sls Package.

utils::vignette("overview", package = "robust2sls")

Note about Versions of Dependencies

The Depends: and Suggests: fields in the DESCRIPTION file have no minimum or maximum version because I cannot test how far the package is compatible with older versions of the dependencies. However, I also did not want to require the versions that were used during the development to not force users to update their packages and potentially break their other existing code.

The following table lists the version of each package that was used in the development of the robust2sls package.

For your information, robust2sls was developed under the following versions: