I re-read a short paper of Andrew Gelman’s yesterday about multilevel modeling, and thought “That would make a nice example for PyMC”. The paper is “Multilevel (hierarchical) modeling: what it can and cannot do, and R code for it is on his website.
To make things even easier for a casual blogger like myself, the example [...]
Posts Tagged as ‘MCMC’
December 2, 2009
Multilevel (hierarchical) modeling: what it can and cannot do in Python
November 22, 2009
Paper rejected, Cheer Up with Baby Animals
Too bad for me, my first global health paper will have to be revised and resubmitted. In addition to some more substantive objections, the negative reviewer said “It is unclear what software was used to carry out the Bayesian estimation by MCMC. This is not possible in STATA and would be extremely difficult [...]
August 25, 2009
MCMC in Python: PyMC for Bayesian Model Selection
(Updated 9/2/2009)
I never took a statistics class, so I only know the kind of statistics you learn on the street. But now that I’m in global health research, I’ve been doing a lot of on-the-job learning. This post is about something I’ve been reading about recently, how to decide if a simple statistical [...]
November 26, 2008
MCMC in Python: PyMC for Bayesian Probability
I’ve got an urge to write another introductory tutorial for the Python MCMC package PyMC. This time, I say enough to the comfortable realm of Markov Chains for their own sake. In this tutorial, I’ll test the waters of Bayesian probability.
Now, what better problem to stick my toe in than the one that inspired Reverend [...]
November 5, 2008
MCMC in Python: PyMC to sample uniformly from a convex body
This post is a little tutorial on how to use PyMC to sample points uniformly at random from a convex body. This computational challenge says: if you have a magic box which will tell you yes/no when you ask, “Is this point (in n-dimensions) in the convex set S”, can you come up with a [...]
September 29, 2008
Hurrah for Free/Open Software like PyMC
A few posts ago, when I told you how amazingly simple it turned out to be to sample independent sets with PyMC. Remember when I said that it was working a little differently than I expected, though? I sent an email to the pymc-users mailing list, and, in just a few days, one of the [...]
September 24, 2008
Disease Modeling and the Global Burden of Disease
If you’ve read some of my previous posts, you might be wondering, what does Health Metrics have to do with sampling independent sets in graphs? (What is Health Metrics? you might also be wondering.)
In my new job, I’m not that interested in sampling independent sets. I’m mostly interested in sampling from a weird [...]
September 19, 2008
MCMC: Running a chain, making it look easy
As I was saying in my last post, I’ve been getting interested in actually running Markov Chain Monte Carlo algorithms, instead of trying to prove things about their asymptotic performance. It seems like the “stats” way to do this is to use R and WinBUGS, but I’ve always thought that R programming looks messy. [...]