isotone             package:EbayesThresh             R Documentation

_W_e_i_g_h_t_e_d _l_e_a_s_t _s_q_u_a_r_e_s _m_o_n_o_t_o_n_e _r_e_g_r_e_s_s_i_o_n

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

     Given a vector of data and a vector of weights, find the monotone
     sequence closest to the data in the sense of weighted least
     squares with the given weights.

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

     isotone(x, wt = rep(1, length(x)), increasing = FALSE)

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

       x: a vector of data

      wt: a vector the same length as 'x', giving the weights to be
          used in the weighted least squares algorithm

increasing: logical variable indicating whether the required fit is to
          be increasing or decreasing

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

     The standard pool-adjacent-violators algorithm is used.  Maximal
     decreasing subsequences are found within the current sequence. 
     Each such decreasing subsequence is replaced by a constant
     sequence with value equal to the weighted average.  Within the
     algorithm, the subsequence is replaced by a single point,  with
     weight the sum of the weights within the subsequence. This process
     is iterated to termination.  The resulting sequence is then
     unpacked back to the original ordering to give the weighted least
     squares monotone fit.

     If 'increasing=FALSE', the original sequence is negated and the
     resulting estimate negated.

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

     The vector giving the best fitting monotone sequence is returned.

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

     Bernard Silverman

_R_e_f_e_r_e_n_c_e_s:

     See 'ebayesthresh' and <URL: http://www.bernardsilverman.com>

_S_e_e _A_l_s_o:

     'wmonfromx'

