MyNixOS website logo
Description

Diffusion Model of Conflict (DMC) in Reaction Time Tasks.

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. Ulrich et al. (2015) <doi:10.1016/j.cogpsych.2015.02.005>. Decision processes within choice reaction-time (CRT) tasks are often modelled using evidence accumulation models (EAMs), a variation of which is the Diffusion Decision Model (DDM, for a review, see Ratcliff & McKoon, 2008). Ulrich et al. (2015) introduced a Diffusion Model for Conflict tasks (DMC). The DMC model combines common features from within standard diffusion models with the addition of superimposed controlled and automatic activation. The DMC model is used to explain distributional reaction time (and error rate) patterns in common behavioural conflict-like tasks (e.g., Flanker task, Simon task). This R-package implements the DMC model and provides functionality to fit the model to observed data. Further details are provided in the following paper: Mackenzie, I.G., & Dudschig, C. (2021). DMCfun: An R package for fitting Diffusion Model of Conflict (DMC) to reaction time and error rate data. Methods in Psychology, 100074. <doi:10.1016/j.metip.2021.100074>.

DMCfun

R/Cpp implementation of the diffusion process model (Diffusion Model for Conflict Tasks, DMC) presented in Automatic and controlled stimulus processing in conflict tasks: Superimposed diffusion processes and delta functions (https://www.sciencedirect.com/science/article/pii/S0010028515000195)

CRAN https://cran.r-project.org/web/packages/DMCfun/index.html

The package is presented in the following paper:

https://www.sciencedirect.com/science/article/pii/S259026012100031X

Installation

# install version from CRAN
install.packages("DMCfun")
library(DMCfun)

# install version from  GitHub
# install.packages("devtools")
devtools::install_github("igmmgi/DMCfun")

Basic Examples DMC Simulation

dmc <- dmcSim(fullData = TRUE)
plot(dmc)

dmc$means
  Comp   rtCor sdRtCor perErr rtErr sdRtErr
1 comp    440.   105.   0.633  479.   104.
2 incomp  459.    94.8  1.38   406.    95.2
dmc <- dmcSim(fullData = TRUE, tau = 150)
plot(dmc)

dmc$means
  Comp   rtCor sdRtCor perErr rtErr sdRtErr
1 comp    421.    90.4  0.259  504.   119.
2 incomp  484.   103.   2.37   425.    82.7
params <- list(tau = seq(20, 170, 10))
dmc <- dmcSims(params)
plot(dmc, ncol = 2, col = c("red", "green"))

Basic Examples DMC Fit: Real data using optimx (Nelder-Mead)

fit <- dmcFit(flankerData) # flanker data from Ulrich et al. (2015)
plot(fit, flankerData)

summary(fit)
    amp   tau   drc  bnds resMean resSD aaShape spShape sigm  rmse
1  19.3  98.8 0.593  55.8    325.  28.4    2.26    2.84     4  8.91
fit <- dmcFit(simonData) # simon data from Ulrich et al. (2015)
plot(fit, simonData)

    amp   tau  drc  bnds resMean resSD aaShape spShape sigm  RMSE
1 16.91 47.77 0.59 56.68  317.16 33.43    1.68    3.53    4 10.01

Basic Examples DMC Fit: Real data using DEoptim

fit <- dmcFitDE(flankerData) # flanker data from Ulrich et al. (2015)
plot(fit, flankerData)

summary(fit)
    amp    tau  drc  bnds resMean resSD aaShape spShape sigm RMSE
1 17.26 222.19 0.64 57.49  328.06 28.41     1.7    2.18    4 5.79
fit <- dmcFitDE(simonData) # simon data from Ulrich et al. (2015)
plot(fit, simonData)

    amp   tau  drc  bnds resMean resSD aaShape spShape sigm RMSE
1 14.31 42.29 0.55 57.54  308.63 25.98    2.15    3.56    4 8.86
Metadata

Version

3.5.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows