kingaa / pomp

R package for statistical inference using partially observed Markov processes
https://kingaa.github.io/pomp
GNU General Public License v3.0
112 stars 27 forks source link

Summarizing the posterior distribution #14

Closed tpa8395 closed 8 years ago

tpa8395 commented 8 years ago

When using pmcmc for estimation, I note that the package outputs parameter estimates which can be extracted using the coef function. Does the software calculate these estimates using all pmcmc samples in a chain? Is there a way to specify burn-in? Does the package calculate standard deviations or credible intervals for parameters?

kingaa commented 8 years ago

When applied to the result of a pmcmc calculation, coef returns the current (final) state of the chain and so is not so useful for inference purposes. Using conv.rec, you can extract an mcmc object (defined in package coda) containing the full history of the MCMC chain . This can be windowed, thinned, etc., like any other coda mcmc object. Given such an object, coda also provides a number of methods for diagnosing convergence, mixing, etc. and for extracting credible intervals, posterior medians, etc.

Note too that a set of PMCMC chains can be combined into an object of class pmcmcList using the c operator: conv.rec applied to such an object returns a coda::mcmc.list object, with some additional diagnostic methods available.

Examples of this are provided on the pmcmc help page, in the Getting Started vignette, and in the JSS paper.

Because this isn't as clearly documented in the help pages, I consider this a documentation bug. I will edit those pages in the next few days. Please be so kind as to have a look at the new documentation when it comes out and let me know if you have specific suggestions or otherwise see room for improvement in either the documentation or the codes.

tpa8395 commented 8 years ago

Thanks for your timely and clear response. I will look at the new documentation and provide some feedback.

kingaa commented 8 years ago

Please have a look at the documentation in version 1.3.4.1. Any suggestions for improvements would be appreciated!