View source: R/Finalised_coding.R
| linear_contr_one | R Documentation |
This function returns, at predefined positions, the values of the contrast function
for a given data sequence with under the scenario of continuous, piecewise-linear
mean signals. 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-linear
mean signal, which is carried out in sol_path_plm.
linear_contr_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 contrast function value at b_j, when the start- and end-points
are s_j and e_j, respectively.
Andreas Anastasiou, anastasiou.andreas@ucy.ac.cy
cumsum_lin for the calculation of the contrast function for all data
points of x. Also, see cusum_one for a function that has the same
purpose, but for the case of the CUSUM statistic, which is used in piecewise-constant mean
signals.
noise <- rnorm(2000)
ex.lin <- IDetect:::linear_contr_one(noise, s = c(1, 5, 9), e = c(6, 56, 71), b = c(4, 40, 45))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.