The R code for simulating data is quite confusing because it is scattered across many subsections, some of them reusing code from previous sections, some parts overwriting older code, sometimes the output data frame is constructed in one go stimuli <- tibble (x = rep( ..., sometimes it is constructed from vector variables f_dots_simdata4 <- tibble(..., x = x, ..., the meaning of individual variables is only described in text (often several pages earlier).
It would be super helpful if each new dataset (in each subsection of chapter 20) was constructed in one go using a complete self-contained piece of code (so a full tibble defining the entire dataset), and if at each time each variable was followed by a short comment what it does, e.g. what is x, x2, p_btask. and so on.
The R code for simulating data is quite confusing because it is scattered across many subsections, some of them reusing code from previous sections, some parts overwriting older code, sometimes the output data frame is constructed in one go
stimuli <- tibble (x = rep( ...
, sometimes it is constructed from vector variablesf_dots_simdata4 <- tibble(..., x = x, ...
, the meaning of individual variables is only described in text (often several pages earlier).It would be super helpful if each new dataset (in each subsection of chapter 20) was constructed in one go using a complete self-contained piece of code (so a full tibble defining the entire dataset), and if at each time each variable was followed by a short comment what it does, e.g. what is
x
,x2
,p_btask
. and so on.