LN_Mean {BayesLN}R Documentation

Bayesian Estimate of the Log-normal Mean


This function produces a Bayesian estimate of the log-normal mean, assuming a GIG prior for the variance and an improper flat prior for the mean in the log scale.


  method = "weak_inf",
  x_transf = TRUE,
  CI = TRUE,
  alpha_CI = 0.05,
  type_CI = "two-sided",
  nrep = 1e+05



Vector containing the sample.


String that indicates the prior setting to adopt. Choosing "weak_inf" a weakly informative prior setting is adopted, whereas selecting "optimal" the hyperparameters are aimed at minimizing the frequentist MSE.


Logical. If TRUE, the x vector is assumed already log-transformed.


Logical. With the default choice TRUE, the posterior credibility interval is computed.


Level of alpha that determines the credibility (1-alpha_CI) of the posterior interval.


String that indicates the type of interval to compute: "two-sided" (default), "UCL" (i.e. Upper Credible Limit) for upper one-sided intervals or "LCL" (i.e. Lower Credible Limit) for lower one-sided intervals.


Number of simulations for the computation of the credible intervals.


Summarizing the posterior mean of the log-normal expectation might be delicate since several common priors used for the variance do not produces posteriors with finite moments. The proposal by Fabrizi and Trivisano (2012) of adopting a generalized inverse Gaussian (GIG) prior for the variance in the log scale σ^2 has been implemented. Moreover, they discussed how to specify the hyperparameters according to two different aims.

Firstly, a weakly informative prior allowed to produce posterior credible intervals with good frequentist properties, whereas a prior aimed at minimizing the point estimator MSE was proposed too. The choice between the two priors can be made through the argument method.

The point estimates are exact values, whereas the credible intervals are provided through simulations from the posterior distribution.


The function returns a list which includes the prior and posterior parameters, the point estimate of the log-normal mean that consists in the mean of the posterior distribution of the functional \exp\{μ+σ^2/2\} and the posterior variance.


Fabrizi, E., & Trivisano, C. Bayesian estimation of log-normal means with finite quadratic expected loss. Bayesian Analysis, 7(4), 975-996. (2012).


# Load data
# Optimal point estimator
LN_Mean(x = NCBC$al, x_transf = FALSE, method = "optimal", CI = FALSE)
# Weakly informative prior and interval estimation
LN_Mean(x = NCBC$al, x_transf = FALSE, type_CI = "UCL")

[Package BayesLN version 0.2.2 Index]