The discrete inverse Weibull distribution

Share:

Description

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

Usage

1
2
3
4

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, β

n

the sample size

Details

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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)