Skip to contents

Formula: P(theta in the simplex of d+1 random points)

Usage

DepthS(X, theta)

Arguments

X

An n x d data matrix, d = 1 or 2.

theta

The point, length d.

Value

List with estimate, depth, n_containing, n_simplices, ecdf, closed_form_1d, n, d, method.

Details

The sample version counts the simplices spanned by d+1 data points that contain theta, over all C(n, d+1) of them. In one dimension a simplex is an interval, so the depth is the fraction of pairs straddling theta and its population value is exactly 2 F(theta) (1 - F(theta)) – maximised at the median.

References

Liu (1990), Ann. Statist. 18(1):405-414.

Examples

DepthS(X = c(1, 2, 3, 4, 5, 6, 7, 8), theta = 0.5)
#> $estimate
#> [1] 0
#> 
#> $depth
#> [1] 0
#> 
#> $n_containing
#> [1] 0
#> 
#> $n_simplices
#> [1] 28
#> 
#> $ecdf
#> [1] 0
#> 
#> $closed_form_1d
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $d
#> [1] 1
#> 
#> $method
#> [1] "Liu simplicial depth"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"