dmcSim {DMCfun}R Documentation

dmcSim

Description

DMC model simulation detailed in Ulrich, R., Schroeter, H., Leuthold, H., & Birngruber, T. (2015). Automatic and controlled stimulus processing in conflict tasks: Superimposed diffusion processes and delta functions. Cognitive Psychology, 78, 148-174. This function is essentially a wrapper around the c++ function runDMC

Usage

dmcSim(
  amp = 20,
  tau = 30,
  drc = 0.5,
  bnds = 75,
  resDist = 1,
  resMean = 300,
  resSD = 30,
  aaShape = 2,
  spShape = 3,
  sigm = 4,
  nTrl = 1e+05,
  tmax = 1000,
  spDist = 0,
  spLim = c(-75, 75),
  spBias = 0,
  drDist = 0,
  drShape = 3,
  drLim = c(0.1, 0.7),
  rtMax = 5000,
  fullData = FALSE,
  nTrlData = 5,
  nDelta = 9,
  pDelta = vector(),
  tDelta = 1,
  nCAF = 5,
  printInputArgs = TRUE,
  printResults = TRUE,
  setSeed = FALSE,
  seedValue = 1
)

Arguments

amp

amplitude of automatic activation

tau

time to peak automatic activation

drc

drift rate of controlled processes

bnds

+- response criterion

resDist

residual distribution type (1=normal, 2=uniform)

resMean

residual distribution mean

resSD

residual distribution standard deviation

aaShape

shape parameter of automatic activation

spShape

starting point (sp) shape parameter

sigm

diffusion constant

nTrl

number of trials

tmax

number of time points per trial

spDist

starting point (sp) distribution (0 = constant, 1 = beta, 2 = uniform)

spLim

starting point (sp) range

spBias

starting point (sp) bias

drDist

drift rate (dr) distribution type (0 = constant, 1 = beta, 2 = uniform)

drShape

drift rate (dr) shape parameter

drLim

drift rate (dr) range

rtMax

limit on simulated RT (decision + non-decisional component)

fullData

TRUE/FALSE (Default: FALSE) NB. only required when plotting activation function and/or individual trials

nTrlData

Number of trials to plot

nDelta

number of delta bins

pDelta

alternative to nDelta by directly specifying required percentile values (0-100)

tDelta

type of delta calculation (1=direct percentiles points, 2=percentile bounds (tile) averaging)

nCAF

Number of CAF bins

printInputArgs

TRUE/FALSE

printResults

TRUE/FALSE

setSeed

TRUE/FALSE If true, set seed to seed value

seedValue

1

Value

dmcSim returns an object of class "dmcsim" with the following components:

sim

Individual trial data points (reaction times/error) and activation vectors from simulation

summary

Condition means for reaction time and error rate

caf

Accuracy per bin for compatible and incompatible trials

delta

Mean RT and compatibility effect per bin

delta_errs

Mean RT and compatibility effect per bin

prms

The input parameters used in the simulation

Examples


# Example 1
dmc <- dmcSim(fullData = TRUE)  # fullData only required for activation/trials (top/bottom left)
plot(dmc)
dmc <- dmcSim() # faster!
plot(dmc)

# Example 2
dmc <- dmcSim(tau = 130)
plot(dmc)

# Example 3
dmc <- dmcSim(tau = 90)
plot(dmc)

# Example 4
dmc <- dmcSim(spDist = 1)
plot(dmc, "delta")

# Example 5
dmc <- dmcSim(tau = 130, drDist = 1)
plot(dmc, "caf")

# Example 6
dmc <- dmcSim(nDelta = 10, nCAF = 10)
plot(dmc)



[Package DMCfun version 2.0.2 Index]