LDDMM {lddmm}R Documentation

Drift Diffusion Model Fit

Description

Main function for the Gibbs sampler for the drift-diffusion model. Note that priors are noninformative and calibrated so that, for the most stable performance, the response times (variable r_time in the data dataframe) should lie between 0 and 10.

Usage

LDDMM(
  data,
  hypers,
  cluster = TRUE,
  boundaries = "flexible",
  Niter = 5000,
  burnin = 2000,
  thin = 5
)

Arguments

data

dataframe with the following columns:

  • subject: vector of size n containing the participant labels

  • block: vector of size n containing the training blocks (longitudinal units)

  • s: vector of size n containing the stimuli

  • d: vector of size n containing the decisions

  • r_time: vector of size n containing the response times. To avoid numerical issues, the unit of measurement should be such that the numerical values of most response times should lie between 0 and 10

  • cens: vector of size n containing the censoring indicators (1 censored, 0 non censored)

hypers

hyperparameters of the MCMC: list containing "s_sigma_mu" and "s_sigma_b", which are the smoothness parameters for drifts and boundaries, respectively)

cluster

should clustering be used? (default = TRUE)

boundaries

whether to fit the unrestricted model (flexible), assume constant boundaries over time (constant) or fix the boundaries to the same level across predictors (fixed)

Niter

total number of iterations

burnin

burnin of the chain

thin

thinning factor

Value

List with the following MCMC posterior samples:


[Package lddmm version 0.4.2 Index]