FUNTA (version 0.1.0)

rFUNTA: Obtain rFUNTA pseudo-depth values

Description

For a given dataset, rFUNTA pseudo-depth values can be obtained. rFUNTA is a robustified functional data depth that is based on the intersection angles that the centered functions form with each other.

Usage

rFUNTA(Data, centered = FALSE, type.inner = "max", type.outer = "median", tick.dist = 1, nObs = nrow(Data))

Arguments

Data
a matrix. Enter the discretized values of a functional data set in a n times T matrix, where n is the number of functional observations and T is the number of time points.
centered
boolean. If the data are already centered, that means, the mean of each row of Data is 0, this can be set to TRUE to save computation time. Default value is FALSE.
type.inner
One of "max" (default), "median", "mean". Note that only the default setting produces rFUNTA values as introduced in Kuhnt and Rehage (2016). The other options can be used if not the maximum intersection angle of each pair of functions is of interest, but the median or mean intersection angle.
type.outer
One of "max", "median" (default), "mean". Note that only the default setting produces rFUNTA values as introduced in Kuhnt and Rehage (2016). The other options can be used if not the median value of the n-1 weighted intersection angles of each function is of interest, but the maximum or mean of it.
tick.dist
atomic vector. The distance between two neighbored time points can be set here. Default value is 1.
nObs
atomic vector. If the dataset has more than one dimension, specify nObs with the number of observations per dimension. Data then has to be in the style of rbind(Dim1, Dim2, ...). Note that tick.dist has to be equal for all the dimensions.

Value

Data corresponds to first element of FUNTA.

Details

The larger the value of FUNTA is, the less it can be regarded as a shape outlier, and vice versa. The values are bounded by 0 and 1.

References

Kuhnt, S.; Rehage, A. (2016) An angle-based multivariate functional pseudo-depth for shape outlier detection. Journal of Multivariate Analysis 146, 325-340.

Examples

x <- seq(0, 2*pi, by = 0.01)
y1 <- sin(x)
y2 <- sin(1.02*x)
y3 <- cos(x)
y <- rbind(y1, y2, y3)
rFUNTA(y, tick.dist = 0.01)