simulateSSP | R Documentation |
simulateSSP
generates synthetic data from the DSTP model in the
form of response time (RT) in seconds and accuracy for both congruent and
incongruent trials.
simulateSSP(parms, nTrials, var = 0.01, dt = 1/1000, seed = NULL)
parms |
The set of parameters to use to simulate the data. Must be
contained in a vector in the order: |
nTrials |
How many trials to simulate per congruency condition. |
var |
The variance of the diffusion process. By default this is set to 0.01. |
dt |
The diffusion scaling parameter (i.e., time steps). By default, this is set to 0.001. |
seed |
The value for the |
This function can be employed by the user to generate synthetic data, but its main purpose is to be used by the fitting procedure to generate model predictions for a set of parameter values when trying to find the best- fitting values.
Returns a data frame with three columns: rt (response time) in seconds, accuracy of the model's response (1 for correct, 0 for error), and congruency condition.
# declare the parameters
parms <- c(0.050, 0.300, 0.400, 0.040, 1.500)
# simulate the data
modelData <- simulateSSP(parms, nTrials = 10000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.