gentime {iAR} | R Documentation |
Generating Irregularly spaced times
Description
A method for generating time points based on a statistical distribution. The results are stored in the 'times' slot of the 'utilities' object.
Usage
gentime(x, ...)
Arguments
x |
An object of class 'utilities'. |
... |
Additional arguments for generating time points:
|
Value
An updated 'utilities' object with the generated observation times stored in the 'times' slot.
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.
Examples
set.seed(12917)
o1=iAR::utilities()
o1<-gentime(o1, n=200, distribution = "expmixture", lambda1 = 130,
lambda2 = 6.5,p1 = 0.15, p2 = 0.85)
st=o1@times
mean(diff(st))
o1=iAR::utilities()
o1<-gentime(o1, n=200, distribution = "expmixture", lambda1 = 15,
lambda2 = 2.5,p1 = 0.15, p2 = 0.85)
st=o1@times
mean(diff(st))