CCS-Lab / hBayesDM

Hierarchical Bayesian modeling of RLDM tasks, using R & Python
https://ccs-lab.github.io/hBayesDM
GNU General Public License v3.0
220 stars 113 forks source link

code issue in "bart_par4" #157

Open vincent5290 opened 1 year ago

vincent5290 commented 1 year ago

image In BART_par4 model, the formula is l - vk, the optimal number of pumps on trial k (paper, titled "Development ofa novel computational model for the Balloon Analogue Risk Task: The exponential-weight mean–variance model"). However, in stanfile of "BART_par4", line 73 d[j, k, l] ~ bernoulli_logit(tau[j] * (omega - l)); is omega - l. The code seems contrast to the formula.

lehlsy0904 commented 1 year ago

Hello, @vincent5290 !

the bernoulli_logit function in Stan employs the invert-logit function during the calculation of the logarithmic Bernoulli probability. This implies that the term omega - l does not pose any issues within the model structure. For more detailed information, please check the Stan Functions Manual (https://mc-stan.org/docs/functions-reference/bernoulli-logit-distribution.html) as well as a previous related issue (https://github.com/CCS-Lab/hBayesDM/issues/113) !

Feel free to reach out if you have any further concerns.