Sunday, October 25, 2020

DBDA2E in brms and tidyverse

Solomon Kurz has been re-doing all the examples of DBDA2E with the brms package for ease of specifying models (in Stan) and with the tidyverse suite of packages for data manipulation and graphics. His extensive re-write of DBDA2E can be found here. It's definitely worth a look!

He has extensive re-writes of other books, too.

I've been meaning to make a post about this for ages, and have finally gotten around to it. Big thanks to Solomon Kurz!

Monday, September 28, 2020

Fixing a new problem in some DBDA2E scripts caused by a change in R 4.0.0

UPDATE: Scripts are now changed to work with R 4.1; see this blog post

The scripts that accompany DBDA2E have worked fine, "out of the box," for years. But recently some scripts have had problems. Why? R has changed. With R 4.0.0, various functions such as read.csv() no longer automatically convert strings to factors. Some DBDA2E scripts assumed the results of those functions contained factors, but if you're now using R 4.0.0 (or more recent) those scripts will balk. 

So, what to do? Here's a temporary fix. When you open your R session, type in this global option:

options(stringsAsFactors = TRUE)

Unfortunately this option will eventually be deprecated. I'll have to modify every affected script and post updated versions. This will happen someday. I hope.

Why did R change? You can read about it here:

Friday, August 14, 2020

Need help finding corrigenda for DBDA2E

UPDATE: Now solved. Big thanks to Kent Johnson for re-constructing the table of corrigenda!

The host of the DBDA2E website (Google Sites), mandated a formatting change. Turns out the automatic reformatting mangled the table of Corrigenda. You can see it here:

I'd really like a properly formatted version!

Did you print or save or copy the previously formatted Corrigenda from the DBDA2E website sometime between October 2018 and August 2020? If so, please send it to me, and I'll attach it to the website.

(I got a version from the wayback machine at dated 2016, but there were subsequent modifications made until Sept 2018.)

Or, do you know of a way to re-format the mangled version so it appears properly?


Thursday, May 28, 2020

Teach (and learn) Bayesian and frequentist side by side

Teach (and learn) Bayesian and frequentist side by side: a talk and an app.

A talk explaining why that's a good idea:

(Talk delivered Saturday May 18, 2019.)

The interactive Shiny App with Bayesian and frequentist side by side: click HERE.
If you consider the app, especially for teaching, please let me know how it goes.