sinistra-core
The simulation and parameter-recovery core of sinistra — a drift-diffusion model (DDM) toolkit for cognitive-science research.
use ;
let truth = new; // drift, boundary, start, non-decision time
let trials = simulate_n; // parallel, deterministic for a given seed
let ez = ez_diffusion.unwrap; // closed-form (Wagenmakers et al., 2007)
let sim = fit_simulation.unwrap; // simulation-based
simulate_trial/simulate_n— Euler–Maruyama diffusion,dt = 1 ms, 10 s cap;simulate_nruns across all cores and is bit-reproducible for a seed (per-trial ChaCha8 cipher streams).ez_diffusion— closed-form inversion of(accuracy, mean RT, RT variance).fit_simulation— Nelder–Mead search that re-simulates the model at each candidate; no closed-form approximation, so no discretization bias.summary_stats— the one(Pc, MRT, VRT)reduction both estimators share.
Full write-up, benchmarks, and a real-data analysis: the repository.
License
MIT.