Discrete Weibull {BDgraph}R Documentation

The Discrete Weibull Distribution (Type 1)

Description

Density, distribution function, quantile function and random generation for the discrete Weibull distribution (type I) with parameters qq and β\beta.

Usage

ddweibull( x, q = exp( -1 ), beta = 1, zero = TRUE )
pdweibull( x, q = exp( -1 ), beta = 1, zero = TRUE )
qdweibull( p, q = exp( -1 ), beta = 1, zero = TRUE )
rdweibull( n, q = exp( -1 ), beta = 1, zero = TRUE )

Arguments

x

vector of quantiles.

p

vector of probabilities.

q, beta

shape and scale parameters, the latter defaulting to 1.

zero

logical; if TRUE (default), the support contains 00; FALSE otherwise.

n

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

Details

The discrete Weibull distribution has density given by

f(x)=qxβq(x+1)β,x=0,1,2, f(x) = q^{x^\beta} - q^{(x+1)^\beta}, x = 0, 1, 2, \ldots

For the case zero = FALSE:

f(x)=q(x1)βqxβ,x=1,2, f(x) = q^{(x-1)^\beta} - q^{x^\beta}, x = 1, 2, \ldots

Cumulative distribution function

F(x)=1q(x+1)β F(x) = 1-q^{(x+1)^\beta}

For the case zero = FALSE, x+1 should replaced by x.

Value

ddweibull gives the density, pdweibull gives the distribution function, qdweibull gives the quantile function, and rdweibull generates random values.

Author(s)

Reza Mohammadi a.mohammadi@uva.nl, Pariya Behrouzi, Veronica Vinciotti

References

Nakagawa, T. and Osaki, S. (1975). The Discrete Weibull Distribution. IEEE Transactions on Reliability, R-24, 300-301, doi:10.1109/TR.1975.5214915

See Also

dweibull, bdw.reg, bdgraph.dw

Examples

n    = 1000
q    = 0.4
beta = 0.8

set.seed( 7 )

rdw = rdweibull( n = n, q = q, beta = beta )

plot( prop.table( table( rdw ) ), type = "h", col = "gray50" )

x = 0:max( rdw )

lines( x, ddweibull( x = x, q = q, beta = beta ), type = "o", col = "blue", lwd = 2 )

hist( pdweibull( x = rdw, q = q, beta = beta ) )

plot( ecdf( rdw ) )
lines( x, pdweibull( x, q = q, beta = beta ), col = "blue", lwd = 2, type = "s" )

[Package BDgraph version 2.72 Index]