Computing the Bayesian estimators of the BS distribution using conjugate prior, that is, conjugate and reference priors. The probability density function of generalized inverse Gaussian (GIG) distribution is given by good1953population $$ f_{{GIG}}(x|\lambda,\chi,\psi)=\frac{1}{2{K}_{\lambda}(\sqrt{\psi \chi})}\Bigl(\frac{\psi}{\lambda}\Bigr)^{\lambda/2}x^{\lambda-1}\exp\biggl\{-\frac{\chi}{2x}-\frac{\psi x}{2}\biggr\}, $$ where \(x>0\), \(-\infty<\lambda <+\infty\), \(\psi>0\), and \(\chi>0\) are parameters of this family. The pdf of a inverse gamma (IG) distribution denoted as \({IG}(\gamma,\theta)\) is given by $$f_{{IG}}(x|\gamma,\theta)=\frac{\theta^{\gamma} x^{-\gamma-1}}{\Gamma(\gamma)}\exp\left\{-\frac{\theta}{x}\right\},$$ where \(x>0\), \(\gamma>0\), and \(\theta>0\) are the shape and scale parameters, respectively.
conjugatebs(x,gamma0=1,theta0=1,lambda0=0.001,chi0=0.001,psi0=0.001,CI=0.95,M0=800,M=1000)Vector of observations.
The first hyperparameter of the IG conjugate prior.
The second hyperparameter of the IG conjugate prior.
The first hyperparameter of the GIG conjugate prior.
The second hyperparameter of the GIG conjugate prior.
The third hyperparameter of the GIG conjugate prior.
Confidence level for constructing percentile and asymptotic confidence intervals. That is 0.95 by default.
The number of sampler runs considered as burn-in.
The number of total sampler runs.
A list including summary statistics of a Gibbs sampler for Bayesian inference including point estimation for the parameter, its standard error, and the corresponding \(100(1-\alpha)\%\) credible interval, goodness-of-fit measures, asymptotic \(100(1-\alpha)\%\) confidence interval (CI) and corresponding standard errors, and Fisher information matix.
I. J. Good 1953. The population frequencies of species and the estimation of population parameters. Biometrika, 40(3-4):237-264.
# NOT RUN {
data(fatigue)
x <- fatigue
conjugatebs(x,gamma0=1,theta0=1,lambda0=0.001,chi0=0.001,psi0=0.001,CI=0.95,M0=800,M=1000)
# }
Run the code above in your browser using DataLab