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 […]
MCMCglmm in Stata (Part 2)
Last time, I showed how we can write R code for fitting a Bayesian Generalized Linear Mixed Model and insert it into a Stata do file, so that the computation is performed by the R program, MCMCglmm, while the results are available in Stata. The drawback of that approach is that it requires the user […]
Software Updates
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. […]
MCMCglmm in Stata (Part I)
I always advise students not to tie themselves to one piece of statistical software, even when it is as good as Stata. It is inevitable that whichever statistical package they choose, there will be tasks that are easier in another program or analyses that their favourite does not offer. The problem with this advice is that it takes […]
Bayesian analysis with Stata 14
Keen Stata users will be aware that Stata 14 was released this week. I got a email flyer advertising the new release and the lead item was the fact that Bayesian analysis is now part of official Stata. I have been campaigning for wider use of Bayesian methods and the fact that Stata now offers […]
Poisson regression with two random effects: MCMC by data augmentation Part II
Most of my postings are based on bits of code that were produced for other reasons; perhaps for my teaching or for my research or sometimes they are left over from when I was writing the book on Bayesian Analysis with Stata. So typically I spend a couple of hours each week on the blog; […]
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 […]
Poisson regression with two random effects: MCMC by data augmentation
When I restarted this blog after the Christmas break I resolved to concentrate more on straightforward applications of Bayesian analysis with Stata; I believe that is what most Stata users are interested in. A couple of months in and I am going to ignore my good intensions and discuss a topic that I considered too […]
Poisson regression with two random effects: Better Mata code
Last time I presented a basic Mata program for fitting a Poisson model with two random effects to some epilepsy data. The program was faster that its Stata equivalent but slower than WinBUGS and the mixing was quite poor. This week I will try to improve the performance of the Mata program. It would make sense […]
Recent Comments