Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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

Data Representation: Bayesian Approach That's Sparse

v0.1.5
GPL-3
Authors
Anne Bisson [cre], Gabrielle Weinrott [aut], Brigitte Charnomordic [aut], Benedicte Fontez [aut], Nadine Hilgert [aut], Susan Holmes [aut]
Initial release
2019-11-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.