Data from Jakob et al. (2019). Collabra: Psychology, 5, 31. The authors investigated how the Hogwarts’ sorting hat test relates to some empirically established personality traits (in this example, Machiavellianism).
First, let's see if there are differences in Machiavellianism between the different houses using a one-way ANOVA.
As you can see in the output below, there is a significant difference in Machiavellianism between the different houses, F(3, 843) = 36.26, p < .001
Data from Jakob et al. (2019). Collabra: Psychology, 5, 31. The authors investigated how the Hogwarts’ sorting hat test relates to some empirically established personality traits (in this example, Machiavellianism).
| Models | P(M) | P(M|data) | BFM | BF10 | error % |
|---|---|---|---|---|---|
| Sorting house | 0.500 | 1.000 | ∞ | 1.000 | |
| Null model | 0.500 | 1.508×10-19 | 1.508×10-19 | 1.508×10-19 | 0.018 |
The Bayesian ANOVA results indicate very strong evidence in favor of the Sorting house model. The differences in Machiavellianism between the houses are so big, that the data are pretty much infinitely more likely under the model that includes Sorting house as a predictor, compared to the model that does not. To investigate the differences, we can look (as always..) at the descriptives plots and post hoc tests below.
| Effects | P(incl) | P(excl) | P(incl|data) | P(excl|data) | BFincl |
|---|---|---|---|---|---|
| Sorting house | 0.500 | 0.500 | 1.000 | 0.000 | ∞ |
Our friend the Q-Q plot also returns in Bayesian ANOVA. Due to how the Bayesian framework works, we can even express uncertainty (credible intervals) in the Q-Q plot, to be even more nuanced about the normality assumption. Here we have so many data points though that the Q-Q plot looks OK in any case.
In Bayesian ANOVA, you can also get pairwise comparisons (i.e., t-tests between each condition). The correction for mutliple comparisons works a bit differently than in the frequentist ANOVA, since the Bayesian framework is not so focused on type 1/2 errors. The Bayes factors are unaffected by this correction, so the Bayes factor that compares Ravenclaw to Gryffindor (0.1014) is the same Bayes factor you would get from a t-test that compares these two conditions - here it indicates that we have moderate evidence that these two groups are similar in Machiavellianism. There are some huge Bayes factors that indicate that Slyterin differs from the other houses in their Machiavellianism.
| Prior Odds | Posterior Odds | BF10, U | error % | ||
|---|---|---|---|---|---|
| Ravenclaw | Gryffindor | 0.414 | 0.043 | 0.104 | 0.162 |
| Slytherin | 0.414 | 5.298×10+9 | 1.279×10+10 | 1.121×10-16 | |
| Hufflepuff | 0.414 | 15.453 | 37.308 | 6.415×10-4 | |
| Gryffindor | Slytherin | 0.414 | 1.036×10+9 | 2.501×10+9 | 5.267×10-16 |
| Hufflepuff | 0.414 | 27.153 | 65.554 | 3.821×10-4 | |
| Slytherin | Hufflepuff | 0.414 | 5.434×10+16 | 1.312×10+17 | 3.329×10-24 |
| Note. The posterior odds have been corrected for multiple testing by fixing to 0.5 the prior probability that the null hypothesis holds across all comparisons (Westfall, Johnson, & Utts, 1997). Individual comparisons are based on the default t-test with a Cauchy (0, r = 1/sqrt(2)) prior. The "U" in the Bayes factor denotes that it is uncorrected. | |||||
The raincloud and descriptives plots below seem to suggest that Slytherin does score higher on Machiavellianism, and in the Bayesian ANOVA we can look at the Bayes factors in the post hoc test (see above).