rmultin               package:DCluster               R Documentation

_G_e_n_e_r_a_t_e _r_a_n_d_o_m _o_b_s_e_r_v_a_t_i_o_n_s _f_r_o_m _a _m_u_l_t_i_n_o_m_i_a_l _d_i_s_t_r_i_b_u_t_i_o_n

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

     This function generates a random observation from a multinomial
     distribution.

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

     rmultin(n, p)

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

       n: Total size (and NOT the number of variables involved in the
          multinomial distribution).

       p: Vector of probabilities. The sum of all its elements must be
          one.

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

     A vector with the sample which has been generated.

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

     for(i in 1:10)
             print(rmultin(10, c(1/3, 1/3, 1/3) ))

