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.
LDDMM(
data,
hypers,
cluster = TRUE,
boundaries = "flexible",
Niter = 5000,
burnin = 2000,
thin = 5
)List with the following MCMC posterior samples:
post_mean_delta: posterior samples for the population offset parameters
post_mean_mu: posterior samples for the population drift parameters
post_mean_b: posterior samples for the population boundary parameters
post_ind_delta: posterior samples for the individual offset parameters
post_ind_mu: posterior samples for the individual drift parameters
post_ind_b: posterior samples for the individual boundary parameters
sigma2_mu_us: posterior samples for the random effects drift smoothness parameters
sigma2_mu_ua: posterior samples for the random effects drift variance parameters
sigma2_b_us: posterior samples for the random effects boundary smoothness parameters
sigma2_b_ua: posterior samples for the random effects boundary variance parameters
sigma2_1_mu: posterior samples for the drift smoothness parameters
sigma2_1_b: posterior samples for the boundary smoothness parameters
pred_ans: predicted population-level categories
pred_time: predicted population-level response times
pred_ans_ind: predicted individual-level categories
pred_time_ind: predicted individual-level response times
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)
hyperparameters of the MCMC: list containing "s_sigma_mu" and "s_sigma_b", which are the smoothness parameters for drifts and boundaries, respectively)
should clustering be used? (default = TRUE)
whether to fit the unrestricted model (flexible), assume constant boundaries over time (constant) or fix the boundaries to the same level across predictors (fixed)
total number of iterations
burnin of the chain
thinning factor