conjugatebs {bibs}R Documentation

Computing the Bayesian estimators of the Birnbaum-Saunders (BS) distribution.

Description

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.

Usage

conjugatebs(x,gamma0=1,theta0=1,lambda0=0.001,chi0=0.001,psi0=0.001,CI=0.95,M0=800,M=1000)

Arguments

x

Vector of observations.

gamma0

The first hyperparameter of the IG conjugate prior.

theta0

The second hyperparameter of the IG conjugate prior.

lambda0

The first hyperparameter of the GIG conjugate prior.

chi0

The second hyperparameter of the GIG conjugate prior.

psi0

The third hyperparameter of the GIG conjugate prior.

CI

Confidence level for constructing percentile and asymptotic confidence intervals. That is 0.95 by default.

M0

The number of sampler runs considered as burn-in.

M

The number of total sampler runs.

Value

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.

Author(s)

Mahdi Teimouri

References

I. J. Good 1953. The population frequencies of species and the estimation of population parameters. Biometrika, 40(3-4):237-264.

Examples

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)

[Package bibs version 1.1.1 Index]