tpwb {tpwb}R Documentation

The three-parameter Weibull distribution(tpwb)

Description

Density, distribution function, quantile function, and random generation function for the three-parameter Weibull distribution with shape, scale and location

Usage

dtpwb(x, shape, scale, location = 1, log = FALSE)

ptpwb(q, shape, scale, location = 1, lower.tail = TRUE, log.p = FALSE)

qtpwb(p, shape, scale, location = 1, lower.tail = TRUE, log.p = FALSE)

rtpwb(n, shape, scale, location = 1)

Arguments

x, q

vector of quantiles.

shape

shape parameter, where \beta > 0.

scale

scale parameter, where \alpha > 0.

location

location parameter, where \delta \ge 0.

log, log.p

logical; (default = FALSE), if TRUE, then probabilities are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X \le x], otherwise, P[X > x].

p

vector of probabilities

n

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

Value

dtpwb gives the density, ptpwb gives the distribution function, qtpwb gives the quantile function, and rtpwb generates random samples.

Note

If location parameter, \delta = 0 , it reduced to the two-parameter Weibull distribution.

References

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 1, chapter 21. Wiley, New York.

Examples


x <- rtpwb(20,1.5,3,1)
dtpwb(x,1.5,3,1)
dtpwb(x,1.5,3,1,log=TRUE)

q <- rtpwb(20,1.5,3,1)
ptpwb(q,1.5,3,1 )
ptpwb(q,1.5,3,1, lower.tail = FALSE)

q <- rtpwb(20,1.5,3,1); q
p<- ptpwb(q,1.5,3,1 ); p
qtpwb(p,1.5,3,1)

rtpwb(5, 1.5, 3, 0) # the same as rweibull(5,1.5,3)
rtpwb(25,0.5, 2, 1)


[Package tpwb version 0.1.0 Index]