The R package csranks provides statistical tools for estimation and inference involving ranks (the position in a ranking). Two central functions are csranks for confidence sets for ranks and lmranks for regressions involving ranks, e.g. rank-rank regressions that are popular in applied work in economics.

The commands are based on recent work developing these procedures and their theoretical properties. The confidence sets for ranks are based on Mogstad, Romano, Shaikh, and Wilhelm (2023) and Bazylik, Mogstad, Romano, Shaikh, and Wilhelm (2022). The inference methods for regressions involving ranks are developend in Chetverikov and Wilhelm (2023).


You can install the released version of csranks from CRAN with:


You can install the development version of csranks from GitHub with:

# install.packages("remotes")