SortedEffects: Sorted Causal Effects in R

Chernozhukov et al. (2018) proposed the sorted effect method for nonlinear regression models. This method consists of reporting percentiles of the partial effects, the sorted effects, in addition to the average effect commonly used to summarize the heterogeneity in the partial effects. They also propose to use the sorted effects to carry out classification analysis where the observational units are classified as most and least affected if their partial effect are above or below some tail sorted effects. The R package SortedEffects implements the estimation and inference methods therein and provides tools to visualize the results. This vignette serves as an introduction to the package and displays basic functionality of the functions within.

Shuowen Chen , Victor Chernozhukov , Iván Fernández-Val , Ye Luo

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at

CRAN packages used

SortedEffects, SortedEffect, quantreg, margins, parallel, boot

CRAN Task Views implied by cited packages

Econometrics, Optimization, SocialSciences, Survival, Environmetrics, ReproducibleResearch, Robust, TimeSeries


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Chen, et al., "The R Journal: SortedEffects: Sorted Causal Effects in R", The R Journal, 2020

BibTeX citation

  author = {Chen, Shuowen and Chernozhukov, Victor and Fernández-Val, Iván and Luo, Ye},
  title = {The R Journal: SortedEffects: Sorted Causal Effects in R},
  journal = {The R Journal},
  year = {2020},
  note = {},
  doi = {10.32614/RJ-2020-006},
  volume = {12},
  issue = {1},
  issn = {2073-4859},
  pages = {131-146}