EZ2: Fit diffusion model to observed sample moments

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Fit the a simplified diffusion model for response time and accuracy to observed proportions of errors and response time means and variances.

Usage

1
EZ2(pstart, ObsValPair, ..., method = "Nelder-Mead", control = list(), hessian = FALSE)

Arguments

pstart

Vector with named starting parameter values

ObsValPair

Observed-predicted value pair in the form 0.80 ~ EZ2.pe(v1, z, a) or vrt2 ~ EZ2.pe(v2, a-z, a) if vrt2 exists in the global environment and is numeric

...

More Observed-predicted value pairs (as many as desired, see example)

method

See method parameter of optim.

control

See control parameter of optim.

hessian

See hessian parameter of optim.

Details

EZ2 fits a simplified version of the diffusion model for human and monkey response times and accuracy to the means and variances of the observables. This model of information accumulation and decision is a simplified version of Ratcliff's diffusion model (1978).

Use EZ2batch for more user friendly fitting automatically each row in a data.frame.

Value

The list returned by optim. This list contains

par

A vector containing the estimates

value

Sum of squared prediction errors. This should be very close to zero (order of 1e-8) if there are as many observed-predicted moment value pairs as there are unknown parameters (the estimates then constitute method of moments estimators).

For other list members, see Value section of optim for a complete description.

Author(s)

Raoul P. P. P. Grasman

References

Ratcliff, R. (1978). Theory of Memory Retrieval. Psychological review vol. 85 (2) pp. 59-108

Grasman, R. P. P., Wagenmakers, E.-J., & van der Maas, H. L. J. (2007). On the mean and variance of response times under the diffusion model with an application to parameter estimation, J. Math. Psych. 53: 55–68.

See Also

EZ2-package, EZ2batch

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 Vrt0 <- EZ2.vrt(0.1, 0.08, 0.12)
  Pe0 <- EZ2.pe(0.1, 0.08, 0.12)
 Vrt1 <- EZ2.vrt(0.15, 0.12-0.08, 0.12)
  Pe1 <- EZ2.pe(0.15, 0.12-0.08, 0.12)
  
 EZ2(c(v0=.156,v1=.0844,z=.0631,a=.1263), 
 Vrt0 ~ EZ2.vrt(v0,z,a), 
  Pe0 ~ EZ2.pe(v0,z,a), 
 Vrt1 ~ EZ2.vrt(v1,a-z,a), 
  Pe1 ~ EZ2.pe(v1, a-z, a))

EZ2 documentation built on May 2, 2019, 6:20 p.m.