Ediweibull: First and second order moments

Description Usage Arguments Details Value References Examples

View source: R/Ediweibull.R

Description

First and second order moments of the discrete inverse Weibull distribution

Usage

1
Ediweibull(q, beta, eps = 1e-04, nmax = 1000)

Arguments

q

the value of the q parameter

beta

the value of the β parameter

eps

error threshold for the approximated computation of the moments

nmax

a first maximum value of the support considered for the approximated computation of the moments

Details

For a discrete inverse Weibull distribution we have E(X;q,β)=∑_{x=0}^{+∞} 1-F(x;q, β) and E(X^2;q,β)=2∑_{x=1}^{+∞} x(1-F(x;q, β))+E(X;q, β). The expected values are numerically computed considering a truncated support: integer values smaller than or equal to \min(nmax;F^{-1}(1-eps;q,β)), where F^{-1} is the inverse of the cumulative distribution function (implemented by the function qdiweibull). Increasing the value of nmax or decreasing the value of eps improves the approximation, but slows down the calculation speed

Value

a list comprising the (approximate) first and second order moments of the discrete inverse Weibull distribution. Note that the first moment is finite iff β is greater than 1; the second order moment is finite iff β is greater than 2

References

Khan M.S., Pasha G.R., Pasha A.H. (2008) Theoretical Analysis of Inverse Weibull Distribution, WSEAS Trabsactions on Mathematics 2(7): 30-38

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Ex.1
q<-0.75
beta<-1.25
Ediweibull(q, beta)
# Ex.2 
q<-0.5
beta<-2.5
Ediweibull(q, beta)
# Ex.3
q<-0.4
beta<-4
Ediweibull(q, beta)


DiscreteInverseWeibull documentation built on May 19, 2017, 3:34 p.m.
Search within the DiscreteInverseWeibull package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.