Description Usage Arguments Details Value References Examples
View source: R/peeling_trajectory.R
Identifies a jump in the peeling trajectory of object
.
1 |
object |
A |
rel.support |
Logical indicating if the trajectory difference should be relative to the support for finding the jump (default to TRUE). |
Computes the (relative) trajectory differences of object
:
(yfun[k] - yfun[k - 1])/(support[k - 1] - support[k])
and returns its maximum value. The rationale is that the biggest jump
in peeling trajectory gives a good cut-off point for the peeling
algorithm.
If rel.support = FALSE
, the denominator is not used in the
differences calculation.
A list with elements:
trajectory.difference |
Numeric vector of the computed (relative) differences. |
npeel.opt |
Integer giving the npeel value of the highest difference. |
final.box |
The extracted box corresponding to |
Masselot P., Chebana F., Campagna C., Lavigne E., Ouarda T.B.M.J., Gosselin P. On threshold identification for weather-health warning systems. Submitted.
1 2 3 4 5 6 7 8 9 | # A simple bump
set.seed(12345)
x <- matrix(runif(2000), ncol = 2, dimnames = list(NULL, c("x1", "x2")))
y <- 2 * x[,1] + 5 * x[,2] + 10 * (x[,1] >= .8 & x[,2] >= .5) +
rnorm(1000)
# Peeling with alpha = 0.05 and beta.stop = 0.05
peel_res <- peeling(y, x, beta.stop = 0.05)
# Automatically choose the best box
chosen <- jump.prim(peel_res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.