pdfwei: Probability Density Function of the Weibull Distribution

pdfweiR Documentation

Probability Density Function of the Weibull Distribution

Description

This function computes the probability density of the Weibull distribution given parameters (\zeta, \beta, and \delta) computed by parwei. The probability density function is

f(x) = \delta Y^{\delta-1} \exp(-Y^\delta)/\beta

where f(x) is the probability density, Y = (x-\zeta)/\beta, quantile x, \zeta is a location parameter, \beta is a scale parameter, and \delta is a shape parameter.

The Weibull distribution is a reverse Generalized Extreme Value distribution. As result, the Generalized Extreme Value algorithms are used for implementation of the Weibull in lmomco. The relations between the Generalized Extreme Value parameters (\xi, \alpha, and \kappa) are \kappa = 1/\delta, \alpha = \beta/\delta, and \xi = \zeta - \beta. These relations are available in Hosking and Wallis (1997).

In R, the probability distribution function of the Weibull distribution is pweibull. Given a Weibull parameter object para, the R syntax is pweibull(x+para$para[1], para$para[3],
scale=para$para[2]). For the lmomco implmentation, the reversed Generalized Extreme Value distribution pdfgev is used and again in R syntax is pdfgev(-x,para).

Usage

pdfwei(x, para)

Arguments

x

A real value vector.

para

The parameters from parwei or vec2par.

Value

Probability density (f) for x.

Author(s)

W.H. Asquith

References

Hosking, J.R.M. and Wallis, J.R., 1997, Regional frequency analysis—An approach based on L-moments: Cambridge University Press.

See Also

cdfwei, quawei, lmomwei, parwei

Examples

  # Evaluate Weibull deployed here and built-in function (pweibull)
  lmr <- lmoms(c(123,34,4,654,37,78))
  WEI <- parwei(lmr)
  F1  <- cdfwei(50,WEI)
  F2  <- pweibull(50+WEI$para[1],shape=WEI$para[3],scale=WEI$para[2])
  if(F1 == F2) EQUAL <- TRUE
## Not run: 
  # The Weibull is a reversed generalized extreme value
  Q <- sort(rlmomco(34,WEI)) # generate Weibull sample
  lm1 <- lmoms( Q)   # regular L-moments
  lm2 <- lmoms(-Q)   # L-moment of negated (reversed) data
  WEI <- parwei(lm1) # parameters of Weibull
  GEV <- pargev(lm2) # parameters of GEV
  F <- nonexceeds()  # Get a vector of nonexceedance probabilities
  plot(pp(Q),Q)
  lines(cdfwei(Q,WEI),Q,lwd=5,col=8)
  lines(1-cdfgev(-Q,GEV),Q,col=2) # line overlaps previous distribution

## End(Not run)

lmomco documentation built on May 29, 2024, 10:06 a.m.