Description Usage Arguments Value Examples
View source: R/update_bernoulli_beta.R
This function implements the conjugate model (B | pi) ~ Bernoulli(pi); pi ~ Beta(alpha0,beta0) See wikipedia for details https://en.wikipedia.org/wiki/Conjugate_prior
1 | update_bernoulli_beta(suff_stat_data, alpha0 = 1, beta0 = 1)
|
suff_stat_data |
a vector of sufficient statistics: non_consumer_sample_size and consumer_sample_size |
alpha0 |
prior hyperparameter alpha0 for the beta distribution |
beta0 |
prior hyperparameter beta0 for the beta distribution |
param A list with the prior and posterior hyperparameters. It constains the following components
A list with the prior hyperparameters alpha, beta
A list with the posterior hyperparameters alpha, beta
1 2 | data <- c(non_consumer_sample_size = 20, consumer_sample_size = 10)
update_bernoulli_beta(suff_stat_data = data, alpha0 = 1, beta0 = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.