cdfwei function

Weibull distribution

Weibull distribution

Distribution function and quantile function of the Weibull distribution.

cdfwei(x, para = c(0, 1, 1)) quawei(f, para = c(0, 1, 1))

Arguments

  • x: Vector of quantiles.

  • f: Vector of probabilities.

  • para: Numeric vector containing the parameters of the distribution, in the order zeta,beta,deltazeta, beta, delta

    (location, scale, shape).

Details

The Weibull distribution with location parameter zetazeta, scale parameter betabeta and shape parameter δ\delta has distribution function

F(x)=1exp[{(xζ)/β}δ]F(x)=1exp[(xzeta)/betadelta] F(x)=1-\exp[-\lbrace(x-\zeta)/\beta\rbrace^\delta]F(x) = 1 - exp[ - { (x - zeta) /beta }^delta ]

for x>zetax>zeta.

Returns

cdfwei gives the distribution function; quawei gives the quantile function.

Note

The functions expect the distribution parameters in a vector, rather than as separate arguments as in the standard

distribution functions pnorm, qnorm, etc.

See Also

cdfgev for the generalized extreme-value distribution, of which the Weibull (reflected through the origin) is a special case.

Examples

# Random sample from a 2-parameter Weibull distribution # with scale parameter 2 and shape parameter 1.5. quawei(runif(100), c(0,2,1.5)) # Illustrate the relation between Weibull and GEV distributions. # weifit() fits a Weibull distribution to data and returns # quantiles of the fitted distribution # gevfit() fits a Weibull distribution as a "reverse GEV", # i.e. fits a GEV distribution to the negated data, # then computes negated quantiles weifit <- function(qval, x) quawei(qval, pelwei(samlmu(x))) gevfit <- function(qval, x) -quagev(1-qval, pelgev(samlmu(-x))) # Compare on Ozone data data(airquality) weifit(c(0.2,0.5,0.8), airquality$Ozone) gevfit(c(0.2,0.5,0.8), airquality$Ozone)
  • Maintainer: J. R. M. Hosking
  • License: Common Public License Version 1.0
  • Last published: 2024-09-30

Useful links