rtDist: rtDist

View source: R/dmcData.R

rtDistR Documentation

rtDist

Description

Returns value(s) from a distribution appropriate to simulate reaction times. The distribution is a combined exponential and gaussian distribution called an exponentially modified Gaussian (EMG) distribution or ex-gaussian distribution.

Usage

rtDist(n = 10000, gaussMean = 600, gaussSD = 50, expRate = 200)

Arguments

n

Number of observations

gaussMean

Mean of the gaussian distribution

gaussSD

SD of the gaussian distribution

expRate

Rate of the exponential function

Value

double

Examples

# Example 1
x <- rtDist()
hist(x, 100, xlab = "RT [ms]")

# Example 2
x <- rtDist(n=2000, gaussMean=500, gaussSD=100, expRate=300)
hist(x, 100, xlab = "RT [ms]")


DMCfun documentation built on Sept. 17, 2024, 1:07 a.m.