generate_samples_normal_gamma: Generate samples from a log_normal distribution using the...

Description Usage Arguments Value Examples

View source: R/generate_samples_normal_gamma.R

Description

This function generates samples from a log-normal distribution given the posterior hyperparameters of the normal-gamma distribution

Usage

1

Arguments

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.

Value

gen_sample A vector with the generated samples

Examples

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)

Iraices/PrecisePvsBoundedP documentation built on Jan. 18, 2021, 11:32 p.m.