fitbayesWeibull {ForestFit} | R Documentation |
Estimating parameters of the Weibull distribution using the Bayesian approach
Description
Suppose x=(x_1,\dots,x_n)^T
denotes a vector of n
independent observations coming from a three-parameter Weibull distribution. Using the methodology given in Green et al. (1994), we compute the Bayes' estimators of the shape, scale, and location parameters.
Usage
fitbayesWeibull(data, n.burn=8000, n.simul=10000)
Arguments
data |
Vector of observations. |
n.burn |
Length of the burn-in period, i.e., the point after which Gibbs sampler is supposed to attain convergence. By default |
n.simul |
Total numbers of Gibbas sampler iterations. By default |
Details
The Bayes' estimators are obtained by averaging on the all iterations between n.burn
and n.simul
.
Value
A list of objects in two parts as
Bayes' estimators of the parameters.
A sequence of four goodness-of-fit measures consist of Anderson-Darling (
AD
), Cram\'eer-von Misses (CVM
), Kolmogorov-Smirnov (KS
), and log-likelihood (log-likelihood
) statistics.
Note
The methodology used here for computing the Bayes' estimator of the location parameter is different from that used by Green et al. (1994). This means that the location parameter is allowed to be any real value.
Author(s)
Mahdi Teimouri
References
E. J. Green, F. A. R. Jr, A. F. M. Smith, and W. E. Strawderman, 1994. Bayesian estimation for the three-parameter Weibull distribution with tree diameter data, Biometrics, 50(1), 254-269.
Examples
n<-100
alpha<-2
beta<-2
theta<-3
data<-rweibull(n,shape=alpha,scale=beta)+theta
fitbayesWeibull(data, n.burn=4000, n.simul=5000)