Skip to content

0.3.3

Choose a tag to compare

@DominiqueMakowski DominiqueMakowski released this 26 Sep 08:05
· 32 commits to main since this release
991dd99

First CRAN update since 0.3.0. It includes the development versions 0.3.1 and 0.3.2, which were never released separately. Full details are in NEWS.md.

Highlights

  • Warm starts for repeated fits. cogmod_warmstart() takes the step size and metric that one fit's warmup adapted, labels them, and maps them onto another model - a larger sample, a new formula, a cluster job. cogmod_priors(warmstart = ) can re-centre the priors on a pilot's posterior.
  • Censored reaction times. brms's cens() now works on the RT-only families, and every censorable family gains a pcogmod_*() CDF.
  • New between-trial variability parameters: sigmandt for cogmod_invgaussian(), and sigmabias (a start-point range) for cogmod_lognormal() and cogmod_lnr().
  • Priors and inits for the rating families. cogmod_priors() now covers cogmod_choco(), cogmod_betagate() and cogmod_betadiscrete(), which previously got flat or mismatched defaults. cogmod_inits() covers cogmod_choco() and cogmod_betadiscrete().
  • Data checks before anything compiles. cogmod_priors() checks the response against the family, including dpars pinned at a boundary that would make the likelihood -Inf. Otherwise these only show up as CmdStan's unhelpful "Initialization failed".

Numerics and speed

  • Exact gradients. The RDM, shifted Wald, GEG, ex-Gaussian, LNR and log-normal compute their normal tails through one shared, exact routine. Stan's built-ins gave approximate partials or non-finite gradients in the tails. A new CI job checks every family's gradient against finite differences.
  • Faster 7-parameter DDM. It is 1.7x cheaper per gradient when both sigmabias and sigmandt are estimated.
  • Faster DDM simulation. rcogmod_ddm() is 3x faster, and no longer returns the odd 10-40 s response.
  • Fewer RDM failures. cogmod_rdm() no longer produces hundreds of divergent transitions, and no longer freezes one chain in four on a cold start.
  • dcogmod_ddm() fixes. It and everything built on it (log_lik(), loo(), p_outlier()) are now accurate when the sigmandt range reaches down to fast decision times.

Breaking changes

  • cogmod_lba2() now truncates each drift rate at zero, as rtdists, DMC, EMC2 and ggdmc do.
  • The default ndt prior is wider: normal(-1.2, 0.5) on the log scale, in place of an SD of 0.2 (still centred on 0.30 s).

Fits from 0.3.0 that used either of these will not reproduce exactly.