Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
First, in Example 4.4, I omitted some checkings and forgot about a minus sign, meaning Figure 4.4 (right) is wrong. (The more frustrating since this example covers perplexity!) The zeros must be controlled via code lines like
> wachd[wachd<10^(-10)]=10^(-10)
instead of the meaningless
wachd[apply(wachd,2,cumsum)<10^(-10)]=10^(-10)
and the addition of
> plex[plex>0]=0 > plech[plech>0]=0
after the definition of those two variables. (Because entropies are necessarily positive.) The most glaring omission is however the minus in
> plob=apply(exp(-plex),1,quantile,c(.025,.975)) > ploch=apply(exp(-plech),1,quantile,c(.025,.975))
which modifies Figure 4.4 in the following
The second case is Example 7.3 where I forgot to account for the log-transform of the data, which should read (p.204):
> x=c(91,504,557,609,693,727,764,803,857,929,970,1043, + 1089,1195,1384,1713) > x=log(x)
The same corrections apply to the French translation, most obviously…
Filed under: Books, R, Statistics, University life Tagged: Introducing Monte Carlo Methods with R, Japan, Monte Carlo Statistical Methods, perplexity, R
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.