legacy {monotone} | R Documentation |
Monotone Regression Legacy Function
Description
legacy
provides some functions for monotone regression from the past.
Current implementations have been translated into C for proper comparison in Busing (2022).
Usage
legacy(x, w = rep(1, length(x)), number = 0)
Arguments
x |
a real-valued vector. |
w |
a real-valued vector with positive weights (default a vector with ones). |
number |
function number (specifications below). |
Details
Legacy implementations by number, function, author, and year:
0 = default (do nothing)
1 = fitm() by Kruskal (1964).
2 = wmrmnh() by van Waning (1976).
3 = amalgm() by Cran (1980).
4 = pav() by Bril (1984).
5 = isoreg() by Gupta (1995).
6 = iso_pava() by Turner (1997).
7 = isotonic() by Kincaid (2001).
8 = isomean() by Strimmer (2008).
9 = pooled_pava() by Pedregosa (2011).
10 = linear_pava() by Tulloch (2014).
11 = inplace_pava() by Varoquaux (2016).
12 = md_pava() by Danish (2016).
13 = reg_1d_l2() by Xu (2017).
14 = jbkpava() by de Leeuw (2017).
Error checking on w
or x
is not present.
Value
Returns a real-valued vector with values of x
in increasing order.
References
Busing, F.M.T.A. (2022). Monotone Regression: A Simple and Fast O(n) PAVA Implementation. Journal of Statistical Software, Code Snippets, 102 (1), pp. 1-25. (<doi:10.18637/jss.v102.c01>)
Examples
y <- c( 8, 4, 8, 2, 2, 0, 8 )
x <- legacy( y, number = 1 )
print( x )