File: depth.sample.Rd

package info (click to toggle)
r-cran-ddalpha 1.3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,656 kB
  • sloc: cpp: 3,556; fortran: 886; ansic: 159; makefile: 2
file content (51 lines) | stat: -rw-r--r-- 1,434 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/depth.fd.R
\name{depth.sample}
\alias{depth.sample}
\title{Fast Depth Computation for Univariate and Bivariate Random Samples}
\usage{
depth.sample(A, B)
}
\arguments{
\item{A}{Univariate or bivariate points whose depth is computed, represented by a matrix of 
size \code{m*2}. \code{m} stands for the number of points, \code{d} is 1 for univariate and 2 
for bivariate data.}

\item{B}{Random sample points with respect to which the depth of \code{A} is computed. 
\code{B} is represented by a matrix of size \code{n*2}, where \code{n} is the sample size.}
}
\value{
Vector of length \code{m} of depth halfspace depth values is returned.
}
\description{
Faster implementation of the halfspace and the simplicial depth. Computes the depth 
of a whole random sample of a univariate or a bivariate data in one run.
}
\details{
The function returns vectors of sample halfspace and simplicial depth values.
}
\examples{
n = 100
m = 150
A = matrix(rnorm(2*n),ncol=2)
B = matrix(rnorm(2*m),ncol=2)
depth.sample(A,B)
system.time(D1<-depth.halfspace(A,B))
system.time(D2<-depth.sample(A,B))
max(D1-D2$Half)

A = rnorm(100)
B = rnorm(150)
depth.sample(A,B)
# depth.halfspace(matrix(A,ncol=1),matrix(B,ncol=1))

}
\seealso{
\code{\link{depth.halfspace}}

\code{\link{depth.simplicial}}
}
\author{
Stanislav Nagy, \email{nagy at karlin.mff.cuni.cz}
}
\keyword{depth}