xfim / ggmcmc

Graphical tools for analyzing Markov Chain Monte Carlo simulations from Bayesian inference
111 stars 31 forks source link

Improve importing data from other MCMC packages #3

Closed xfim closed 11 years ago

xfim commented 12 years ago

Improve the facilities to convert MCMCpack, rstan or output from other R packages into a data frame that ggmcmc can process

jucor commented 11 years ago

Nice ggs() function, thanks! Importing Rstan code directly is much easier than the recommendations on your blog post that I unfortunately could not reproduce: Line

s <- mcmc.list(mcmc(s[,1,-4]), mcmc(s[,2,-4]), mcmc(s[,3,-4]), mcmc(s[,4,-4]))

complains about dimensions, while

s <- do.call(mcmc.list, alply(s[,,-(length(s[1,1,]))]], 2, mcmc))

has trailing ] -- and complains about dimensions, to. ggs() is just what I needed, thanks :)