Every few weeks I try to find an hour or so to browse through the latest issues of the main statistics journals. This gives me the opportunity to read papers on topics that I know relatively little about; it is my way of keeping up to date with new developments beyond my day to day work on genetic epidemiology. Of course, it is only possible […]
Bayesian Analysis with Stata
Bayesian Experimental Design Part III
This week I am going to complete the discussion of Bayesian sample size calculation for a simple clinical trial. Here is the problem, a trial is to compare a corticosteroid cream with a placebo for patients with eczema on their hand. The measurement of response will be the patient’s rating of the severity of their eczema on a […]
Bayesian Experimental Design Part II
Last time I started to discuss Bayesian experiment design and to illustrate that discussion I presented a simple clinical trial comparing a corticosteroid cream with a placebo for patients with eczema. The measurement of response was to be the patient’s rating of the severity of their eczema on a 0-10 visual analogue scale (VAS). Patients would […]
Bayesian Experimental Design
Ever since I started this blog, I have intended discussing experimental design but so far I have ducked the issue, probably because I find sample size determination to be one of the least satisfying parts of a statistician’s job. Obviously, it is vitally important and sample size determination is certainly one of the most common […]
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 […]
wbslist update
Thanks to Ole-Petter Moe Hansen for pointing out a small bug in wbslist. The version released with my book would sometimes lose track of the format when listing a set of matrices. I managed to track down the source of the error. It seems that I had two counters, one tracking the matrices and the other […]
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 […]
Recent Comments