rlba {glba}R Documentation

Generate data from an LBA model.

Description

Generate data from an LBA model.

Usage

rlba(n, b, A, vs, s, t0, st0 = 0, truncdrifts = TRUE)

rlba2(nn, bnd, sp, drift, sddr, nond, st0 = 0)

Arguments

n

The number of random variates required.

b

The boundary parameter.

A

The start point parameter.

vs

The drift rates for each of the accumulators.

s

The standard deviation of the drift rates.

t0

The non-decision time.

st0

Variability of the non-decision time, uniformly distributed as t0+U(0,st0).

truncdrifts

Logical; whether drifts that are generated should be truncated at zero. Negative RTs may result when set to FALSE.

nn

The number of random variates required.

bnd

The boundary parameter.

sp

The start point parameter.

drift

The drift rates for each of the accumulators.

sddr

The standard deviation of the drift rates.

nond

The non-decision time.

Details

The rlba function is the one used by Brown and Heathcote; the rlba2 function is the fully vectorized version of the same function; both provide random variates under the lba distribution; rlba2 allows all the arguments to be vectors of length 'n' as required to enable simulation in the glba-package where potentially all parameters depend on covariates and are hence different for each datapoint.

Value

A data.frame with two variables, 'rt' and 'resp', for the response time and the response, respectively.

Author(s)

Ingmar Visser, function adapted from Brown and Heathcote, code extracted in 2015 from this website: http://www.newcl.org/publications/2008/lbasoftware.htm

References

Function adapted from Brown and Heathcote, code extracted in 2015 from this website: http://www.newcl.org/publications/2008/lbasoftware.htm

Examples

# to be added later

[Package glba version 0.3 Index]