rpwe | R Documentation |
This will generate random numbers according to the specified piecewise exponential distribution
rpwe(nr=10,rate=c(0,5,0.8),tchange=c(0,3))
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. |
More details
r |
random numbers |
This provides a random number generator of the piecewise exponetial distribution
Xiaodong Luo
Luo, et al. (2017)
piecewise exponential
nr<-10
rate<-c(0.6,0.3)
tchange<-c(0,1.75)
pwer<-rpwe(nr=nr,rate=rate,tchange=tchange)
pwer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.