Type: | Package |
Title: | Bayesian Inference for the Birnbaum-Saunders Distribution |
Author: | Mahdi Teimouri |
Maintainer: | Mahdi Teimouri <teimouri@aut.ac.ir> |
Description: | Developed for the following tasks. 1- Simulating and computing the maximum likelihood estimator for the Birnbaum-Saunders (BS) distribution, 2- Computing the Bayesian estimator for the parameters of the BS distribution based on reference prior proposed by Xu and Tang (2010) <doi:10.1016/j.csda.2009.08.004> and conjugate prior. 3- Computing the Bayesian estimator for the BS distribution based on conjugate prior. 4- Computing the Bayesian estimator for the BS distribution based on Jeffrey prior given by Achcar (1993) <doi:10.1016/0167-9473(93)90170-X> 5- Computing the Bayesian estimator for the BS distribution under progressive type-II censoring scheme. |
Encoding: | UTF-8 |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Depends: | R(≥ 3.1.0) |
Imports: | GIGrvg |
Repository: | CRAN |
Version: | 1.1.1 |
Date: | 2022-01-25 |
NeedsCompilation: | no |
Packaged: | 2022-01-26 15:57:37 UTC; NikPardaz |
Date/Publication: | 2022-01-27 10:40:05 UTC |
Computing the Bayesian estimators of the Birnbaum-Saunders (BS) distribution.
Description
Computing the Bayesian estimators of the BS distribution based on approximated Jeffreys prior proposed by Achcar (1993). The approximated Jeffreys piors is
\pi_{j}(\alpha,\beta)\propto\frac{1}{\alpha\beta}\sqrt{\frac{1}{\alpha^2}+\frac{1}{4}}
.
Usage
Jeffreysbs(x, CI = 0.95, M0 = 800, M = 1000)
Arguments
x |
Vector of observations. |
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 the 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
J. A. Achcar 1993. Inferences for the Birnbaum-Saunders fatigue life model using Bayesian methods, Computational Statistics \& Data Analysis, 15 (4), 367-380.
Examples
data(fatigue)
x <- fatigue
Jeffreysbs(x, CI = 0.95, M0 = 800, M = 1000)
Bone mineral content data
Description
The mineral density of three dominant and nondominant of bones measured in g/cm^2
johnson1999.
Usage
data(bone)
Format
A text file with 6 columns.
References
R. A. ArnoldJohnson and D. W. Wichern 1999. Applied Multivariate Analysis, Prentice-Hall, New Jersey.
Examples
data(bone)
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)
Fatigue data
Description
A set of 101 observations obtained by Birnbaum and Saunders(1969) from fatigue life of 6061-T6 aluminum coupons cut parallel to the direction of rolling and oscillated at 18 cycles per second (cps).
Usage
data(fatigue)
Format
A text file with 1 column.
References
Z. W. Birnbaum and S. C. Saunders 1969. Estimation for a family of life distributions with applications to fatigue. Journal of Applied Probability, 328-347.
Examples
data(fatigue)
Computing the maximum likelihood (ML) estimator for the generalized Birnbaum-Saunders (GBS) distribution.
Description
Computing the ML estimator for the GBS distribution proposed by Owen (2006) whose density function is given by
f_{{GBS}}(t|\alpha,\beta,\nu)=\frac{(1-\nu)t +\nu \beta}{\sqrt{2\pi}\alpha \sqrt{\beta}t^{\nu+1}} \exp\left\{-\frac{(t-\beta)^2}{2\alpha^2\beta t^{2\nu}}\right\},
where t>0
. The parameters of GBS distribution are \alpha>0
, \beta>0
, and 0<\nu<1
. For \nu=0.5
, the GBS distribution turns into the ordinary Birnbaum-Saunders distribution.
Usage
mlebs(x, start, method = "Nelder-Mead", CI = 0.95)
Arguments
x |
Vector of observations. |
start |
Vector of the initial values. |
method |
The method for the numerically optimization that includes one of |
CI |
Confidence level for constructing asymptotic confidence intervals. That is 0.95 by default. |
Value
A list including the ML estimator, goodness-of-fit measures, asymptotic 100(1-\alpha)\%
confidence interval (CI) and corresponding standard errors, and Fisher information matix.
Author(s)
Mahdi Teimouri
Examples
data(fatigue)
x <- fatigue
mlebs(x, start = c(1, 29), method = "Nelder-Mead", CI = 0.95)
Plasma survival data
Description
The plasma survival data contains the Survival times of plasma cell myeloma for 112 patients, see Carbone et al. (1967).
Usage
data(plasma)
Format
A text file with 4 columns.
References
P. P. Carbone, L. E. Kellerhouse, and E. A. Gehan 1967. Plasmacytic myeloma: A study of the relationship of survival to various clinical manifestations and anomalous protein type in 112 patients. The American Journal of Medicine, 42 (6), 937-48.
Examples
data(plasma)
Simulating from Birnbaum-Saunders (BS) distribution.
Description
Simulating from BS distribution whose density function is given by
f_{{BS}}(t|\alpha,\beta)=\frac{0.5t +0.5 \beta}{\sqrt{2\pi}\alpha \sqrt{\beta}t^{\frac{3}{2}}} \exp\left\{-\frac{(t-\beta)^2}{2\alpha^2\beta t}\right\},
where t
>0. The parameters of GBS distribution are \alpha
>0 and \beta
>0.
Usage
rbs(n, alpha, beta)
Arguments
n |
Size of required realizations. |
alpha |
Parameter |
beta |
Parameter |
Value
A vector of n
realizations from distribution.
Author(s)
Mahdi Teimouri
Examples
rbs(n = 100, alpha = 1, beta = 2)
Computing the Bayesian estimators of the Birnbaum-Saunders (BS) distribution.
Description
Computing the Bayesian estimators of the BS distribution using reference prior proposed by Berger and Bernardo(1989). The joint distribution of the priors is
\pi(\alpha,\beta)=1/(\alpha,\beta)
.
Usage
referencebs(x, CI = 0.95, M0 = 800, M = 1000)
Arguments
x |
Vector of observations. |
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
J. O. Berger and J. M. Bernardo 1989. Estimating a product of means: Bayesian analysis with reference priors. Journal of the American Statistical Association, 84(405), 200-207.
Examples
data(fatigue)
x <- fatigue
referencebs(x, CI = 0.95, M0 = 800, M = 1000)
Bayesian estimator for the Birnbaum-Saunders family under progressive type-II censoring scheme.
Description
Estimates parameters of the Birnbaum-Saunders family in a Bayesian framework through the Metropolis-Hasting algorithm when subjects are placed on progressive type-II censoring scheme with likelihood function
l(\alpha,\beta|x_{1:m:n},\dots,x_{m:m:n})=\log L(\Theta) \propto C \sum_{i=1}^{m} \log f(x_{i:m:n}{{;}}|\alpha,\beta) + \sum_{i=1}^{m} R_i \log \bigl[1-F(x_{i:m:n}{{;}}|\alpha,\beta)\bigr],
in which F(.|\alpha,\beta)
is cumulative distribution function of the Birnbaum-Saunders family with C=n(n-R_1-1)(n-R_1-R_2-2)\dots (n-R_1-R_2-\dots-R_{m-1}-m+1)
. The acceptance for each new sample of \alpha
and \beta
, respectively, becomes
A_{\alpha}=\min \left\{1,\prod_{i=1}^{m}\frac{\bigl[1-F_{BS}(t_{i:m:n}|1/(\alpha^{new})^2,\beta)\bigr]^{R_{i}}}{\bigl[1-F_{BS}(t_{i:m:n}|1/(\alpha_{old})^2,\beta)\bigr]^{R_{i}}}\right\}
,
A_{\beta}=\min \left\{1,\prod_{i=1}^{m}\frac{\bigl[1-F_{BS}(t_{i:m:n}|\alpha,\beta^{new})\bigr]^{R_{i}}}{\bigl[1-F_{BS}(t_{i:m:n}|\alpha,\beta_{old})\bigr]^{R_{i}}}\right\}.
Usage
typeIIbs(plan, M0 = 4000, M = 6000, CI = 0.95)
Arguments
plan |
Censoring plan for progressive type-II censoring scheme. It must be given as a |
M0 |
The number of sampler runs considered as burn-in. |
M |
The number of total sampler runs. |
CI |
Confidence or coverage level for constructing percentile confidence interval. That is 0.95 by default. |
Value
A list including summary statistics after burn-in point including: mean, median, standard deviation, 100(1 - CI
)/2 percentile, 100(1/2 + CI
/2) percentile.
Author(s)
Mahdi Teimouri
References
M. Teimouri and S. Nadarajah 2016. Bias corrected MLEs under progressive type-II censoring scheme, Journal of Statistical Computation and Simulation, 86 (14), 2714-2726.
N. Balakrishnan and R. Aggarwala 2000. Progressive Censoring: Theory, Methods, and Applications. Springer Science \&
Business Media, New York.
Examples
data(plasma)
typeIIbs(plan = plasma, M0 = 100, M = 200, CI = 0.95)
Starting message when loading package bibs
Description
It contains a welcome message for user of package bibs.
Value
Welcome message for user of bibs package.