Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/quantile.localdepth.R
The function evaluates the size of the objects formed from a dataset according to a statistic and returns the corresponding quantiles. Depending on the method the objects are simplices or ellipsoids.
1 2 3 4 5 |
x |
numeric; vector, dataframe or matrix. If |
probs |
numeric; vector of probabilities with values in [0,1]. Quantile orders of the statistic |
use |
character; the statistic used to measure the size of the objects. For |
method |
character; the type of (local) depth to be evaluated |
nsamp |
character or numeric; the number of objects that are considered. If |
size |
logical; if |
dimension |
numeric; only used with |
covariance |
|
... |
arguments passed to |
When choosing between nsamp='all'
or a numeric value for nsamp
the value of choose(NROW(x), NCOL(x)+1)
must be considered to avoid very long computing times. When the number of possible objects is greater than the maximum vector length manageable by the machine, an error is returned by the system. In this case it is necessary to use the approximated procedure through the parameter nsamp
.
If size
is FALSE
then a vector with the quantiles is returned, otherwise a list with the following components:
quantile |
the requested quantiles |
stats |
the size of all objects |
call |
match.call() |
Claudio Agostinelli and Mario Romanazzi
1 2 3 4 5 6 7 8 9 10 11 | set.seed(1234)
x <- matrix(rnorm(60, 0, 1), ncol=2)
volumesimplex <- quantile.localdepth(x, probs=c(0.1, 0.2), size=TRUE)
volumesimplex$quantile
diametersimplex <- quantile.localdepth(x, probs=c(0.1, 0.2), size=TRUE, use='diameter')
diametersimplex$quantile
par(mfrow=c(2,2))
plot(ecdf(volumesimplex$stats), xlab='volume', main="ECDF of the simplices's volume")
boxplot(volumesimplex$stats, xlab='volume', main="Boxplot of the simplices's volume")
plot(ecdf(diametersimplex$stats), xlab='volume', main="ECDF of the simplices's diameter")
boxplot(diametersimplex$stats, xlab='volume', main="Boxplot of the simplices's diameter")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.