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:

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 )


[Package monotone version 0.1.2 Index]