pava                  package:SAGx                  R Documentation

_P_o_o_l_i_n_g _o_f _A_d_j_a_c_e_n_t _V_i_o_l_a_t_o_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     The PAVA algorithm

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

       x: A numeric sequence

      wt: observation weights; 1 by default.

_D_e_t_a_i_l_s:

     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

_V_a_l_u_e:

     A non-decreasing sequence

_A_u_t_h_o_r(_s):

     R.F. Raubertas, code from S list

_E_x_a_m_p_l_e_s:

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

