Over time my programs for Bayesian analysis with Stata evolve and, I hope, improve. Periodically, I update my webpage at https://www2.le.ac.uk/Members/trj to reflect these changes. There are three recent updates that might be of interest.
Philip Besuner contacted me to report an error in the logdensity.ado file when calculating the log-density for the lognormal distribution. It turned out that Philip had an old version of logdensity.ado, so to minimise the risk of this happening, I have updated all of the Bayesian Analysis with Stata ado files on my webpage.
Since the publication of the book I have made various enhancements to my ado files, such as allowing Stata to talk to JAGS as well as WinBUGS and OpenBUGS. These extensions require me to modify my ado files, for instance, there are new options in wbsscript.ado, which writes the script files. To avoid confusion I have created a version called wbsscript_v2.ado that includes the extra code. Eventually it will replace wbsscript.ado in the main release. I have made these enhanced versions available through my webpage and you are welcome to use them if you wish, although I still consider them to be under test.
Be aware that the new features are not properly documented, although they have all been described at various points in this blog. Next week I will start my description of the use of Stan with Stata and as part of that process I will make further changes to wbsscript.ado leading to wbsscript_v3.ado, so expect further updates very shortly. Those updates will be released with full documentation of all of the changes.
The changes to the ado files include an improved version of mcmcstats.ado called mcmcstats_v2.ado that has an option to display the effective sample size in place of the standard error of the mean and an option to use Newey-West standard errors in place of Prais regression standard errors. Newey-West standard errors are more reliable when there are long lag auto-correlations in the chain, as happens when convergence or mixing are poor.
Finally, I was contacted by Andres Reibel, who is reading the book and asked for do files for the case studies that I used for illustration. When I was writing the book, I wrote a do file for each chapter that contains all of the code for its illustrative examples. I have placed these do files on my webpages.