ASKurz / Doing-Bayesian-Data-Analysis-in-brms-and-the-tidyverse

The bookdown version lives here: https://bookdown.org/content/3686
GNU General Public License v3.0
147 stars 44 forks source link

Figure 6.1 #30

Closed Famondir closed 3 years ago

Famondir commented 3 years ago

You made a mistake in the code for figure 6.1:

d %>% 
  ggplot(aes(x = x, group = group)) +

  geom_line(aes(y = dbeta(x, shape1 = shape1, shape2 = shape2)),
            color = "grey50", size = 1.25) +
  scale_x_continuous(breaks = c(0, .5, 1)) +
  coord_cartesian(ylim = 0:3) +
  labs(x = expression(theta),
       y = expression(paste("p(", theta, "|a, b)"))) +
  theme(panel.grid = element_blank()) +
  facet_grid(b~a)

It has to be coord_cartesian(ylim = c(0,3)) +

Friendly greetings

ASKurz commented 3 years ago

You're right. coord_cartesian() and the other limits functions are pickier than they used to be. Thanks for pointing this one out! @Famondir, what name should I use when I acknowledge you in the thank you section of the next edition (see here)?

Famondir commented 3 years ago

My real name (you could use) is Simon Schäfer.

You are doing a realy great work that helps me a lot getting n touch with Bayesian analysis. :)

ASKurz commented 3 years ago

Backing up a bit, what version of the ebook are you using, @Famondir? It looks like I've already corrected this in the current version. See here for the rendered ebook and here for the line of code.

Famondir commented 3 years ago

Ah! Well I somehow found the 0.0.5 version on my researches. Thanks for the link to the new content. I'll check what you changed till then. I recognise a new color sheme. But you are still pretty explicit (e. g. loo_compare(fit10.1, fit10.2, criterion = "loo") instead of loo(fit10.1, fit10.2) ). Think that's good for learning but I learned the short version in the first hand.^^

ASKurz commented 3 years ago

Oh gosh. Yes, a lot has changed since the 0.0.5 version.