[R] Converting a matrix to an mcmc object

Jim Lemon drjimlemon at gmail.com
Mon Nov 30 07:31:01 CET 2015


Hi Margaret,
Doesn't the "mcmc" function in the "coda" package create an mcmc object
from a matrix?

Jim


On Mon, Nov 30, 2015 at 9:44 AM, Margaret Donald <
merricks.merricks at gmail.com> wrote:

> Dear List,
>
> I am using R2jags and post process some mcmc objects to produce a new
> object, which is currently a matrix, which replicates the shape of the
> objects from which it is derived.
>
> I want to produce a Gelman-Rubin graph from its (implied) three chains, but
> I need to coerce the matrix into an mcmc object if I am to use gelman.plot
> or gelman.diag from the R-package "coda".
>
> (The various mcmc functions in "coda" seem to work in the other
> direction.....)
>
> Regards,
> Margaret Donald
>
>
>
> --
> Margaret Donald
> Post Doctoral researcher
> University of New South Wales
> margaret.donald at unsw.edu.au
> 0405 834 550
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list