Learn R Programming

DrBats (version 0.1.6)

postdens: Calculate the unnormalized posterior density of the model

Description

Calculate the unnormalized posterior density of the model

Usage

postdens(mcmc.output, Y, D, chain = 1)

Arguments

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)

Value

post a vector containing the posterior density at each iteration##' @examples

Examples

Run this code
# NOT RUN {
data("toydata")
data("stanfit")
dens <- postdens(coda.obj(stanfit), Y = toydata$Y.simul$Y, D = 2, chain = 1)
hist(dens)

# }

Run the code above in your browser using DataLab