I have generated some data using the rwiener function and the following parameters:
[s1] Alpha: 0.940 Beta: 0.354 Delta: 0.104 Tau: 0.371
[s2]Alpha: 1.01 Beta:0.183 Delta: 0.105 Tau: 0.373
However, when I put the data through my basic drift diffusion model of 4 parameters, which uses the function wiener_lpdf, it fails to recover the true delta value, and gives me the following output:
Mean: [s1]0.5925061
[s2]0.4015847
sd: [s1]0.305563750
[s2]0.222346652
2.5%: [s1]0.13145667
[s2]0.09094771
25%: [s1]0.3604417
[s2]0.2319065
50%: [s1]0.5512207
[s2]0.3632976
75%: [s1]0.7792915
[s2]0.5300637
97.5%: [s1]1.2819739
[s2]0.9295888
n_eff: [s1]7046.331
[s2]8127.745
R-hat: [s1]0.9998943
[s2]0.9998650
The parameters are specified like this
parameters {
real raw_alpha[N_SUBJECTS];
real raw_beta[N_SUBJECTS];
real raw_delta[N_SUBJECTS];
real raw_tau[N_SUBJECTS];
}
transformed parameters {
vector<lower=0>[N_SUBJECTS] alpha_boundary_separation;
vector<lower=0, upper=1>[N_SUBJECTS] beta_initial_bias; // towards upper boundary
vector<lower=0>[N_SUBJECTS] delta_drift_rate; // towards upper boundary
vector<lower=RT_LOWER_BOUND, upper=max(min_rt)>[N_SUBJECTS] tau_nondecision_time;
for (s in 1:N_SUBJECTS) {
alpha_boundary_separation[s] = exp(
raw_alpha[s]
);
beta_initial_bias[s] = Phi_approx(
raw_beta[s]
);
delta_drift_rate[s] = exp(
raw_delta[s]
);
tau_nondecision_time[s] = Phi_approx(
raw_tau[s]
) * (min_rt[s] - RT_LOWER_BOUND) + RT_LOWER_BOUND;
}
}
And these are the priors (paremetized like this to allow bridgesampling)
model {
target += normal_lpdf(raw_alpha | 0, 1);
target += normal_lpdf(raw_beta | 0, 1);
target += normal_lpdf(raw_delta | 0, 1);
target += normal_lpdf(raw_tau | 0, 1);
}
I have no idea of what could be causing the problem, because diagnostics look fine. I’ve tried fixing all parameters but delta, and giving the parameters specific informative priors, but the estimation was still not right.
Thank you for reading. Any help will be much appreciated!