indepmetrop            package:LearnBayes            R Documentation

_I_n_d_e_p_e_n_d_e_n_c_e _M_e_t_r_o_p_o_l_i_s _i_n_d_e_p_e_n_d_e_n_c_e _c_h_a_i_n _o_f _a _p_o_s_t_e_r_i_o_r _d_i_s_t_r_i_b_u_t_i_o_n

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

     Simulates iterates of an independence Metropolis chain with a
     normal proposal density for an arbitrary real-valued posterior
     density defined by the user

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

     indepmetrop(logpost,proposal,start,m,data)

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

 logpost: function defining the log posterior density

proposal: a list containing mu, an estimated mean and var, an estimated
          variance-covariance matrix, of the normal proposal density

   start: array with a single row that gives the starting value of the
          parameter vector

       m: the number of iterations of the chain

    data: data that is used in the function logpost

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

     par: a matrix of simulated values where each row corresponds to a
          value of the vector parameter

  accept: the acceptance rate of the algorithm

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

     Jim Albert

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

     data=c(6,2,3,10)
     proposal=list(mu=array(c(2.3,-.1),c(2,1)),var=diag(c(1,1)))
     start=array(c(0,0),c(1,2))
     m=1000
     fit=indepmetrop(logctablepost,proposal,start,m,data)

