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 43 forks source link

Figure 11.10 #18

Open ASKurz opened 4 years ago

ASKurz commented 4 years ago

In Section 11.3.1, CI depends on intention, Kruschke presented several NHST simulations. I believe I have the ones he presented in Figures 11.8 and 11.9 correct. But I believe my attempt at Figure 11.10 is not quite right. From the text, we read:

We can determine the CI for the experimenter who intended to stop when a fixed duration expired. Figure 11.10 shows the sampling distribution for different values of θ. The upper row shows the case of θ = 0.135, for which the sampling distribution has p = 2.5%. If θ is nudged any smaller, p is less than 2.5%, which means that smaller values of θ can be rejected. The lower row of Figure 11.9 shows the case of θ = 0.497, for which the sampling distribution has p = 2.5%. If θ is nudged any larger, p falls below 2.5%, which means that larger values of θ can be rejected. In summary, the range of θ values we would not reject is θ ∈ [0.135, 0.497]. This is the 95% CI when z = 7 and N = 24, for a data collector who intended to stop when time expired. (p. 320)

Kruschke's Figure 11.10 looks like this: Screen Shot 2020-02-16 at 10 55 15 AM

I played around with the simulation a bit, but the version in my bookdown project is still a bit off. [And to be clear, I'm only focusing on the right panels, here.] If you have a solution that more faithfully reproduces what Kruschke did, please share your code. If at all possible tidyverse-oriented workflows are preferred.