gpava {isotone} | R Documentation |
Pooled-adjacent-violators algorithm for general isotone regression problems. It allows for general convex target function, multiple measurements, and different approaches for handling ties.
gpava(z, y, weights = NULL, solver = weighted.mean, ties = "primary", a = NA, b = NA)
z |
Vector of list of vectors of predictors |
y |
Vector of list of vectors of responses |
weights |
Vector of list of vectors of observation weights |
solver |
Either weighted.mean , weighted.median , weighted.fractile , or
a user-specified function (see below) |
ties |
Treatment of ties, either "primary", "secondary", or "tertiary" |
a |
Fractile specification for weighted.fractile solver |
b |
Fractile specification for weighted.fractile solver |
A Pool Adjacent Violators Algorithm framework for minimizing problems like
sum_i sum_{J_i} w_{ij} f(y_{ij}, m_i)
under the constraint m_1 <= ... <= m_n with f a convex function in m. Note that this formulation allows for repeated data in each block
(i.e. each list element of y
, and hence is more general than the usual pava/isoreg ones.
A solver for the unconstrained sum_k w_k f(y_k, m) -> min! can be specified.
Typical cases are f(y, m) = |y - m|^p for p = 2 (solved by weighted mean) and p = 1 (solved by weighted median), respectively.
The user can also specify his own function foo(y, w)
with responses and weights as arguments. It
should return a single numerical value.
Generates an object of class gpava
.
x |
Fitted values |
y |
Observed response |
z |
Observed predictors |
w |
Weights |
solver |
Convex function |
call |
Matched call |
Kurt Hornik, Jan de Leeuw, Patrick Mair
de Leeuw, J., Hornik, K., Mair, P. (2008). Isotone Optimization in R: Pool-Adjacent-Violators Algorithm (PAVA) and Active Set Methods. Journal of Statistical Software, forthcoming.
data(pituitary) ##different tie approaches gpava(pituitary[,1],pituitary[,2], ties = "primary") gpava(pituitary[,1],pituitary[,2], ties = "secondary") gpava(pituitary[,1],pituitary[,2], ties = "tertiary") ##different target functions gpava(pituitary[,1],pituitary[,2], solver = weighted.mean) gpava(pituitary[,1],pituitary[,2], solver = weighted.median) gpava(pituitary[,1],pituitary[,2], solver = weighted.fractile, a = 0.25, b = 0.75) ##repeated measures data(posturo) res <- gpava(posturo[,1],posturo[,2:4], ties = "secondary") plot(res)