Tutorial 1a - simpleDDM#

In this tutorial, we introduce PyBEAM’s simpleDDM model and its usage. If you have not done so already, follow the directions on the PyBEAM github to install pybeam. Then, import PyBEAM’s precoded submodule:

[1]:
# import PyBEAM's precoded submodule
import pybeam.precoded as pbp

We will now call the precoded simpleDDM.

[2]:
# call simpleDDM model
model = pbp.simpleDDM()

The simpleDDM() model class calls the simple DDM model. This is a two threshold EAM with constant non-decision time, constant relative start point, constant drift rate, and constant decision thresholds. The default parameters for it are as follows:

'tnd': non-decision time
'w': relative start point
'mu': drift rate
'b': decision threshold location (upper is at b, lower is at -b; separation is 2b)

If ever you are unsure what parameters a model uses, the following callout returns the model’s parameters:

[3]:
# check which parameters your model uses
model.parameters()

[3]:
['tnd', 'w', 'mu', 'b']

Four inputs can be provided as arguments to the simpleDDM() class: sigma, contamination, non_decision, and start. sigma allows the user to set the diffusion rate of the acccumulator. By default, sigma = 1.0. contamination indicates if a contamination model should be added to the model. By default, contamination = ‘none’, but it can also be contamination = ‘uniform’ if a uniform contamination distribution should be added.

non_decision and start allow the user to add across-trial variability to the non-decision time and relative start points. By default, non_decision = ‘constant’, but can also be ‘uniform’ or ‘normal’. ‘uniform’ adds a uniform non-decision distribution, while ‘normal’ adds a normal non-decision distribution (truncated at zero to avoid non-decision times below zero). By default, start = ‘constant’, but can also be ‘uniform’ or ‘normal’. ‘uniform’ adds a uniform relative start distribution, while ‘normal’ adds a normal relative start distribution (truncated near 0 and 1 to prevent probability mass leaving the thresholds). These are used as follows:

[4]:
# call simpleDDM with user set sigma, contamination,
# and across-trial variability
model = pbp.simpleDDM(sigma = 1.0,
                      contamination = 'uniform',
                      non_decision = 'normal',
                      start = 'uniform')

# output model parameters
model.parameters()

[4]:
['tnd', 'w', 'mu', 'b', 'sd_tnd', 'sd_w', 'g', 'gl', 'gu']

Note that the model now has five additional parameters. These are:

'sd_tnd': standard deviation of non-decision time
          distribution (width of uniform distribution if
          non_decision = 'uniform').
'sd_w': width of relative start distribution (standard
        deviation of uniform distribution if
        start = 'normal').
'g': contamination strength (i.e. proportion of rt
     distribution due to contamination model)
'gl': lower bound of uniform contamination distribution
'gu': upper bound of uniform contamination distribution

We have now finished our introduction to the simpleDDM model! Proceed to Tutorial 2 to learn how to use your PyBEAM model.