find_difference: Return the regions in which the smooth is significantly...

View source: R/imported-fun.R

find_differenceR Documentation

Return the regions in which the smooth is significantly different from zero.

Description

Return the regions in which the smooth is significantly different from zero.

Usage

find_difference(mean, se, xVals = NULL, f = 1, as.vector = FALSE)

Arguments

mean

A vector with smooth predictions.

se

A vector with the standard error on the smooth predictions.

xVals

Optional vector with x values for the smooth. When xVals is provided, the regions are returned in terms of x- values, otherwise as indices.

f

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.

as.vector

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.

Value

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).

Author(s)

Jacolien van Rij


stefanocoretta/tidymv documentation built on May 12, 2023, 1:57 p.m.