gentime: Generating Irregularly spaced times

gentimeR Documentation

Generating Irregularly spaced times

Description

Function to generate irregularly spaced times from a mixture of exponential distributions.

Usage

gentime(
  n,
  distribution = "expmixture",
  lambda1 = 130,
  lambda2 = 6.5,
  p1 = 0.15,
  p2 = 0.85,
  a = 0,
  b = 1
)

Arguments

n

A positive integer. Length of observation times.

distribution

Distribution of the observation times that will be generated. Default value is "expmixture" for a mixture of exponential distributions. Alternative distributions are "uniform", "exponential" and "gamma".

lambda1

Mean (1/rate) of the exponential distribution or the first exponential distribution in a mixture of exponential distributions.

lambda2

Mean (1/rate) of the second exponential distribution in a mixture of exponential distributions.

p1

Weight of the first exponential distribution in a mixture of exponential distributions.

p2

Weight of the second exponential distribution in a mixture of exponential distributions.

a

Shape parameter of a gamma distribution or lower limit of the uniform distribution.

b

Scale parameter of a gamma distribution or upper limit of the uniform distribution.

Value

Array with irregularly spaced observations times

References

\insertRef

Eyheramendy_2018iAR

See Also

IARsample

Examples

st<-gentime(n=100)
st<-gentime(n=100,distribution="uniform")
st<-gentime(n=100,distribution="gamma",a=1,b=1)
st<-gentime(n=100,distribution="exponential",lambda1=1)

iAR documentation built on Nov. 25, 2022, 1:06 a.m.

Related to gentime in iAR...