Bayesian Essentials with R is now available both as an e-book and as a hardcover book on amazon.com!

## Archive for Bayesian Core

## Bayesian essentials with R available on amazon

Posted in Books, R, Statistics, University life with tags Bayesian Core, Bayesian Essentials with R, e-book, Jean-Michel Marin, R, Springer-Verlag on November 14, 2013 by xi'an## essential cover!

Posted in Books, R, Statistics, University life with tags Bayesian Core, Bayesian Essentials with R, bayess, Christmas, Jean-Michel Marin, Springer-Verlag on October 23, 2013 by xi'an**O**ur book is nearly out..! The Springer webpage is ready, we have sent the proofs back, amazon ~~is missing~~ has now included the above picture, things are moving towards the publication date, supposed to be November 30. Just in time for Christmas! And not too early given that we packed off in early February…

## packed off!!!

Posted in Books, pictures, R, Statistics with tags Bayesian Core, Bayesian Essentials with R, bayess, Berlin, books, Carnon, CRAN, La Défense, Luminy, R, Springer-Verlag on February 9, 2013 by xi'an**D**eliverance!!! We have at last completed our book! *Bayesian Essentials with R* is off my desk! In a final nitty-gritty day of compiling and recompiling the R package bayess and the LaTeX file, we have reached versions that were in par with our expectations. The package has been submitted to CRAN (it has gone back and forth a few times, with requests to lower the computing time in the examples: each example should take less than 10s, then 5s…), then accepted by CRAN, incl. a Windows version, and the book has be sent to Springer-Verlag. This truly is a deliverance for me as this book project has been on my work horizon almost constantly for more than the past two years, led to exciting times in Luminy, Carnon and Berlin, has taken an heavy toll on my collaborations and research activities, and was slowly turning into a unsavoury chore! I am thus delighted Jean-Michel and I managed to close the door before any disastrous consequence on either the book or our friendship could develop. *Bayesian Essentials with R* is certainly an improvement compared with *Bayesian Core*, primarily by providing a direct access to the R code. We dearly hope it will attract a wider readership by reducing the mathematical requirements (even though some parts are still too involved for most undergraduates) and we will keep testing it with our own students in Montpellier and Paris over the coming months. In the meanwhile, I just enjoy this feeling of renewed freedom!!!

## 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'an**W**hen 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

**that we turned into functions towards the completion of the**

*Bayesian Core**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!*

## from 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**T**he 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 ofBayesian Coreis 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:image(1:100,1:100,t(as.matrix(lm3)[100:1,]),col=gray(256:1/256),xlab="",ylab="")

As can be checked on Googlemap, the picture is indeed rotated by a -90⁰ angle and the transpose correction does the job!