| dmc_dm | R Documentation |
This function creates a drift_dm object that corresponds to the Diffusion Model for Conflict Tasks by \insertCiteUlrichetal.2015;textualdRiftDM.
dmc_dm(
var_non_dec = TRUE,
var_start = TRUE,
instr = NULL,
obs_data = NULL,
sigma = 1,
t_max = 3,
dt = 0.0075,
dx = 0.02,
b_coding = NULL
)
var_non_dec, var_start |
logical, indicating whether the model should
have a normally-distributed non-decision time or beta-shaped starting point
distribution, respectively.
(see |
instr |
optional string with "instructions", see
|
obs_data |
data.frame, an optional data.frame with the observed data. See obs_data. |
sigma, t_max, dt, dx |
numeric, providing the settings for the diffusion constant and discretization (see drift_dm) |
b_coding |
list, an optional list with the boundary encoding (see b_coding) |
The Diffusion Model for Conflict Tasks is a model for describing conflict tasks like the Stroop, Simon, or flanker task.
It has the following properties (see component_shelf):
a constant boundary (parameter b)
an evidence accumulation process that results from the sum of two subprocesses:
a controlled process with drift rate muc
a gamma-shaped process with a scale parameter tau, a shape
parameter a, and an amplitude A.
If var_non_dec = TRUE, a (truncated) normally distributed non-decision with
mean non_dec and standard deviation sd_non_dec is assumed. If
var_start = TRUE, a beta-shaped starting point distribution is assumed
with shape and scale parameter alpha.
If var_non_dec = TRUE, a constant non-decision time at non_dec is set. If
var_start = FALSE, a starting point centered between the boundaries is
assumed (i.e., a dirac delta over 0).
Per default the shape parameter a is set to 2 and not allowed to
vary. This is because the derivative of the scaled gamma-distribution
function does not exist at t = 0 for a < 2. Currently, we recommend
keeping a fixed to 2. If users decide to set a != 2,
then a small value of tol = 0.001 (default) is added to the time vector
t_vec before calculating the derivative of the scaled gamma-distribution as
originally introduced by \insertCiteUlrichetal.2015;textualdRiftDM. Users
can control this value by passing a value via ddm_opts() (see the example
below). Note, however, that varying a can lead to large numerical
inaccuracies if a gets smaller.
The model assumes the amplitude A to be negative for
incompatible trials. Also, the model contains the custom parameter
peak_l, containing the peak latency ((a-2)*tau).
An object of type drift_dm (parent class) and dmc_dm (child class),
created by the function drift_dm().
The scaling of the parameters in dRiftDM is different to
\insertCiteUlrichetal.2015;textualdRiftDM. This is because dRiftDM
works in seconds and with a diffusion constant of 1, while the original
DMC parameterization is in milliseconds and with a diffusion constant of 4.
We describe how to convert the parameters on our
website.
Ulrichetal.2015dRiftDM
# the model with default settings
my_model <- dmc_dm()
# the model with no variability in the starting point and a finer
# discretization
my_model <- dmc_dm(var_start = FALSE, dt = .005, dx = .01)
# we don't recommend this, but if you really want a != 2, just do...
# (see the Details for more warnings/information about this)
my_model <- dmc_dm(instr = "a ~!")
coef(my_model)["a"] <- 1.9
# -> if you want to control the small value that is added to t_vec when
# calculating the drift rate for a != 2, just use ...
ddm_opts(my_model) <- 0.0001 # ==> t_vec + 0.0001
ddm_opts(my_model) <- NULL # default ==> t_vec + 0.001
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.