dweibull3p: Three-Parameter Weibull Distribution

View source: R/probability_tools.R

dweibull3pR Documentation

Three-Parameter Weibull Distribution

Description

Density, cumulative distribution function, quantile function, and random generation for the three-parameter Weibull distribution with shape \beta > 0, scale \alpha > 0, and threshold (location) \gamma. The support is x > \gamma.

Usage

dweibull3p(x,     shape, scale, thres, log = FALSE)
pweibull3p(q,     shape, scale, thres, lower.tail = TRUE, log.p = FALSE)
qweibull3p(p,     shape, scale, thres, lower.tail = TRUE, log.p = FALSE)
rweibull3p(n,     shape, scale, thres)

Arguments

x, q

Numeric vector of quantiles.

p

Numeric vector of probabilities in (0, 1).

n

Integer: number of observations to generate.

shape

Positive shape parameter \beta.

scale

Positive scale parameter \alpha.

thres

Real-valued threshold (location) parameter \gamma. Values of x at or below thres have zero density.

log, log.p

Logical: if TRUE, return log-probabilities.

lower.tail

Logical: if TRUE (default), return P(X \le q); otherwise P(X > q).

Details

The three-parameter Weibull is a location-shifted version of the standard two-parameter Weibull. Let Y = X - \gamma; then Y \sim \mathrm{Weibull}(\beta, \alpha). The PDF for x > \gamma is

f(x) = \frac{\beta}{\alpha} \left(\frac{x - \gamma}{\alpha}\right)^{\beta - 1} \exp\!\left[-\left(\frac{x - \gamma}{\alpha}\right)^{\beta}\right].

Internally these functions shift x by thres and delegate to dweibull, pweibull, qweibull, and rweibull.

Value

dweibull3p

Numeric vector of density values.

pweibull3p

Numeric vector of probabilities.

qweibull3p

Numeric vector of quantiles.

rweibull3p

Numeric vector of random samples.

Author(s)

Karuna G. Reddy karuna.reddy@auckland.ac.nz
M. G. M. Khan mgm.khan@usp.ac.fj

See Also

dweibull for the two-parameter Weibull; fitverse with dists = "weibull3" to fit this distribution by MLE.

Examples

## PDF and CDF
curve(dweibull3p(x, shape = 2, scale = 10, thres = 5),
      from = 5, to = 35, ylab = "Density",
      main = "Weibull(2, 10) shifted by 5")

## Quantile / CDF round-trip
p  <- c(0.1, 0.5, 0.9)
q  <- qweibull3p(p, shape = 2, scale = 10, thres = 5)
pweibull3p(q, shape = 2, scale = 10, thres = 5)   # should recover p

## Random samples
set.seed(1)
x <- rweibull3p(200, shape = 1.8, scale = 50, thres = 10)
hist(x, breaks = 20, main = "Weibull(1.8, 50) with threshold 10")

FitVerse documentation built on Dec. 1, 2026, 1:07 a.m.