Computes the definite integral of a product object over the range of the parameter

integral(obj)

Arguments

obj

a product object

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)
#> 0.01140574