drift_simuls: Drift Diffusion Data Simulation

View source: R/drift_simuls.r

drift_simulsR Documentation

Drift Diffusion Data Simulation

Description

Simulates reaction times and binary decisions (0/1) from a set of DDM parameters. This function is not likelihood based, but executes all steps of the diffusion process. Can be used directly, but intended use is within the wrapper function simulDat. This function has been adapted from the python package "HDDM".

Usage

drift_simuls(params, samples = 500, dt = 1e-04, intra_sv = 1)

Arguments

params

A list of parameters which should at least contain 'a', 'v', 'z' and 't'. Inter trial variabilities can also be included: 'sv', 'sz' and/or 'st', in any combination.

samples

Amount of decisions to be simulated. Can be conceptualized as 'trials'.

dt

Function steps or 'resolution'. Should not be altered, but can.

intra_sv

Intra-trial variability. When simulating data with parameters fitted via Stan, then the value of 1 should be used. The implemented likelihood in Stan is calibrated to that value. When using parameters fitted with a Ratcliff procedure, then this value should be set to 0.1.

Value

A data frame with two columns, 'rt' and 'response', as long as 'samples'.


Seneketh/StanDDM documentation built on July 15, 2024, 5:01 p.m.