RMDL – Week 5
Varying effects I
1 Introduction
In this tutorial, you have to run Bayesian regression models with data from Winter 2012 (DOI 10.1016/j.wocn.2012.08.006).
You can get the data here (right-click and download). This page explains the meaning of the columns in the data: https://uoelel.github.io/qml-data/data/winter2012/polite.html.
2 Mean f0
Fit a regression model to answer the following question:
Do the months spent in Germany modulate the effect of attitude on mean f0?
The model should have the following variables:
f0mn
as the outcome variable.gender
,months_ger
andattitude
as predictors. Use indexing (0 +
).- Add multilevel effects as needed.
3 H1-H2 difference
If you have time, run another regression model to answer the following research question:
Does being a music student modulate the effect of attitude on the H1-H2 difference?
The H1-H2 difference is correlated with breathiness: the higher the difference, the more breathy the voice quality.
4 Reporting
You should mention the varying effects you included when reporting the model specification. For example, for the following model:
<- brm(
ota_bm_2 ~ 0 + Condition:Contrast +
Words.RT 0 + Condition:Contrast | Subject) +
(0 + Condition:Contrast | Version),
(family = lognormal,
data = ota2009,
seed = my_seed,
cores = 4,
file = "data/cache/ota_bm_2"
)
As varying (aka random) effects, we included by-participant and by-list varying terms for the interaction between condition and contrast.