pava: Pooling of Adjacent Violators

Description Usage Arguments Details Value Author(s) Examples

Description

The PAVA algorithm

Usage

1
pava(x, wt = rep(1, length(x)))

Arguments

x

A numeric sequence

wt

observation weights; 1 by default.

Details

The algorithm will turn a non-increasing into a non-decreasing one. pava is an internal function used to force monotonicity, e.g. of p1 in function Zfreq

Value

A non-decreasing sequence

Author(s)

R.F. Raubertas, code from S list

Examples

1
2
pava(c(1,2,4,3,5))
# [1] 1.0 2.0 3.5 3.5 5.0

SAGx documentation built on Nov. 8, 2020, 8:18 p.m.