Return the regions in which the smooth is significantly different from zero.
find_difference(mean, se, xVals = NULL, f = 1, as.vector = FALSE)
The function returns a list with start points of each region
(start
) and end points of each region (end
). The logical
xVals
indicates whether the returned values are on the x-scale
(TRUE) or indices (FALSE).
A vector with smooth predictions.
A vector with the standard error on the smooth predictions.
Optional vector with x values for the smooth.
When xVals
is provided, the regions are returned in terms of x-
values, otherwise as indices.
A number to multiply the se
with, to convert the se
into confidence intervals. Use 1.96 for 95% CI and 2.58 for 99%CI.
Logical: whether or not to return the data points as vector, or not. Default is FALSE, and a list with start and end points will be returned.
Jacolien van Rij