Skip to main content
. Author manuscript; available in PMC: 2020 Jan 24.
Published in final edited form as: J Neurosci Methods. 2019 Oct 3;328:108432. doi: 10.1016/j.jneumeth.2019.108432

Listing 4.

R code for simulating RT and choice responses from the simple diffusion decision model (DDM).

source(“chartr-HelperFunctions.r”)
nCoh = 5
nmc = 50000
model = “DDM”
fP = paramsandlims(model, nCoh, hypoPars = TRUE)
currParams = fP$hypoParams
R= simulateRTs(model, currParams, n=nmc, nds=nCoh)