This function generates observation times with independent exponential intervals (a Poisson process with rate \(\lambda\)), the usual model of irregular, unplanned measurement.
Value
Returns a list of length n.
Each element is a numeric vector of time observation times.
The attribute delta_t is a list of length n;
each element is a numeric vector of the time - 1 intervals.
Details
The times of each person are shifted to start at 0.
The attribute delta_t holds the intervals
for the delta_t argument of the continuous-time simulators,
for example, SimSSMOUFixed() and SimSSMLinSDEIVary().
For the same schedule for every person, use n = 1
and pass attr(x, "delta_t")[[1]].
See also
Other Measurement Design Functions:
ScheduleBurst(),
ScheduleRandom(),
SimMissing()
Examples
set.seed(42)
schedule <- ScheduleExp(n = 2, time = 5, rate = 1)
schedule
#> [[1]]
#> [1] 0.0000000 0.1983368 0.8592321 1.1427231 1.1809150
#>
#> [[2]]
#> [1] 0.0000000 0.4731766 1.9368038 2.2507883 2.6609179
#>
#> attr(,"delta_t")
#> attr(,"delta_t")[[1]]
#> [1] 0.1983368 0.6608953 0.2834910 0.0381919
#>
#> attr(,"delta_t")[[2]]
#> [1] 0.4731766 1.4636271 0.3139846 0.4101296
#>