recordTimes {localScore} | R Documentation |
Calculate the record times of a sequence
Description
For a given sequence of real numbers, this function returns the index of the values where Lindley/CUSUM process are <0
Usage
recordTimes(sequence)
Arguments
sequence |
numeric sequence of a Lindley process, eg service time per customer |
Details
Note that the first record times which is always 0 is not included in the returned vector
Value
a vector with the record times. If no record time are found, return
empty vector integer(0)
Examples
####This example should return this vector: c(1,3,4,5,10)
seq1 <- c(-1,2,-2.00001,-4,-1,3,-1,-2,3,-4,2)
recordTimes(seq1)
####This example should return integer(0) because there is no record times in this sequence
seq2 <- c(4,1,0,-1,-2,5,-5,0,4)
recordTimes(seq2)
[Package localScore version 2.0.3 Index]