The drift is the mean rate of evidence accumulation, a(x, t). A GDDM
lets it depend on the current state x, on time, and on a covariate.
Terms are summed: pass one, or a list of several.
Details
gddm_drift_constant()a = mu. The textbook drift-diffusion drift. Free parametermu, identity link, so it is signed.gddm_drift_coherence()a = sign(C) mu (|C| / cmax)^alpha, the coherence nonlinearity of Shinn et al. (2020). The covariateCis supplied throughvreal()andcmaxscales it. Free parametersmu(identity link) andalpha(log link).gddm_drift_leak()a = -leak x, added to whichever base term is used. Positiveleakis leaky integration, which pulls the accumulator back toward zero; negativeleakis unstable integration, which pushes it away. Identity link. Note the sign is the paper'sland the negative of PyDDM'sleak.
Exactly one base term, gddm_drift_constant() or
gddm_drift_coherence(), must be present and must come first, because
it supplies mu, the parameter that receives the model formula.
Writing your own
A drift term is the value of gddm_drift_term(). Its fn is called on
the tape as fn(x, t, p, cov) where x is the accumulator state at the
grid nodes in the original coordinate, t is the time as a plain
number, p is a named list holding one value of each free parameter for
the condition being solved, and cov is that condition's vreal()
values. It returns the drift at each node, and must contain no
comparison against a parameter.