EZ_diffusion.Rd
Function that estimates the parameters of the EZ-diffusion model (Wagenmakers, van der Mass, Grasman, 2007) using the mean and variance of all response times and the proportion correct.
EZ_diffusion(
x,
number_of_trials = NA,
within_trial_variability = 0.1,
suppress_warnings = FALSE
)
A numeric vector with 1) the mean for the response times (over both correct and incorrect trials), 2) the variance for the response times (over both correct and incorrect trials), and 3) the proportion of correct responses.
An optional integer value given the total number of trials. When supplied, allows an edge correction to be implemented if the proportion correct is 0, 0.5, or 1 (parameters cannot be estimated in those cases without an edge correction).
A numeric value governing the within-trial variability for the evidence accumulation process. If set to 0.1, assumes the mean and variance for response times are in seconds.
Logical; if TRUE
suppresses
warnings of when an edge correction was necessary.
A vector with the estimates for the drift rate, bias (assumed fixed to 0.5), boundary separation, and non-decision time.
Wagenmakers, E.-J., van der Mass, H. L. J., & Grasman, R. P. P. P. (2007). An EZ-diffusion model for response time and accuracy. Psychonomic Bulletin & Review, 14 (1), 3 - 22. DOI: 10.3758/BF03194023
# Vector with mean RT, RT variance, P(Correct)
# using values from web app
x <- c( 0.723, 0.112, 0.802 )
round( EZ_diffusion( x ), 3 )
#> drift_rate bias boundary_sep non_decision_time
#> 0.10 0.50 0.14 0.30
# Edge correction for 100% accuracy
x <- c( 0.723, 0.112, 1.00 )
round( EZ_diffusion( x, number_of_trials = 100 ), 3 )
#> drift_rate bias boundary_sep non_decision_time
#> 0.217 0.500 0.244 0.166