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", p =NA)
Arguments
z: Vector of abscissae values
y: Vector or 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"
p: Fractile value between 0 and 1 if weighted.fractile is used
Details
A Pool Adjacent Violators Algorithm framework for minimizing problems like
i∑Ji∑wijf(yij,mi)
under the constraint m1≤...≤mn 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 ∑kwkf(yk,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.
Using the weighted.fractile solver corresponds to the classical minimization procedure in quantile regression.
The user can also specify his own function foo(y, w) with responses and weights as arguments. It should return a single numerical value.
Returns
Generates an object of class gpava. - x: Fitted values
y: Observed response
z: Observed predictors
w: Weights
solver: Convex function
call: Matched call
p: Fractile value
References
de Leeuw, J., Hornik, K., Mair, P. (2009). Isotone Optimization in R: Pool-Adjacent-Violators Algorithm (PAVA) and Active Set Methods. Journal of Statistical Software, 32(5), 1-24.
Author(s)
Kurt Hornik, Jan de Leeuw, Patrick Mair
Examples
data(pituitary)##different tie approachesgpava(pituitary[,1],pituitary[,2], ties ="primary")gpava(pituitary[,1],pituitary[,2], ties ="secondary")gpava(pituitary[,1],pituitary[,2], ties ="tertiary")##different target functionsgpava(pituitary[,1],pituitary[,2], solver = weighted.mean)gpava(pituitary[,1],pituitary[,2], solver = weighted.median)gpava(pituitary[,1],pituitary[,2], solver = weighted.fractile, p =0.25)##repeated measuresdata(posturo)res <- gpava(posturo[,1],posturo[,2:4], ties ="secondary")plot(res)