fOutl | R Documentation |
Computes several measures of functional outlyingness for multivariate functional data.
fOutl(x, z = NULL, type = "fAO", alpha = 0, time = NULL,
diagnostic = FALSE, distOptions = NULL)
x |
A three dimensional |
z |
An optional three-dimensional |
type |
The outlyingness measure used in the computations.
One of the following options: |
alpha |
Specifies the weights at every cross-section.
When |
time |
If the measurements are not equidistant,
a sorted numeric vector containing a set of time points. |
diagnostic |
If set to |
distOptions |
A list of options to pass to the function
computing the cross-sectional distances. |
The functional outlyingness of a multivariate curve with respect to a
given set of multivariate curves is defined as the weighted average of its
multivariate outlyingness at each time point (Hubert et al., 2015).
The functional outlyingness can be computed in all dimensions p
using
the adjusted outlyingness (fAO
), the directional outlyingness (fDO
),
the Stahel-Donoho outlyingness (fSDO
) or the bagdistance (fbd
).
When the data array z
is specified, the functional outlyingness and diagnostic
information for the data array x
is also returned whenever the underlying
outlyingness routine allows it. For more information see the specific routines
listed in the section "See Also".
In some situations, additional diagnostics are available to flag outlying time
points. At each time point, observations from the data array x
are marked
if they are flagged as outliers. The observations from the data array x
are marked if their scaled outlyingness is larger than a prescribed cutoff value
from the chi-square distribution. For more details see the respective
outlyingness routines.
It is possible that at certain time points a part of the algorithm can not be executed due to e.g. exact fits. In that case the weight of that particular time point is set to zero. A warning is issued at the end of the algorithm to signal these time points. Furthermore the output contains an extra argument giving the indices of the time points where problems occured.
A list with the following components:
fOutlyingnessX |
Vector of length |
fOutlyingnessZ |
Vector of length |
weights |
Vector of weights according to the input parameter
|
crossDistsX |
An |
crossDistsZ |
An |
locOutlX |
An |
locOutlZ |
An |
IndFlagExactFit |
Vector containing the indices of the time points for which an exact fit is detected. |
P. Segaert
Hubert M., Rousseeuw P.J., Segaert P. (2015). Multivariate functional outlier detection (with rejoinder). Statistical Methods and Applications, 24, 177–202.
Hubert M., Rousseeuw P.J., Segaert P. (2017). Multivariate and functional classification using depth and distance. Advances in Data Analysis and Classification, 11, 445–466.
bagdistance
, outlyingness
, adjOutl
, dirOutl
, fom
data(octane)
Data <- octane
# When the option diagnostic is set to TRUE, a crude diagnostic
# to detect outliers can be extracted from the local outlyingness
# indicators.
Result <- fOutl(x = Data, type = "fAO", diagnostic = TRUE)
matplot(Data[,,1], type = "l", col = "black", lty = 1)
for (i in 1:dim(Data)[2]) {
if(sum(Result$locOutlZ[i, ]) > 0) {
obsData <- matrix(Data[,i,1], nrow = 1)
obsData[!Result$locOutlZ[i,]] <- NA
obsData <- rbind(obsData, obsData)
matpoints(t(obsData), col = "red", pch = 15)
}
}
# For more advanced outlier detection techniques, see the
# fom routine.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.