wtpolyap              package:polyapost              R Documentation

_P_o_l_y_a _s_a_m_p_l_i_n_g _f_r_o_m _a_n _u_r_n _w_i_t_h _p_o_s_s_i_b_l_y _u_n_e_q_u_a_l _w_e_i_g_h_t_s

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

     Consider an urn containing a finite set of values along with their
     respective positive weights. An item is selected at random from
     the urn with probability proportional to its weight. Then it is
     returned to the urn and its weight is increased by one. The
     process is repeated on the adjusted urn. We continue until the
     total weight in the urn has been increased by k.  The original
     composition of the urn along with the k selected values, in order,
     are returned.

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

     wtpolyap(ysamp, wts, k)

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

   ysamp: A vector of real numbers which make up the urn.

     wts: A vector of positive weights which defines the initial
          probability of selection.

       k: A positive integer which specifies the number of Polya
          samples taken from the urn where after each draw the weight
          of the selected item is increased by one.

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

     The returned value is a vector of length equal to the length of
     the sample plus k

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

     wtpolyap(c(0,1,2),c(0.5,1,1.5),22)

