View source: R/helper_functions.R
integral | R Documentation |
Computes the definite integral of a product
object over the range
of the parameter
integral(obj)
obj |
a |
A numeric of the marginal likelihood
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.