Abstract
AbstractThe methods for statistical analysis continue to advance; however, they remain susceptible to coding errors. This paper highlights the “neglecting the vectorization" error, which is a specific type of mistake made in calculating the marginal likelihood and Bayes factors (BFs) using vectorized truncated distributions with the Stan programming language. This error arises when the normalizing constant of the truncated distribution is not properly incremented for each element of a vectorized variable. Upon examination of publicly available Stan codes, it became evident that the inadequate coding methods were employed in a significant portion of studies. As the practical methods for calculating Bayes factors—such as bridge sampling—become increasingly prevalent, careful attention must be given to ensure proper model implementation.
Funder
Japan Society for the Promotion of Science
The University of Tokyo
Publisher
Springer Science and Business Media LLC