logp: Calculate the log likelihood of an rcppbugs object.

Description Usage Arguments Value Author(s) References See Also Examples

Description

Calculate the log likelihood of an rcppbugs object based on the current state of the dependant(upstream) objects in the chain.

Usage

1
logp(x)

Arguments

x

any stochastic rcppbugs object

Value

a double precision value indicating the total log likelihood of the object.

Author(s)

rcppbugs was written by Whit Armstrong.

References

https://github.com/armstrtw/CppBugs

See Also

mcmc.normal

Examples

1
2
3
4
5
6
7
8
NR <- 100
NC <- 2

b <- mcmc.normal(rnorm(NC),mu=0,tau=0.0001)
tau.y <- mcmc.gamma(runif(1),alpha=0.1,beta=0.1)

logp(b)
logp(tau.y)

armstrtw/rcppbugs documentation built on May 10, 2019, 1:42 p.m.