Repository navigation
Add gamma, Fréchet and lognormal drift distributions to the LBA - #565
Open
GidonFrischkorn wants to merge 8 commits into
Open
GidonFrischkorn wants to merge 8 commits into
GidonFrischkorn wants to merge 8 commits into
Conversation
Restores the gamma, Fréchet and lognormal trial-to-trial drift distributions on top of the normal-drift LBA: their entries in the spec table, R kernels and Stan chunks, their tests and benchmark fits, and their text in ?lba, ?lba_dist and NEWS. lba(distribution = ) and the d/p/q/rlba() functions accept them again.
# Conflicts: # NEWS.md
# Conflicts: # R/model_lba.R # man/lba.Rd
# Conflicts: # R/model_lba.R # man/lba.Rd
…ifts posterior_epred() now returns Inf where a race decays like t^-1.5 or slower, which is exact for the normal drift: there it means a single accumulator and an infinite mean. A gamma race decays like t^-k with k the sum of its shapes, so its mean is finite for k between 1 and 1.5. Until the threshold for the gamma, Frechet and lognormal drifts is settled, they keep the mean of the race truncated at 1e7 s and a warning with the number of observations affected.
# Conflicts: # R/model_lba.R # tests/testthat/test-model_lba.R
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the gamma, Fréchet and lognormal trial-to-trial drift distributions to the LBA from #500, which keeps only the normal drift. They come back through
lba(distribution = )and thedistributionargument ofdlba(),plba(),qlba()andrlba(): one spec entry, one Stan chunk and one set of R kernels per distribution, plus their tests, benchmark fits, the two "Numerical notes" in?lbaand the NEWS wording. The commit is the exact revert of the cut in #500, so the tree here is the LBA as it was before the split.Base and CI. The base is
race-lba(#500). No CI runs until #500 is merged and this PR is retargeted todev-1.6.0.Validation, per distribution
rtdists(run on 2c05f70):dlba()agrees withrtdists::dLBA()to 3.1e-15 (gamma), 8.0e-15 (Fréchet) and 1.2e-15 (lognormal), and to 1.8e-6 or better withspnear 0. Only the density is compared;plba()andrlba()are not checked againstrtdistsfor these three.sp / gap <= 6and within 5 nats above, as documented).rtdists::rLBA(), 2,000 trials, K = 2): every parameter inside its 95% interval, Rhat at most 1.0052, no divergences.Gaps
rtdistsand the R twin.sfixed. Its sdlog is scale-free, so shifting both meanlogs by log c and multiplyinggapandspby c leaves the likelihood unchanged (log-density change at most 1.8e-15 for c = 0.5, 2, 5). In the recovery run the posterior SD along that direction was 0.494, against 0.5 for the prior alone. So the "Identifiability ofs" section of?lbais wrong for the lognormal, andcheck_model()does not warn. A lognormal fit currently needsgaporspfixed in the formula.?lbaand cannot be fixed in bmm.