When Jean-Michel and I left Berlin, a month ago, I really thought we were that close to sending the new edition of Bayesian Core. Alas, we are not done yet for a series of reasons: leaving for India did not give me enough time to complete the help manual, some codes from the original version did not seem to work any longer, apparently jeopardising a whole chapter!, and the package did not seem to compile. Yesterday, we met again and made progress that makes me much more confident. For one thing, the R code that “did not work” was an original spreadsheet of Bayesian Core that we turned into functions towards the completion of the bayess package. However, due to sloppy programming at the time, we had used global variables that were called inside functions without being (explicitly) declared as variables. When those R codes got turned into functions, variables defined inside those functions were no longer global and recognised by the other functions defined within those same functions… Silly me! Once this issue got spotted by Jean-Michel, as well as the use of a few && instead of &’s, the whole problem unravelled rather quickly and we got a compiled package by the end of the day, even though some of the demos (reproducing the outcome found in the text) are still bugged. Stay tuned!
Archive for Bayesian Core
local package delays
Posted in Books, R, Statistics with tags Bayesian Core, Bayesian Essentials with R, bayess, book publishing, demo(), new edition, R, R function, R variables on January 25, 2013 by xi'anfrom down-under, Lake Menteith upside-down
Posted in Books, R, Statistics with tags Bayesian Core, image processing, Lake of Menteith, Loch Lomond, typos on January 23, 2013 by xi'an
The dataset used in Bayesian Core for the chapter on image processing is a Landsat picture of Lake of Menteith in Scotland (close to Loch Lomond). (Yes, Lake of Menteith, not Loch Menteith!) Here is the image produced in the book. I just got an email from Matt Moores at QUT that the image is both rotated and flipped:
The image of Lake Mentieth in figure 8.6 of Bayesian Core is upside-down and back-to-front, so to speak. Also, I recently read a paper by Lionel Cucala & J-M Marin that has the same error.
This is due to the difference between matrix indices and image coordinates: matrices in R are indexed by [row,column] but image coordinates are [x,y]. Also, y=1 is the first row of the matrix, but the bottom row of pixels in an image.
Only a one line change to the R code is required to display the image in the correct orientation:
[sourcecode language=”r” gutter=”false”]
image(1:100,1:100,t(as.matrix(lm3)[100:1,]),col=gray(256:1/256),xlab="",ylab="")
[/sourcecode]
As can be checked on Googlemap, the picture is indeed rotated by a -90⁰ angle and the transpose correction does the job!
paintings
Posted in Books, pictures with tags Bayesian Core, Le Choix bayésien, Michel Marin, paintings, sculptures on January 18, 2013 by xi'an
Michel Marin is a polymath artist at the frontier between painting and sculpture. (In case you wonder, he also is the father of my coauthor and dear friend Jean-Michel!) He also designed the covers of Bayesian Core and of Le Choix bayésien.
Here are some recent paintings taken from his website that I particularly like…

Core [still] minus one…
Posted in Books, pictures, R, Running, Statistics, Travel, University life with tags Bayesian Core, Bayesian Essentials with R, Carnon, GLMs, Montpellier, R, Rhône on September 23, 2012 by xi'an
Another full day spent working with Jean-Michel Marin on the new edition of Bayesian Core (soon to be Bayesian Essentials with R!) and the remaining hierarchical Bayes chapter… I have reread and completed the regression and GLM chapters, sent to very friendly colleagues for a last round of comments. Now, I am essentially idle, waiting for Jean-Michel to finish his part on the hierarchical Bayes chapter, so that I can do the final editing.round. Jean-Michel had a very long day on that chapter, leaving Montpellier at 5am to return only at half past midnight, due to massive delays in the train schedule (which is why I always fly to Montpellier…)
Core minus one!
Posted in Books, pictures, R, Running, Statistics with tags Bayesian Core, Bayesian Essentials with R, Carnon, hierarchical Bayesian modelling, Jean-Michel Marin, Montpellier, Rhône on September 10, 2012 by xi'anJean-Michel Marin visited me in Paris last week and, besides taking part in Pierre’s PhD defence, we made enough progress to close two more chapters of the new edition of Bayesian Core (soon to be Bayesian Essentials with R!) This follows the good work session we had in Carnon where we also completed two chapters (although it was hard to convince anyone that renting a flat by the Mediterranean sea was at all connected with…work! While it was: the only breaks I took were my morning runs…). There just remains one single chapter to complete, now, the one on hierarchical Bayes models. By all means, I dearly want to see it done by November 1!!!
