NEWS.md

cogmod 0.3.6

New features

Performance

Bug fixes

Documentation

cogmod 0.3.5

Breaking changes

All three change the priors cogmod_priors() returns, so a model refitted under 0.3.5 is not the model it was under 0.3.4.

Bug fixes

Changes to starting values

Performance

Documentation

The measurements are in benchmarks/exwald_modes/. The split the driftone_priors refits showed is one chain in the second solution, held there by a valley of 12 log-density units. The density is exact across the seam where it changes branch. On data simulated from the ex-Wald itself the second mode was present in every data set from 2,000 to 32,000 trials, and its valley grew with the data.

cogmod 0.3.4

Breaking changes

Changes to starting values

Documentation

cogmod 0.3.3

New features

Bug fixes

std_normal_lcdf() is not used for this, although it has the range - its value is exact against pnorm(log.p = TRUE) as far as x = -1e7. Its analytic partials are not: on 20000 responses they sat 1.7e-3 from central differences of the log probability where the erfc route sat 4e-6, and in a race those partials are the gradient of nu and sigma.

Where the old code's gradient was finite it was not always right. On 20000 responses with a start-point range it sat 8.3e-4 from central differences and the new one sits 9.6e-7, which is the finite differences' own noise; without a start-point range both sit at 4.1e-6, so nothing there was given up for it.

Sampling is not slower in the case most models are in. cogmod_lognormal_acc_logcdf() and cogmod_lognormal_acc_logsurv() now take the single tail they were asked for when sigmabias = 0, instead of building the pair and discarding one: the two share no work there, and cogmod_lnr() reads the survival alone. On 20000 responses a gradient of the plain LNR came out about 20% cheaper than before and one with a start-point range about 15% dearer, the latter buying the corrected gradient above.

Documentation

cogmod 0.3.2

New features

Bug fixes

Breaking changes

cogmod 0.3.1

New features

Under the hood every censorable family gets a <family>_lcdf and a <family>_lccdf beside its _lpdf, generated from two new registry slots so a family cannot drift out of step with itself. The survivals are written as survivals - never as log(1 - exp(lcdf)) - and the half Normal outlier's through std_normal_lcdf(-z) rather than std_normal_lccdf(z), which is -inf from 1.66 s on: the two places bmm's implementation broke. With sigmadrift > 0 the Wald CDF has no closed form and is taken by 64-point Gauss-Legendre quadrature over the drift, in R and Stan alike off one node table.

It stops where the offending rows would make the fit impossible or wrong in a way Stan cannot report: a non-positive reaction time under a family that places no density below ndt; a response outside [0, 1] for cogmod_choco() or cogmod_betagate(); a non-integer rating for cogmod_betadiscrete(); a non-numeric response; and a third level in dec(), which the choice families would otherwise fold silently into option 1, since their Stan code tests dec == 0 and takes the else branch for everything else.

It warns about the rest: a median implying milliseconds, NAs, and either tail running past what poutlier can absorb. The tails are judged as proportions rather than counts, because the outlier component is supposed to produce the occasional fast response - rcogmod_lognormal(200, ndt = 0.2, poutlier = 0.02) puts one at 81 ms - and a count-based test fires on the package's own generator. Over 20000 draws the component sends 0.8% of responses below 0.1 s at poutlier = 0.02 and 1.9% at 0.05, the top of the default prior, so the warning sits at 5%.

Families with neither ndt nor poutlier - cogmod_exgaussian() and cogmod_geg() - are exempted from the tail checks, and a non-positive response is a warning rather than an error there, their support being the whole real line. A formula or family the check cannot read is passed through untouched, so brms's own error is what the user sees.

Bug fixes

Performance

Documentation

Breaking changes

The truncation has one cost, and cogmod_priors() now covers it: once an accumulator rarely wins, its drift and sigma are identified only through |drift| / sigma^2 (the truncated Normal converges to an Exponential along that ray), so a flat prior lets the drift run off - the vignette's error accumulator sat at -12 with an interval of -23 to -6.5. cogmod_priors() therefore puts normal(1, 2) on driftone and normal(0, 1.5) on its slopes, the treatment cogmod_lnr()'s nuone already had. Existing formulas that left driftone to brms get this prior on their next cogmod_priors() call.

cogmod 0.3.0



Try the cogmod package in your browser

Any scripts or data that you put into this service are public.

cogmod documentation built on Nov. 28, 2026, 1:08 a.m.