rpwe: Piecewise exponential distribution: random number generation

View source: R/rpwe.R

rpweR Documentation

Piecewise exponential distribution: random number generation

Description

This will generate random numbers according to the specified piecewise exponential distribution

Usage

rpwe(nr=10,rate=c(0,5,0.8),tchange=c(0,3))

Arguments

nr

number of random numbers to be generated

rate

piecewise constant event rate

tchange

a strictly increasing sequence of time points starting from zero at which event rate changes. The first element of tchange must be zero. rate and tchange must have the same length.

Details

More details

Value

r

random numbers

Note

This provides a random number generator of the piecewise exponetial distribution

Author(s)

Xiaodong Luo

References

Luo, et al. (2017)

See Also

piecewise exponential

Examples

nr<-10
rate<-c(0.6,0.3)
tchange<-c(0,1.75)
pwer<-rpwe(nr=nr,rate=rate,tchange=tchange)
pwer

PWEALL documentation built on Aug. 9, 2023, 9:08 a.m.

Related to rpwe in PWEALL...