dRiftDM 0.3.1
CRAN release: 2025-12-01
Minor
For
type = "sep_b"inestimate_dm(): Chains are now initialized more robustly.We reverted back to adding the value
0.001tot_vecwhen evaluating DMC’s drift rate fora!=2(after noticing solver crashes with the former value of1e-5).It is now possible to pass a value via
ddm_opts()to objects of typedmc_dm(); this controls the value that is added tot_vecwhen evaluating DMC’s drift rate fora!=2.
dRiftDM 0.3.0
Important notes for users
- The workflow for estimating a model has changed with the introduction of
estimate_dm(). From this version onward, fits are not automatically saved to the file system to be reloaded later. Instead,estimate_dm()returns fitted objects directly, and you save the results yourselves.
Major and new features
dRiftDMnow uses an adaptive time-stepping scheme for deriving PDFs — substantially increasing speed.We now support variability in the drift rate for the constant drift-rate component (not only for the Ratcliff DDM).
plot()methods were redesigned to avoid argument clashes and to provide more customization options.drift_dm()objects gain a new entrycost_function. This lets us use the"rmse"statistic or full-range maximum likelihood, and it enables fitting aggregated data via"rmse".The
neg_log_likeentry of adrift_dmobject has been replaced by the more generalcost_value.cost_function()accessor and replacement methods have been introduced.cost_value()accessor and replacement methods have been introduced.estimate_dm()has been introduced.If possible,
dRiftDMnow provides reasonable starting values for the Nelder-Mead and BFGS optimization routines (both bounded and unbounded). To this end, EZ Diffusion parameter estimates are used whenever possible, in combination with grid-search-like procedure.estimate_model()has been deprecated and superseded byestimate_dm().estimate_model_ids()has been deprecated. Useestimate_dm(), which does not save individual fits to the file system — ensuring more consistent behavior across fitting modes.get_lower_upper()has been introduced. It provides default upper and lower parameter ranges for pre-built models and their components.Hierarchical and non-hierarchical Bayesian parameter estimation is now possible via
estimate_dm()! This is still experimental, and the returnedmcmc_dmtype is not fully integrated yet (currently: diagnostic checks and parameter extraction is supported).calc_stats()gainsbasic_statsanddensitiesoptions fortype.basic_statsreturns means, standard deviations, and choice proportions;densitiesreturns density values.calc_stats()gains aresampleoption to quantify variability in model predictions. We can resample for a given model or a single individual, or bootstrap an entire sample.calc_stats()argumentssplit_by_IDandaveragehave been superseded by the more generallevelargument.simulate_data()no longer returns RTs restricted to the time grid (step sizedt). PDFs are linearly interpolated for inverse transform sampling. We can control RT decimal places viaround_to.simulate_data()now supports thecondsargument.ssp_dm()gainsvar_non_decandvar_startto toggle variability in non-decision time and starting point.ssp_dm()now uses uniform variability in non-decision time, aligning more closely with the original publication.ssp_dm()defaultdxanddtincrease computation speed while balancing numerical error for many parameter values.dmc_dm()defaultdxanddtincrease computation speed while balancing numerical error for many parameter values.ratcliff_dm()defaultdxanddtincrease computation speed while balancing numerical error for many parameter values.check_discretization()has been introduced. This function helps us assess the loss in precision when increasingdtanddx.get_example_fits_ids()was removed.get_example_fits()has been introduced to obtainfits_ids_dm,fits_agg_dm, ormcmc_dmobjects.
Minor
nt_constant()now usesround()instead ofas.integer()to locate the Dirac delta index, reducing bias in non-decision time estimates.pdfs()now also returns a vector of the time domain.The
progressargument replacesverboseincalc_stats(default: 1).The
"fit_stats"option forcalc_stats()now returns multiple fit statistics, including log-likelihood, AIC, BIC, and root-mean-squared error.simulate_tracesnow properly considers trial-by-trial variability in the drift rate.
Bug and code fixes
-
calc_stats()is now more precise due to proper numerical integration.
dRiftDM 0.2.2
CRAN release: 2025-03-04
New features:
print()andsummary()methods are now available fortraces_dm,traces_dm_list,stats_dm,stats_dm_list, andcoefs_dmobjects.New
unpack_obj()makes it easy to strip away attributes and class labels of objects created by dRiftDM. The more specific predecessor functionunpack_traces()is now deprecatedunpack_traces().New
pdfs()provides access to a model’s predicted probability density function.
Minor improvements and changes:
coef.drift_dm()gains aselect_custom_prmsargument.list_stats_dmobjects are now calledstats_dm_listfor name consistency.traces_dmobjects now have additional attributes (which were required for appropriate print and summary methods).More consistent capitalization in
print.summary.*()methods.
