(I have looked at previous questions about this same issues but the suggestions don’t seem to work anymore or I still want to understand what is happening)
When fitting a model using a Wiener family, I get the “Initial value rejected” error before sampling starts. If I use log-transformed values, then sampling starts fine. Here’s the code
library(tidyverse)
shallow <- read_csv("https://github.com/uoelel/qml-data/raw/main/data/song2020/shallow.csv") |>
filter(
Critical_Filler == "Critical",
RT > 0
)
wm1_bf <- bf(
# RTs are in ms
RT | dec(ACC) ~ Relation_type * Group + (Relation_type |p| ID),
bs ~ Group + (1 |p| ID),
ndt ~ Group + (1 |p| ID),
bias ~ Group + (1 |p| ID)
)
wm1 <- brm(
wm1_bf,
family = wiener(),
data = shallow_filt,
seed = my_seed,
backend = "cmdstanr",
chain = 1
)
I understand this is related to the fact that brms picks initial values in a particular way but I don’t quite understand it completely so I am not sure why including logged RT instead of RT in ms solves the issue.
- Operating System: macOS Sonoma 14.1
- brms Version: 2.21.0