Merry Christmas This will be my last posting before Christmas and in January I will be abroad for a few weeks so I will not be posting again until February. I have several topics in mind for the new year, including more on JAGS, a discussion of the use of Stan and more on using […]

# Bayesian Analysis with Stata

## JAGS with Stata II

This week I want to take a more detailed look at the use of JAGS with Stata and in particular I want to contrast JAGS with WinBUGS by analysing the biopsy data that I described last time. This posting really needs to be read in sequence with the previous two. Before I start on the comparison, let […]

## Modelling heart biopsies

Last week I introduced the JAGS program as an alternative to WinBUGS and this week I started with the intention of comparing JAGS and WinBUGS using a sample dataset. I decided to base the comparison on the biopsy example taken from the WinBUGS help files. Predictably, by the time that I had explained the model and fitted it […]

## JAGS with Stata

WinBUGS and OpenBUGS are just two of a growing number of blackbox programs for performing Bayesian analysis. Others include, JAGS (http://mcmc-jags.sourceforge.net/), Stan (http://mc-stan.org/) and BiiPS(https://alea.bordeaux.inria.fr/biips/doku.php). Of these, the program that is closest in style to WinBUGS and OpenBUGS is JAGS; it has a similar structure and it uses very similar samplers. So it should be easy to modify the […]

## Stata vs R

No Bayesian analysis this week, instead I want to talk more generally about statistical computing. I think that this discussion follows on naturally from my recent postings about linking Stata and R. As you might imagine I am quite a fan of Stata, but not one who is blinded to its limitations and for a […]

## Adaptive MCMC

The Stata Journal has not published very much on Bayesian statistics, so I was delighted to see the article by Matthew Baker in the latest issue (Stata Journal 2014;14(3):623-661). Matthew describes a Mata program for adaptive MCMC and his paper has encouraged me to discuss this topic. You should certainly read that article alongside this blog. I […]

## Solutions to the Exercises: Chapter 3 – Question 2

Last time I presented my solution to the first question at the end of chapter 3 of ‘Bayesian analysis with Stata’ and this time I want to consider question 2 from the same chapter. Question 2 This question analyses some data on the prevalence of very pre-term births (VPT) in Europe using a small 1997 […]

## Solutions to the Exercises: Chapter 3 – Question 1

This is another of my occasional postings working through the exercises given at the end of the chapters in ‘Bayesian analysis with Stata’. Chapter 3 introduces the Metropolis-Hastings sampler and so enables us to tackle any small sized Bayesian analysis. For larger problems this method can be too slow and faster algorithms are needed. Despite […]

## Using R with Stata: Part IV

This is the last in a series of posting about using conducting advanced statistical analyses in Stata by sending a job to R and then reading the results back into Stata. I have spent a while on this topic and although I believe it to be very important, next time I want to return to […]

## Using R with Stata: Part III

This is another in a series of posting about using conducting advanced statistical analyses in Stata by sending a job to R and then reading the results back into Stata. Our task for testing this process is to use the R package DPpackage to fit a Bayesian Dirichlet process mixture (DPM) model for smoothing a […]

## Recent Comments