Learn R Programming

rcppbugs (version 0.1.4.2)

logp: Calculate the log likelihood of an rcppbugs object.

Description

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

Usage

logp(x)

Arguments

x
any stochastic rcppbugs object

Value

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

References

https://github.com/armstrtw/CppBugs

See Also

mcmc.normal

Examples

Run this code
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)


Run the code above in your browser using DataLab