GLMM using DPpackage

April 9, 2010

(This article was first published on Shige's Research Blog, and kindly contributed to R-bloggers)

I was able to fit a semi-parametric Bayesian GLMM model using DPpackage. It took me many hours to sample from the posterior distribution (DPM prior):

MCMC scan 1000 of 5000 (CPU time: 18950.080 s)
MCMC scan 2000 of 5000 (CPU time: 22510.100 s)
MCMC scan 3000 of 5000 (CPU time: 28293.830 s)
MCMC scan 4000 of 5000 (CPU time: 35111.930 s)
MCMC scan 5000 of 5000 (CPU time: 46726.330 s)
Which translates to 5.26, 6.25, 9.75, 12.98 hours. This makes it less suitable for routine (especially exploratory) data analysis.

I compared the results from DPpackage and that from MCMCglmm, and they are not that different, and the latter took only a small fraction of the time required by the former!

The lack of difference in results puzzled me. I compared from results from random effect logistic regression assuming Gaussian random effect and results from NPML, assuming a nonparametric distribution of the random effect, the differences are quite significant.

—————————- UPDATED ON APRIL 11 —————————————————————-

Using DP prior instead of DPM prior, it took about 4.7 hours to run the model. The results are slightly different and the parameter I am interested in increased from .41 to .42. Now I am trying PT prior and see how it goes.

DPpackage is a exciting new tool for applied researchers, and A LOT OF new and cool things can be done with it. With convenient new Bayesian tools like MCMCpack, MCMCglmm, and DPpackage, I will not be surprised to see more Bayesian publications coming out in social sciences. 

To leave a comment for the author, please follow the link and comment on their blog: Shige's Research Blog. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)