| symtest | R Documentation |
A test based on halfspace depth for angular symmetry of the bivariate data set x around the point z. The test is only valid when x contains no duplicates.
symtest(x, z, options=list())
x |
An |
z |
A vector of length |
options |
A list of options to pass to |
The following hypothesis test is performed:
H_0: The data come from a continuous distribution P which is angularly symmetric about z.
The test statistic being used is the halfspace depth of z with respect to x. Under the null hypothesis the halfspace depth of z equals 1/2. The distribution of the teststatistic under H_0 is F_n(k) = P(hdepth(P, z) \le k). The p-value of the test is F_n(k) with k= hdepth(\code{x},z).
pval |
The |
P. Segaert
Rousseeuw P.J, Struyf A. (2002). A depth test for symmetry. In: Goodness-of-Fit Tests and Model Validity, Birkhäuser Boston, pages 401–412.
# Perform the test on a simple data example.
data(cardata90)
deepest <- hdepthmedian(cardata90)$median
symtest(x = cardata90[!duplicated(cardata90), ], z = deepest)
plot(cardata90)
points(deepest[1], deepest[2], pch=18, col="red", cex=1.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.