Busing, F. M. T. A. “Monotone Regression: A Simple and Fast O(n) PAVA Implementation”. Journal of Statistical Software, Code Snippets, vol. 102, no. 1, May 2022, pp. 1-25, doi:10.18637/jss.v102.c01.