integral {bayesplay} | R Documentation |
Compute integral
Description
Computes the definite integral of a product
object over the range
of the parameter
Usage
integral(obj)
Arguments
obj |
a |
Value
A numeric of the marginal likelihood
Examples
# define a likelihood
data_model <- likelihood(family = "normal", mean = 5.5, sd = 32.35)
# define a prior
prior_model <- prior(family = "normal", mean = 5.5, sd = 13.3)
# multiply the likelihood by the prior
model <- data_model * prior_model
# take the integral
integral(model)
[Package bayesplay version 0.9.3 Index]