depth.contours {lsdepth} | R Documentation |
Calculates and plots location-scale depth contours based on Student depth for distributions (populations) and samples (data sets).
distribution.depth.contours(depth=c(0.1,0.2,0.3,0.4),qdist=function(x){qnorm(x,0,1)}, pdist=function(x){pnorm(x,0,1)},lengthmu=100,lengthbeta=100) sample.depth.contours(depth=round(c(0.1,0.2,0.3,0.4)*length(y)),y,lengthmu=1000) plot.depth.contours(depth.cont,ratio=1,first.plot=T,mu.min=0,mu.max=0)
depth |
numerical vector of depth values in (0,0.5) for distributions, integer vector of depth values within 1 and sample size for samples |
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. |
y |
numerical vector of observations (data 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 are the contour lines. |
lengthbeta |
length of the vector for calculating the upper and lower bound for the
contour for a given location parameter. The larger lengthbeta the more
precise are the bounds. |
depth.cont |
a list given as output of distribution.depth.contours or of
sample.depth.contours . |
ratio |
ratio of the lengths of the location and scale axes. |
first.plot |
if first.plot=T (default) a new plot is generated, if first.plot=F the plot
is added to an existing plot. |
mu.min |
minimum value of the location axis. If mu.min==mu.max (default)
then the minimu and maximum value of the location axis is determined by the location
vector of the first list component of depth.cont . |
mu.max |
maximum value of the location axis. Compare mu.min . |
distribution.depth.contours
calculates the upper and lower bounds of
the depth contours of a distribution (population).
sample.depth.contours
calculates the the upper and lower bounds of
the depth contours of a sample (data set).
plot.depth.contours
plots the contours given by
distribution.depth.contours
or sample.depth.contours
.
Return value of distribution.depth.contours
and
sample.depth.contours
is a list. Each component of the list is list
with the following components: depth
provides the depth,
cont.exist
a logical value whether a contour for the depth exists.
If it is TRUE
then the list has the further components:
mubound
a vector of location values, lbound
a vector of the
lower bounds of the scale values and ubound
a vector of of the
upper bounds of the scale values.
plot.depth.contours
has no return value.
Christine Müller (mueller@math.uni-oldenburg.de)
Mizera, I. and Müller, C.H. (2003). Location-scale depth.
distribution.max.depth
, sample.max.depth
,
distribution.max.depth.line
, sample.max.depth.line
cauchy.depth.contours<-distribution.depth.contours(qdist=function(x){qt(x,1)},pdist=function(x){pt(x,1)}, lengthmu=1000) plot.depth.contours(cauchy.depth.contours) y<-rt(100,1) y.depth.contours<-sample.depth.contours(y=y,lengthmu=1000) plot.depth.contours(y.depth.contours)