ForestFit (version 0.4)

fitbayesWeibull: Estimating parameters of the Weibull distribution using the Bayesian approach

Description

Suppose \(y=(y_1,\dots,y_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(y, n.burn=8000, n.simul=10000)

Arguments

y

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.burn is 8000.

n.simul

Total numbers of Gibbas sampler iterations. By default n.simul is 10,000.

Value

A list of objects in two parts as

  1. Bayes' estimators of the parameters.

  2. 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.

Details

The Bayes' estimators are obtained by averaging on the all iterations between n.burn and n.simul.

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

Run this code
# NOT RUN {
y<-rweibull(20,shape=2,scale=2)+2
fitbayesWeibull(y, n.burn=100, n.simul=200)
# }

Run the code above in your browser using DataCamp Workspace