postdens | R Documentation |
Calculate the unnormalized posterior density of the model
postdens(mcmc.output, Y, D, chain = 1)
mcmc.output |
an mcmc list as produced by clean.mcmc |
Y |
the data matrix |
D |
the number of latent factors |
chain |
the chain to plot (default = 1) |
post a vector containing the posterior density at each iteration##' @examples
Gabrielle Weinrott
data("toydata") data("stanfit") dens <- postdens(coda.obj(stanfit), Y = toydata$Y.simul$Y, D = 2, chain = 1) hist(dens)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.