Discrete Inverse Weibull {DiscreteInverseWeibull}R Documentation

The discrete inverse Weibull distribution

Description

Probability mass function, distribution function, quantile function and random generation for the discrete inverse Weibull distribution with parameters q and \beta

Usage

ddiweibull(x, q, beta)
pdiweibull(x, q, beta)
qdiweibull(p, q, beta)
rdiweibull(n, q, beta)

Arguments

x

a vector of quantiles

p

a vector of probabilities

q

the value of the first parameter, q

beta

the value of the second parameter, \beta

n

the sample size

Details

The discrete inverse Weibull distribution has probability mass function given by P(X=x;q,\beta)=q^{(x)^{-\beta}}-q^{(x-1)^{\beta}}, x=1,2,3,\ldots, 0<q<1, \beta>0. Its cumulative distribution function is F(x; q, \beta)=q^{x^{-\beta}}

Value

ddiweibull gives the probability, pdiweibull gives the distribution function, qdiweibull gives the quantile function, and rdiweibull generates random values. See the reference below for the continuous inverse Weibull distribution.

References

Dutang, C., Goulet, V., Pigeon, M. (2008) actuar: An R package for actuarial science, Journal of Statistical Software 25(7): 1-37

Examples

# Ex.1
x<-1:10
q<-0.6
beta<-0.8
ddiweibull(x, q, beta)
t<-qdiweibull(0.99, q, beta)
t
pdiweibull(t, q, beta)
# Ex.2
q<-0.4
beta<-1.7
n<-100
x<-rdiweibull(n, q, beta)
tabulate(x)/sum(tabulate(x))
y<-1:round(max(x))
# compare with
ddiweibull(y, q, beta)

[Package DiscreteInverseWeibull version 1.0.2 Index]