pdf, cdf, inverse cdf, and random deviates of the truncated weibull distribution.

rtweibull(n, shape, scale, a = 0, b = Inf)

dtweibull(x, shape, scale, a = 0, b = Inf)

ptweibull(q, shape, scale, a = 0, b = Inf)

qtweibull(p, shape, scale, a = 0, b = Inf)

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

shape

vector of shape parameters

scale

vector of scale parameters.

a

vector of lower truncation limits

b

vector of upper truncation limits

x, q

vector of quantiles.

p

vector of probabilities.

Value

dtweibull gives the density, ptweibull gives the distribution function, qtweibull gives the quantile function, and rtweibull generates random deviates.

Examples

rtweibull(5, 1, scale=2, a=0.5, b=3.0)
#> [1] 0.9465723 1.6872103 2.5980606 1.4183885 1.6517895
dtweibull(seq(0, 4, by=0.5), 1, scale=2, a=0.5, b=3.0)
#> [1] 0.0000000 0.7007756 0.5457646 0.4250419 0.3310229 0.2578009 0.2007756 #> [8] 0.0000000 0.0000000
ptweibull(seq(0, 4, by=0.5), 1, scale=2, a=0.5, b=3.0)
#> [1] 0.0000000 0.0000000 0.3100220 0.5514674 0.7395052 0.8859493 1.0000000 #> [8] 1.0000000 1.0000000
qtweibull(seq(0, 1, by=0.1), 1, scale=2, a=0.5, b=3.0)
#> [1] 0.5000000 0.6480457 0.8079325 0.9817205 1.1720593 1.3824362 1.6175722 #> [8] 1.8840822 2.1916467 2.5552586 3.0000000