rcox: random generation for Coxian distributions

Description Usage Arguments Details Value Author(s) References See Also

View source: R/RcppExports.R

Description

generates n random deviates from the Coxian distribution with index vector equal to probvec and rate vector equal to lambdvec.

Usage

1
rcox(n, probvec, lambdvec)

Arguments

n

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

probvec

index vector

lambdvec

rate vector

Details

Assume that X_1, ..., X_n be independent exponential random variables with respective rates λ_1, ..., λ_n. Assume that P(I=i)=p_i, i=1, ..., n and the be random variable I is independent of X_1, ..., X_n. Then the random variable

X=X_1+…+X_I

is a Coxian random variable with index vector probvec=(p_1,…,p_n) and rate vector lambdvec=(λ_1,…,λ_n).

The probability distribution of a Coxian random variable is a mixture of convolutions of exponential distributions. A Coxian distribution can approximate any positive-valued distribution. However, approximations is poor sometimes. [1] indicated that numerical error in computing density and probability functions is one of reasons for the issue. pcox provides with distribution function of Coxian distributions by using the method of [1].

Value

rcox generates n random deviates from the Coxian distribution with index vector equal to probvec and rate vector equal to lambdvec. The length of the result is determined by n for rcox.

Author(s)

Junrong Liu

References

Qihong Duan and Junrong Liu. (2016), Modelling a Bathtub-Shaped Failure Rate by a Coxian Distribution, IEEE TRANSACTIONS ON RELIABILITY 65(2), pp.878-885. DOI: 10.1109/TR.2015.2494374 [1]

See Also

Distributions for other standard distribution


dpqrcox documentation built on May 2, 2019, 4:56 p.m.