Repository navigation
First CRAN update since 0.3.3. It includes the development versions 0.3.4 and 0.3.5, which did not go to CRAN on their own. Full details are in NEWS.md.
Highlights
- A faster and more accurate DDM. When
sigmabiasandsigmandtare fixed at 0,cogmod_ddm()no longer calls Stan'swiener_lpdf(). Its Stan likelihood is now the Navarro and Fuss (2009) series thatdcogmod_ddm()already used. Withsigmadriftestimated it costs 0.29x what it did per gradient in CmdStan. The classic model, with all three variabilities at 0, got cheaper in two steps: 0.77x per gradient in 0.3.5, then 0.86x of that in 0.3.6. Stan's 5-parameter form was off by up to a log unit per trial in the tails. The new density agrees with an independent reference to about 1e-11, solog_lik(),loo()andp_outlier()now score each trial by the density the model was fitted with. - Warm starts across backends.
cogmod_warmstart()now reads fits frombrms's newstanlibackend (inbrms's development version). A pilot fitted withcmdstanrorstanlican warm-start a fit with either, andcogmod_inv_metric()andcogmod_step_size()work with both. - LBA fixes.
cogmod_lba2()'s density could be NaN, which Stan counts as a divergent transition. The LBA densities no longer drop to-Infwhere they are merely small, which had handed slow responses to the outlier component. Their gradients are now exact in the tails, at the same cost per gradient.cogmod_lba1()gets the same fixes. - New article, Comparison with Other Packages, setting
cogmodbesidebrms's native families andbmm.
Breaking changes: default priors
cogmod_priors() returns different priors in these cases, so a model refitted under 0.3.6 is not the model it was under 0.3.3:
poutlieris centred at 0.25% instead of 0.7%:normal(-6, 1)on the logit link, orexponential(280)when it is left out ofbf(). This affects every family with an outlier component.boundarygets a prior incogmod_ddm(),cogmod_invgaussian(),cogmod_exwald()andcogmod_bisa(), wherebrmsleft it flat (an improper prior on asoftpluslink). Its slopes getnormal(0, 0.5)and its group-level SDsexponential(1). The DDM'sbiasgets the same on its slopes and group-level SDs.- Smooth terms. The prior on a smooth's SD (
sds) is now in link units, scaled to each smooth's basis. Before, it was a fixedexponential(1), whose meaning depended on the basis. The unpenalised part of a smooth (bs_*) on a dpar the family names gets that dpar's slope prior, also in link units. Any model with a smooth gets different priors. - Race families (
cogmod_lnr(),cogmod_rdm(),cogmod_lba2()):mu's group-level SD getsexponential(1), like the other accumulator's, so the prior no longer depends on thedec()coding.
Starting values
Starting values do not change a posterior, so no fitted model needs revisiting for these.
cogmod_inits()now coverscogmod_betagate(), socogmod_inits()andcogmod_priors()now cover the same families.- In
cogmod_lnr()andcogmod_lba2(), the error accumulator starts slower than the correct one, ascogmod_rdm()'s already did. - The jitter that spreads the chains apart is now scaled by how far each coefficient's design column reaches. A slope on a wide covariate, or a smooth's linear part, no longer tilts the starting surface. A smooth's SD starts at 0.1 link units of wiggle.
Other fixes
dcogmod_ddm()keeps its relative precision when the start point is next to the far boundary.cogmod_inits()keeps one-element vectors one-dimensional (for example the SD of(1 | Study)).stanlineeds this;cmdstanrcorrected it silently.dcogmod_lba1()no longer returns-Inffor strongly negative drifts. Fitted models were not affected.
Documentation
- The warm-start documentation said that a supplied metric keeps adapting during a short warmup. Because of a Stan bug, Stan never re-estimates the metric when warmup is under 150 iterations.
?cogmod_warmstartand the performance article now say so. ?cogmod_priorsand?cogmod_initsare rewritten, with one table of every priorcogmod_priors()sets.?rcogmod_exwaldand the RT article explain why chains ofcogmod_exwald()can settle in different modes.- The performance article has a section on
stanli, fitted withbrm(backend = "stanli"). - The website moved to https://dominiquemakowski.com/cogmod/.