dw {DWreg} | R Documentation |
Discrete Weibull
Description
Density, distribution function, quantile function and random generation for the discrete Weibull distribution with parameters q and beta.
Usage
ddw(x,q=exp(-1),beta=1)
pdw(x,q=exp(-1),beta=1)
qdw(p,q=exp(-1),beta=1)
rdw(n,q=exp(-1),beta=1)
Arguments
x |
quantile |
p |
probability |
n |
number of observations |
q , beta |
Parameters of the distribution |
Details
The discrete Weibulll distribution has density
p(x,q,\beta) = q^{x^{\beta}}-q^{(x+1)^{\beta}}
for x = 0, 1, 2, \ldots
.
If q or beta are not specified they assume the default values of exp(-1) and 1, respectively. In this case, DW corresponds to a geometric distribution with p=1-q.
Value
ddw gives the density, pdw gives the distribution function, qdw gives the quantile function, and rdw generates random samples from a DW distribution with parameters q and beta.
Author(s)
Veronica Vinciotti
References
Nagakawa T, Osaki S. The discrete Weibull distribution. IEEE transactions on reliability 1975; R-24(5).
Examples
x<-rdw(1000,q=0.9,beta=1.5)
hist(x)
plot(x,unlist(lapply(x,ddw,q=0.9,beta=1.5)),ylab="density")
plot(x,unlist(lapply(x,pdw,q=0.9,beta=1.5)),ylab="cdf")