sir                package:LearnBayes                R Documentation

_S_a_m_p_l_i_n_g _i_m_p_o_r_t_a_n_c_e _r_e_s_a_m_p_l_i_n_g

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

     Implements sampling importance resampling for a multivariate t
     proposal density.

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

     sir(logf,tpar,n,data)

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

    logf: function defining logarithm of density of interest

    tpar: list of parameters of multivariate t proposal density
          including the mean m, the scale matrix var, and the degrees
          of freedom df

       n: number of simulated draws from the posterior

    data: data and parameters used in the function logf

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

     matrix of simulated draws from the posterior where each row
     corresponds to a single draw

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

     Jim Albert

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

     data(cancermortality)
     start=array(c(-7,6),c(1,2))
     fit=laplace(betabinexch,start,5,cancermortality)
     tpar=list(m=fit$mode,var=2*fit$var,df=4)
     theta=sir(betabinexch,tpar,1000,cancermortality)

