Site icon R-bloggers

GLMM using DPpackage

[This article was first published on Shige's Research Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.