Biased response generation

10 views
Skip to first unread message

gong xuanjun

unread,
Oct 10, 2021, 6:51:01 PM10/10/21
to hddm-users

When specifying drift rate equals to 0, the generated data has biased response toward correct response (response == 1).
I would assume the probability of correct response and error response would be equal when the drift rate is 0. However, this does not seem to be the case in simulated datasets.

I tried generate from cdf.
I wonder if this issue is going to influence the MC sampling process.

To reproduce:

```

test_rts_list_drift = []
prob_resp_drift = []
for i in range(200):
    test_rts = hddm.generate._gen_rts_from_simulated_drift(test_param, 200, 0.0001, intra_sv=1.0)[0]
    test_rts_list_drift.append(test_rts)
    prob_resp_drift.append(sum(test_rts > 0)/test_rts.shape[0])
plt.hist(prob_resp_drift)

# cdf generation
test_rts_list_cdf = []
prob_resp_cdf = []
for i in range(200):
    samples = hddm.generate.gen_rand_data(test_param, size=n_samples)[0]
    test_rts_list_cdf.append(test_rts)
    samples = hddm.utils.flip_errors(samples)
    samples_list.append(samples)
    
    prob_resp_cdf.append(sum(samples.response==0)/samples.shape[0])


plt.hist(prob_resp_drift)

plt.hist(prob_resp_cdf)
```

However, it seems the estimated drift rate is not biased as the probability of response.

Reply all
Reply to author
Forward
0 new messages