Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
– in Exercise 6.13, both
in Exercise 6.15, the
– in Example 7.3, part of the code is wrong: it should be
> sigma2=theta=rep(0,Nsim) #init arrays > sigma2[1]=1/rgamma(1,shape=a,rate=b) #init chains > B=sigma2[1]/(sigma2[1]+n*tau2) > theta[1]=rnorm(1,m=B*theta0+(1-B)*xbar,sd=sqrt(tau2*B))
instead of
> sigma=theta=rep(0,Nsim) #init arrays > sigma{1}=1/rgamma(1,shape=a,rate=b) #init chains > B=sigma2{1}/(sigma2{1}+n*tau2) > theta{1}=rnorm(1,m=B*theta0+(1-B)*xbar,sd=sqrt(tau2*B))
(I frankly don’t understand where those curly brackets came from!)
– in Example 7.6, I forgot to include the truncation probability
– in Exercise 7.21, rtnorm is missing sigma as one of its arguments.
– Exercise 7.23 has nothing wrong per se but it is rather a formal (mathematical) exercise
– in Exercise 7.25 the
Posted in Books, R, Statistics, University life Tagged: Introducing Monte Carlo Methods with R, MCMC, Monte Carlo methods, simulation, typos
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.