I have a question related to it. If you could reply to me, I'll be very appreciated.
I'd like to also combine posterior plotting for some model components across the conditions.
Basically, I have 2 by 2 design. 2 different tasks (swapping/non_swapping) with 3 different difficultly levels(hard/middle/easy).
For the groups, that I coded as "task_type". For the task levels, that I coded as "stim". I've attached a screenshot from my data view.
I'd like to look at the posterior plotting differences between the two tasks(swapping/non_swapping).
I mean, I'd like to combine my task conditions (hard, middle, easy) for each task.
I can see my conditions separately now. I added the code below and attached the drift rate figure as an example.
But, I'm a little bit confused about how can I combine them. Any help would be appreciated.
plt.rcParams['font.size'] = '16'
plt.figure(figsize = (16,3))
plt.subplot(131)
v_Hard_swapping, v_Hard_non_swapping, v_Middle_swapping, v_Middle_non_swapping, v_Easy_swapping, v_Easy_non_swapping = best_model.nodes_db.node[['v(Hard.swapping)', 'v(Hard.non_swapping)', 'v(Middle.swapping)', 'v(Middle.non_swapping)', 'v(Easy.swapping)', 'v(Easy.non_swapping)']]
plot_posterior_nodes([v_Hard_swapping, v_Hard_non_swapping, v_Middle_swapping, v_Middle_non_swapping, v_Easy_swapping, v_Easy_non_swapping],
cols = ['#ff1493', '#ff1493', '#0070e0','#0070e0', '#dd0000', '#dd0000'], leg=False,
linestyles = ['-', '--', '-', '--', '-', '--'])
plt.xlabel('drift-rate ($v$)', fontsize = 15)
plt.ylabel('Posterior probability', fontsize = 15)
plt.legend(['hard swapping', 'hard non_swapping', 'middle swapping', 'middle non_swapping', 'easy swapping', 'easy non_swapping'],
bbox_to_anchor=(1,1), loc="upper left", prop={'size': 14})
plt.savefig('image_posterior_swapping_task.svg', format='svg', dpi=1200, bbox_inches='tight')
plt.show()