Data Cloning



Low level functions for implementing maximum likelihood estimating procedures for complex models using data cloning and Bayesian Markov chain Monte Carlo methods. Sequential and parallel MCMC support for JAGS, WinBUGS and OpenBUGS.

Main functions include:

  • dclone, dcdim, dciid, dctr: cloning R objects in various ways.

  •, conveniently fit BUGS models. jags.parfit and bugs.parfit fits chains on parallel workers.

  • iterative model fitting by the data cloning algorithm. dc.parfit is the parallelized version.

  • dctable, dcdiag: helps evaluating data cloning convergence by descriptive statistics and diagnostic tools. (These are based on e.g. chisq.diag and lambdamax.diag.)

  • coef.mcmc.list, confint.mcmc.list.dc, dcsd.mcmc.list, quantile.mcmc.list, vcov.mcmc.list.dc, mcmcapply, stack.mcmc.list: methods for mcmc.list objects.

  • write.jags.model, clean.jags.model, custommodel: convenient functions for handling BUGS models.

  • jagsModel, codaSamples: basic functions from rjags package rewrote to recognize data cloning attributes from data (parJagsModel, parUpdate, parCodaSamples are the parallel versions).


Author: Peter Solymos

Maintainer: Peter Solymos,




Data cloning website:

Solymos, P., 2010. dclone: Data Cloning in R. The R Journal 2(2), 29–37. URL:

Lele, S.R., B. Dennis and F. Lutscher, 2007. Data cloning: easy maximum likelihood estimation for complex ecological models using Bayesian Markov chain Monte Carlo methods. Ecology Letters 10, 551–563.

Lele, S. R., K. Nadeem and B. Schmuland, 2010. Estimability and likelihood inference for generalized linear mixed models using data cloning. Journal of the American Statistical Association 105, 1617–1625.

Want to suggest features or report bugs for Use the GitHub issue tracker.