Tutorial 1b - fullDDM#

In this tutorial, we introduce PyBEAM’s fullDDM 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 fullDDM.

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

The fullDDM() model class calls the full DDM model. This is a two threshold EAM with across-trial variability in the non-decision time, relative start point, and drift rate. It has constant decision thresholds. By default, the non-decision time distribution is normal with a truncation at zero so that no non-decision times end up beneath zero; the relative start point is a uniform distribution; and the drift rate is normally distributed;. 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)
'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').
'sd_mu': standard deviation of drift rate distribution
         (width of uniform distribution if
         drift = 'uniform')

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', 'sd_tnd', 'sd_w', 'sd_mu']

Five inputs can be provided as arguments to the simpleDDM() class: sigma, contamination, non_decision, start, and drift. 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 = ‘normal’, but can also be ‘constant’ or ‘uniform’. ‘normal’ adds a normal non-decision distribution (truncated at zero to avoid non-decision times below zero); ‘constant’ give no non-decision distribution; and ‘uniform’ adds a uniform non-decision distribution. By default, start = ‘uniform’, but can also be ‘constant’ or ‘normal’. ‘uniform’ adds a uniform relative start distribution; constant’ gives no relative start distribution; and ‘normal’ adds a normal relative start distribution (truncated near 0 and 1 to prevent probability mass leaving the thresholds). By default, drift = ‘normal’, but can also be ‘constant’ or ‘uniform’. ‘normal’ adds a normal non-decision distribution; ‘uniform’ adds a uniform non-decision distribution; and constant gives no start distribution. These are used as follows:

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

# output model parameters
model.parameters()

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

Note that the model now has three additional/modified parameters These are:

'sd_tnd': width of uniform relative start distribution
          (standard deviation of non-decision time
          distribution if non_decision = 'normal').
'sd_w': standard deviation of uniform distribution
        (width of relative start distribution if
        start = 'uniform').
'sd_mu': width of uniform drift rate distribution
          (standard deviation of drift rate
          distribution if drift = '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 fullDDM model! Proceed to Tutorial 2 to learn how to use your PyBEAM model.