postdens: Calculate the unnormalized posterior density of the model

View source: R/modelEval.R

postdensR Documentation

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

Author(s)

Gabrielle Weinrott

Examples

data("toydata")
data("stanfit")
dens <- postdens(coda.obj(stanfit), Y = toydata$Y.simul$Y, D = 2, chain = 1)
hist(dens)


DrBats documentation built on March 18, 2022, 5:15 p.m.