Here you will find daily news and tutorials about R, contributed by over 573 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

The two translators of our book in Japanese, Kazue & Motohiro Ishida, contacted me about some R code mistakes in the book. The translation is nearly done and they checked every piece of code in the book, an endeavour for which I am very grateful! Here are the two issues they have noticed (after incorporating the typos signaled in the overall up-to-date summary):

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

and compounded my mistake by including log-transforms of the parameters that should not be there (pp.204-205)! So (for my simulations) the posterior means of θ and σ² are 6.62 and 0.661, respectively, leading to an estimate of σ of 0.802. There should be no log transform in Exercise 7.3 either.

The same corrections apply to the French translation, most obviously…