shape.fd.analysis {ddalpha} | R Documentation |
Diagnostic Plot for First and Second Order Integrated and Infimal Depths
Description
Produce the diagnostic plot based on the fist or second order extended integrated / infimal depths.
Usage
shape.fd.analysis(datafA, datafB, range = NULL, d = 101, order = 1,
method = c("halfspace", "simplicial"), approx = 0, title = "",
nfun = 10, plot = TRUE)
Arguments
datafA |
A single function whose depth is computed, represented by a
|
datafB |
Functional dataset with respect to which the depth of |
range |
The common range of the domain where the functions |
d |
Grid size to which all the functional data are transformed. For depth computation,
all functional observations are first transformed into vectors of their functional values of length |
order |
The order of the depth to be used in the plot, for |
method |
The depth that is used in the diagnostic plot. possible values are |
approx |
For |
title |
The title of the diagnostic plot. |
nfun |
For |
plot |
Logical: should the function by plotted? |
Details
Plots a diagnostic plot of pointwise univariate (or bivariate) depths for all possible points (or couples of points) from the domain of the
functional data. From such a plot it is possible to infer into the first order (or second order) properties of a single function x with respect
to the given set of functional data. For order=1
, the integral of the displayed function is the integrated depth of x,
the smallest value of the function is the infimal depth of x.
For order=2
, the bivariate integral of the displayed surface gives the second order extended
integrated depth of x, the infimum of this bivariate function gives the second order infimal depth of x.
For details see Nagy et al. (2016) and depthf.fd1
.
Value
For order=1
two depth values, and two vectors of pointwise depths:
-
Simpl_FD
the first order integrated depth based on the simplicial depth, -
Half_FD
the first order integrated depth based on the halfspace depth, -
Simpl_ID
the first order infimal depth based on the simplicial depth, -
Half_ID
the first order infimal depth based on the halfspace depth, -
PSD
the vector of lengthd
containing the computed pointwise univariate simplicial depths used for the computation ofSimpl_FD
andSimpl_ID
, -
PHD
the vector of lengthd
containing the computed pointwise univariate halfspace depths used for the computation ofHalf_FD
andHalf_ID
.
In addition, the first order integrated / infimal depth diagnostic plot of the function A
with respect to
the random sample given by the functions corresponding to the rows of the matrix B
is produced.
For order=2
four depth values, and two matrices of pointwise depths:
-
Simpl_FD
the second order integrated depth based on the simplicial depth, -
Half_FD
the second order integrated depth based on the halfspace depth, -
Simpl_ID
the second order infimal depth based on the simplicial depth, -
Half_ID
the second order infimal depth based on the halfspace depth, -
PSD
the matrix of sized*d
containing the computed pointwise bivariate simplicial depths used for the computation ofSimpl_FD
andSimpl_ID
, -
PHD
the matrix of sized*d
containing the computed pointwise bivariate halfspace depths used for the computation ofHalf_FD
andHalf_ID
.
In addition, the second order integrated / infimal depth diagnostic plot of the function A
with respect to
the random sample given by the functions corresponding to the rows of the matrix B
is produced.
Author(s)
Stanislav Nagy, nagy@karlin.mff.cuni.cz
References
Nagy, S., Gijbels, I. and Hlubinka, D. (2017). Depth-based recognition of shape outlying functions. Journal of Computational and Graphical Statistics, 26 (4), 883–893.
See Also
Examples
datafA = dataf.population()$dataf[1]
dataf = dataf.population()$dataf[2:20]
shape.fd.analysis(datafA,dataf,order=1)
shape.fd.analysis(datafA,dataf,order=2,approx=0)