I have been following Henrik Singmann’s great drift diffusion model tutorial (using brms): http://singmann.org/wiener-model-analysis-with-brms-part-i/
It all works well with categorical predictors (x1:x2:x3, all x’s being categorical), e.g.
formula <- bf(RT | dec(Response) ~ 0 + x1:x2:x3 + (0 + x1:x3|p|SubjectID), bs ~ 0 + x1:x2:x3 + (0 + x1:x3|p|SubjectID), ndt ~ 0 + x1:x2:x3, bias = 0.5)
However, if I have a numeric predictor (let’s assume linear for now), the model just cannot find valid initial values:
log(0) sampling errors (Log probability evaluates to log(0), i.e. negative infinity.)
I am probably overlooking something basic in how a continuous variable interacts with the x1:x2 notation and failing to account for that when defining initial values.
Here is our reproducible example:
A sample dataset: https://www.dropbox.com/s/ji3s4yn9dysda60/exp1_subset.csv?dl=0
The dataset is about a categorical perception task (discriminating between “Sendt” and “Tændt”), where the stimulus is along a graded continuum between the two extremes (Step codes for the position on the continuum). ResponseN is the response, RT_target is the RT. We have 2 additional binary categorical predictors (Language, indicating the native language of the participants; and Bias indicating which perception is supported by the context, a sentence in which the stimulus is situated).
A R markdown with the code we used to set up formula, priors and initial values: https://www.dropbox.com/s/rbez946ole3hope/DDM_Step_Singmann.Rmd?dl=0