update_dirichlet {grizbayr} | R Documentation |
Update Dirichlet Distribution
Description
This function updates the Dirichlet distribution with the Dirichlet-Multinomial conjugate prior update rule.
Usage
update_dirichlet(alpha_0, alpha_1, alpha_2, priors = list())
Arguments
alpha_0 |
Double value for alpha_0 (count of failures). Must be 0 or greater. |
alpha_1 |
Double value for alpha_1 (count of successes side 1). Must be 0 or greater. |
alpha_2 |
Double value for alpha_2 (count of successes side 2). Must be 0 or greater. |
priors |
An optional list object that contains alpha00, alpha01, and alpha02.
Otherwise the function with use |
Details
TODO: This function currently only works in 3 dimensions. Should be extended into N dimensions in the future. Can use ... notation.
Value
tibble with columns alpha_0, alpha_1, and alpha_2
Examples
update_dirichlet(alpha_0 = 20, alpha_1 = 5, alpha_2 = 2)
sample_priors_list <- list(alpha00 = 2, alpha01 = 3, alpha02 = 5)
update_dirichlet(alpha_0 = 20, alpha_1 = 5, alpha_2 = 2, priors = sample_priors_list)
[Package grizbayr version 1.3.5 Index]