Description Usage Arguments Value Examples
View source: R/generate_samples_normal_gamma.R
This function generates samples from a log-normal distribution given the posterior hyperparameters of the normal-gamma distribution
1 | generate_samples_normal_gamma(niter_ale, post)
|
niter_ale |
number of generated samples |
post |
the output of update_normal_gamma function. Post is a list with the prior and posterior hyperparameters of the Normal-Gamma distribution. Prior and posterior are also list with hyperparameters mu, v, alpha and beta. |
gen_sample A vector with the generated samples
1 2 3 4 | dta <- rnorm(100)
post <- update_normal_gamma(suff_stat_data = dta, mu0 = 0, v0 = 5,
alpha0 = 1, beta0 = 1, sufficient_statistics = FALSE)
generate_samples_normal_gamma(niter_ale = 1000, post)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.