powered by
Implements sampling importance resampling for a multivariate t proposal density.
sir(logf,tpar,n,data)
matrix of simulated draws from the posterior where each row corresponds to a single draw
function defining logarithm of density of interest
list of parameters of multivariate t proposal density including the mean m, the scale matrix var, and the degrees of freedom df
number of simulated draws from the posterior
data and parameters used in the function logf
Jim Albert
data(cancermortality) start=c(-7,6) fit=laplace(betabinexch,start,cancermortality) tpar=list(m=fit$mode,var=2*fit$var,df=4) theta=sir(betabinexch,tpar,1000,cancermortality)
Run the code above in your browser using DataLab