gentime {iAR}R 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

Eyheramendy S, Elorrieta F, Palma W (2018). “An irregular discrete time series model to identify residuals with autocorrelation in astronomical light curves.” Monthly Notices of the Royal Astronomical Society, 481(4), 4311–4322. ISSN 0035-8711, doi: 10.1093/mnras/sty2487, https://academic.oup.com/mnras/article-pdf/481/4/4311/25906473/sty2487.pdf.

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)

[Package iAR version 1.2.0 Index]