Entropy 2025, 27, 62 27 of 33
Figure 6. Chain traces. Each color signifies an individual chain.
Figure 7. Posterior estimates of the α parameter plotted against the prior for two synthetic subjects,
one from each group.
 
# Sample from the model prior
prior_chains = sample ( model , Prior (), 1000 )
# Rename parameters from the prior chains to match the posterior chains
renamed_prior_chains = rename_chains ( prior_chains , model )
# Plot the posterior and prior for the first subject
plot_parameters ( renamed_prior_chains [:,1:1,:], renamed_posterior_chains [:,1:1,:])
# Visualize the true alpha value
vline !([ data [1,: Alpha ]], line =: dash , color = : darkorange2 , label = " Generative Alpha ")
# Plot the posterior and prior for the last subject
plot_parameters ( renamed_prior_chains [:,10:10,:], renamed_posterior_chains [:,10:10,:])
# Visualize the true alpha value
vline !([ data [ 3000 ,: Alpha ]], line =: dash , color = : darkorange2 , label = " Generative Alpha ")
 
We then, as is often the case in computational psychiatry, wanted to compare the
distributions of parameter values between the two groups. We extracted the median of the
estimated posteriors for each subject and plotted them against the value used to generate