View source: R/Finalised_coding.R
| cusum_one | R Documentation |
This function returns the CUMSUM statistic at predefined positions of a given
data sequence. The routine is typically not called directly by the user; its result
is used in the derivation of the solution path in the case of a piecewise-constant
mean signal, which is carried out in sol_path_pcm.
cusum_one(x, s, e, b)
x |
A numeric vector containing the data. |
s, e, b |
Positive integer vectors, all of the same length |
A numeric vector of length l_b, of which the j^{th} element
is the CUSUM statistic value at b_j, when the start- and end-points
are s_j and e_j, respectively.
Andreas Anastasiou, anastasiou.andreas@ucy.ac.cy
cusum_function for the calculation of the CUSUM statistic for all data
points of x. Also, see linear_contr_one for a function that has the same
purpose, but for the case of the contrast function for continuous and piecewise-linear mean
signals.
no.cpt.noise <- rnorm(2000)
ex1 <- IDetect:::cusum_one(no.cpt.noise, s = c(1, 5, 9), e = c(30, 56, 71), b = c(20, 40, 45))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.