Bayesian Estimate of the conditional Log-normal Mean
Bayesian Estimate of the conditional Log-normal Mean
This function produces a bayesian estimate of the conditional log-normal mean assuming a GIG prior for the variance and an improper prior for the regression coefficients of the linear regression in the log scale.
Source
Fabrizi, E., & Trivisano, C. Bayesian Conditional Mean Estimation in Log-Normal Linear Regression Models with Finite Quadratic Expected Loss. Scandinavian Journal of Statistics, 43(4), 1064-1077. (2016).
LN_MeanReg( y, X, Xtilde, method ="weak_inf", y_transf =TRUE, h =NULL, CI =TRUE, alpha_CI =0.05, type_CI ="two-sided", nrep =1e+05)
Arguments
y: Vector of observations of the response variable.
X: Design matrix.
Xtilde: Matrix of covariate patterns for which an estimate is required.
method: 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.
y_transf: Logical. If TRUE, the y vector is already assumed as log-transformed.
h: Leverage. With the default option NULL, the average leverage is used.
CI: Logical. With the default choice TRUE, the posterior credibility interval is computed.
alpha_CI: Level of alpha that determines the credibility (1-alpha_CI) of the posterior interval.
type_CI: 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.
nrep: Number of simulations.
Returns
The function returns a list including the prior and posterior parameters, the point estimate of the log-normal mean conditioned with respect to the covariate points included in Xtilde. It consists of the mean of the posterior distribution for the functional exp{x~iTβ+σ2/2} and the posterior variance.
Details
In this function the same procedure as LN_Mean is implemented allowing for the inclusion of covariates. Bayesian point and interval estimates for the response variabile in the original scale are provided considering the model: log(yi)=Xβ.