Lapse rates for model fitsΒΆ

When fitting models, especially when doing so with likelihood, it is useful to have a constant lapse rate in the model to prevent the likelihood from being negative infinity. PyDDM has two useful built-in lapse rates for this which are used as mixture models: an Exponential lapse rate (according to a Poisson process, the recommended method) and the Uniform lapse rate (which is more common in the literature). These can be introduced with:

from pyddm import Model
from pyddm.models import OverlayPoissonMixture, OverlayUniformMixture
model1 = Model(overlay=OverlayPoissonMixture(pmixturecoef=.05, rate=1))
model2 = Model(overlay=OverlayUniformMixture(umixturecoef=.05))

If another overlay is to be used, such as OverlayNonDecision, then an OverlayChain object must be used:

from pyddm import Model
from pyddm.models import OverlayPoissonMixture, OverlayNonDecision, OverlayChain
model = Model(overlay=OverlayChain(overlays=[OverlayNonDecision(nondectime=.2),
                                             OverlayPoissonMixture(pmixturecoef=.05, rate=1)]))