max.depth.line {lsdepth} | R Documentation |
Calculates and plots lines of scale parameters with maximum depth for given location parameters and the lines of MAD with respect to given location parameters for distributions (populations) and samples (data sets).
distribution.max.depth.line(qdist=function(x){qnorm(x,0,1)}, pdist=function(x){pnorm(x,0,1)},mu.min,mu.max, lengthmu=50,d.min=0.05,lengthbeta=100,iter=50,eps=0.0001) distribution.MAD(qdist=function(x){qnorm(x)}, pdist=function(x){pnorm(x)},mu=qdist(0.5),sym=F, iter=100,eps=0.00000001) distribution.MAD.line(qdist=function(x){qnorm(x)}, pdist=function(x){pnorm(x)},mu.min,mu.max, lengthmu=100,sym=F, iter=100,eps=0.00000001) sample.max.depth.line(y,mu.min,mu.max,mu.values=T,lengthmu=100,iter=100,eps=0.0000001) sample.MAD.line(y,mu.min,mu.max,mu.values=T,lengthmu=100) add.max.depth.MAD.lines(max.depth.line=NULL,MAD.line=NULL)
qdist |
quantile function of the distribution, default is the quantile function of the standard normal distribution. |
pdist |
distribution function of the distribution, default is the distribution function of the standard normal distribution. |
mu |
location parameter from which the MAD is calculated, default is the median. |
y |
numerical vector of observations (data set) |
mu.min |
minimum value for the location parameters. |
mu.max |
maximum value for the location parameters. |
mu.values |
logical value where mu.min and mu.max are calculated
from the data set if mu.values=T (default) otherwise the values must be set. |
lengthmu |
length of the vector of location parameters for which upper and
lower bounds of the contour are calculated. The larger lengthmu is the
smoother the line is. |
d.min |
a value which is known to be smaller than the maximum depth for all used locations. |
lengthbeta |
length of the vector for calculating the upper and lower bound for the
contour for a given location parameter and depth. The larger lengthbeta
the more precise are the bounds. |
iter |
number of iterations for each location parameter. |
eps |
precision of scale with maximum depth for a given location parameter. |
sym |
if sym=T , then it is a symmetric distribution and mu is assumed to be the
median. |
max.depth.line |
a list given by distribution.max.depth.line or
sample.max.depth.line . This list must have components mu and s.mu
where each components consist of a vector of same length. If max.depth.line=NULL ,
(default) then the maximum depth line is not plotted. |
MAD.line |
a list given by distribution.MAD.line or
sample.MAD.line . This list must have components mu and MAD
where each components consist of a vector of same length. If MAD=NULL ,
(default) then the maximum depth line is not plotted. |
distribution.max.depth.line
calculates scale parameters with maximum depth for
several locations parameters for distributions.
distribution.MAD
calculates the median of absolute deviations from a given location
parameter for distributions.
distribution.MAD.line
calculates the median of absolute deviations from several location
parameters for distributions.
sample.max.depth.line
calculates scale parameters with maximum depth for
several locations parameters for samples (data sets).
distribution.MAD.line
calculates the median of absolute deviations from several location
parameters for samples (data sets).
The number of used locations parameters is given by lengthmu
and the location
parameters are lying equispaced in the interval from mu.min
to mu.max
.
add.max.depth.MAD.lines
adds the lines given by distribution.max.depth.line
,
distribution.MAD.line
or sample.max.depth.line
, distribution.MAD.line
to an existing contour plot.
Return value of distribution.max.depth.line
and sample.max.depth.line
is
a list with the following components:
mu
a vector of location parameters,
s.mu
a vector with corresponding scale parameters with maximum depth.
Return value of distribution.MAD.line
and sample.MAD.line
is
a list with the following components:
mu
a vector of location parameters,
MAD
a vector with corresponding MAD's.
add.max.depth.MAD.lines
has no return value.
Christine Müller (mueller@math.uni-oldenburg.de)
Mizera, I. and Müller, C.H. (2003). Location-scale depth.
distribution.depth.contours
, sample.depth.contours
,
distribution.max.depth
, sample.max.depth
normal.depth.contours<-distribution.depth.contours(lengthmu=1000) plot.depth.contours(normal.depth.contours) normal.max.depth.line<-distribution.max.depth.line(mu.min=-1.5,mu.max=1.5,lengthmu=100) normal.MAD.line<-distribution.MAD.line(mu.min=-1.5,mu.max=1.5,lengthmu=100) add.max.depth.MAD.lines(normal.max.depth.line) add.max.depth.MAD.lines(MAD.line=normal.MAD.line) y<-rt(100,1) y.depth.contours<-sample.depth.contours(y=y,lengthmu=1000) plot.depth.contours(y.depth.contours) y.max.depth.line<-sample.max.depth.line(y=y) y.MAD.line<-sample.MAD.line(y=y) add.max.depth.MAD.lines(y.max.depth.line,y.MAD.line)