simulateDSTP: Obtain simulated response times and accuracy from the DSTP...

Description Usage Arguments Details Value Examples

Description

simulateDSTP generates synthetic data from the DSTP model in the form of response time (RT) in seconds and accuracy for both congruent and incongruent trials.

Usage

1
simulateDSTP(parms, nTrials, var = 0.01, dt = 1/1000, seed = NULL)

Arguments

parms

The set of parameters to use to simulate the data. Must be contained in a vector in the order: A, C, driftTarget, driftFlanker, diftStimSelection, driftRS2, ter.

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 set.seed function to set random generation state.

Details

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.

Value

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.

Examples

1
2
3
4
5
# declare the parameters
parms <- c(0.070, 0.086, 0.045, 0.065, 0.368, 1.575, 0.225)

# simulate the data
modelData <- simulateDSTP(parms, nTrials = 10000)

JimGrange/flankr documentation built on May 7, 2019, 10:51 a.m.