Stan with Stata, Part VI: More about HMC
Last time I discussed the HMC (Hamiltonian Monte Carlo or Hybrid Monte Carlo) algorithm that forms the basis of Stan and I likened the algorithm to kicking a marble around in a bucket. The multi-dimensional shape of the bucket is defined by minus the log-posterior and the marble represents the current value of the estimator. We give […]
Stan with Stata, Part V: Kicking a marble around in a bucket
In the last few postings I have described how the Bayesian analysis program, Stan, can be called from within Stata. Before we can go any further we have to understand how Stan works, which is to say we need to understand the basics of Hamiltonian Monte Carlo, as this is Stan’s way of sampling from the posterior. I’ll start […]
Stan with Stata, Part IV: Automation
Last time I presented a very basic do file for running Stan from within Stata and although the program worked, there were places where we had to find work-arounds that meant that the process was not fully automatic. In particular, we had to write the script manually, we used Stata’s shell command to run the compiled code and we had to copy […]
Stan with Stata, Part III: A first attempt
This week I am going to present a program that runs Stan from within Stata, but in this version, there will be a minimum of automation. Next time, I will modify the wbs programs, designed for running WinBUGS, so that they will also work with Stan and at that stage the process will be simpler to use but less transparent. We […]
Stan with Stata, Part II: installing and testing Stan
This week I want to install Stan on a Windows computer and check the installation independently of Stata, so that next week we can move on to controlling Stan from within Stata. Stan has several flavours, for instance, there is an R package that controls Stan, but for us the important version is the stand alone […]
Stan with Stata (Part 1): A plan of action
In the book ‘Bayesian Analysis with Stata’ I described how we can fit a Bayesian model using Stata to control WinBUGS and OpenBUGS and last year, in this blog, I showed how the same approach could be used to control another BUGS-like program called JAGS. So, currently, we have a choice of three programs for […]
Easter Trailer: Stan is coming
No Stata code this week because of the Easter break, so I thought that I would take the opportunity to trail a couple of the topics that I will be covering over the coming months. It is unusal for me to plan ahead in this way but I have been investigating a Bayesian analysis program […]
Recent Comments