gpava function

Generalized Pooled-Adjacent-Violators Algorithm (PAVA)

Generalized Pooled-Adjacent-Violators Algorithm (PAVA)

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

iJiwijf(yij,mi) \sum_i \sum_{J_i} w_{ij} f(y_{ij}, m_i)

under the constraint m1...mnm_1 \le ... \le m_n with ff 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!\sum_k w_k f(y_k, m) -> min! can be specified. Typical cases are f(y,m)=ympf(y, m) = |y - m|^p for p=2p = 2 (solved by weighted mean) and p=1p = 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 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, p = 0.25) ##repeated measures data(posturo) res <- gpava(posturo[,1],posturo[,2:4], ties = "secondary") plot(res)