SAmix                  package:mcsm                  R Documentation

_G_r_a_p_h_i_c_a_l _r_e_p_r_e_s_e_n_t_a_t_i_o_n _o_f _t_h_e _s_i_m_u_l_a_t_e_d _a_n_n_e_a_l_i_n_g _s_e_q_u_e_n_c_e _f_o_r _t_h_e _m_i_x_t_u_r_e _p_o_s_t_e_r_i_o_r

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

     This function implements a simulated annealing algorithm to
     optimize the posterior distribution of a normal mixture with two
     components and only the means unknown,

 'like=function(mu){ -sum(log((.25*dnorm(da-mu[1])+.75*dnorm(da-mu[2]))))} '

     with a schedule temp=1/log(1+t).

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

     SAmix(x, tolerance = 10^(-4), factor = 1)

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

       x: two-dimensional vector, starting point of the simulated
          annealing algorithm

tolerance: maximal difference in the target value needed to stop the
          simulated annealing algorithm

  factor: scale factor of temp that determines the scale of the random
          walk

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

   theta: sequence of points explored by the simulated annealing
          algorithm

    like: corresponding sequence of posterior values

     ite: number of iterations to reach stable value

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

     Christian P. Robert and George Casella

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

     From Chapter 5 of *EnteR Monte Carlo Statistical Methods*

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

     da=sample(rbind(rnorm(10^2),2.5+rnorm(3*10^2)))
     SAres=SAmix(x=c(-.3,.6),tol=10^(-2),fac=.1)

