rnorMix               package:nor1mix               R Documentation

_G_e_n_e_r_a_t_e "_N_o_r_m_a_l _M_i_x_t_u_r_e" _D_i_s_t_r_i_b_u_t_e_d _R_a_n_d_o_m _N_u_m_b_e_r_s

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

     Generate 'n' random numbers, distributed according to a normal
     mixture.

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

     rnorMix(n, obj)

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

       n: the number of random numbers desired.

     obj: an object of class 'norMix'.

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

     For a mixture of m, i.e., 'm.norMix(obj)', components, generate
     the number in each component as multinomial, and then use 'rnorm'
     for each.

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

     numeric vector of length 'n'.

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

     'dnorMix' for the density, and 'norMix' for the construction and
     further methods.

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

     x <- rnorMix(5000, MW.nm10)
     hist(x)# you don't see the claw
     plot(density(x), ylim = c(0,0.6),
          main = "Estim. and true 'MW.nm10' density")
     lines(MW.nm10, col = "orange")

