payampiray/cbm

model_hybrid state 2 initalization

Closed this issue · 1 comments

I'm relatively new to modeling in the two-step task and I wanted to thank you for your amazing resource!

I was going through your code on model_hybrid.m and think there may be an error in how the second state is defined on line 31. Specifically, the dataset you provide codes choice2 as either 1 (left) or 2 (right), but the code on line 31 seems to want choice2 values that are 3 or 4. Additionally, the data you provide already includes the second state information so I'm not sure why it would be needed to infer it from the choice2 values.

Sorry if I'm missing something obvious and I've made an error, but in the off chance I didn't I wanted to raise this with you.

Thanks Joey for reporting this issue. I just saw your comment, sorry for the delay (I guess I should update my github setting to send me an email if an issue raised). You are absolutely right, I fixed that bug in model_hybrid.m.