rmixedvm              package:CircStats              R Documentation

_R_a_n_d_o_m _G_e_n_e_r_a_t_i_o_n _f_r_o_m _t_h_e _M_i_x_e_d _v_o_n _M_i_s_e_s _D_i_s_t_r_i_b_u_t_i_o_n

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

     Generates pseudo-random numbers from a mixture of two von Mises
     distributions.

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

     rmixedvm(n, mu1, mu2, kappa1, kappa2, p)

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

       n: number of random variables to generate.

     mu1: mean direction in radians of one of the two von Mises
          distributions.

     mu2: mean direction in radians of the other von Mises
          distribution.

  kappa1: concentration parameter of one of the two von Mises
          distributions.

  kappa2: concentration parameter of the other von Mises distribution.

       p: mixing proportion.

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

     Simulates random variables with the density function p*VM(mu1,
     kappa1) + (1-p)*VM(mu2, kappa2), where  VM is the von Mises
     density function.  

     A uniform random variable on (0,1) is generated.  If it is less
     than p, then a variable is generated from VM(mu1, kappa1), else a
     variable is generated from VM(mu2, kappa2).  Simulation from the
     von Mises distribution is done via the algorithm due to Best and
     Fisher (1979).

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

     Returns a vector of n independent random variables generated from
     a mixture of two von Mises distributions.

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

     Best, D. and Fisher, N. (1979).  Efficient simulation of the von
     Mises distribution.  Applied Statistics, 24, 152-157.

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

     dmixedvm, rvm

