convex_hull_intersect: Intersections of convex hulls

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/convex_hull_intersect.R

Description

The function calculates how often the staights defining two convex hulls in R^2 intersect and plots the results if desired.

Usage

1
convex_hull_intersect(points1, points2, alpha, y1, y2, notion, plots)

Arguments

points1

Points (x_1,y_1),(x_2,y_2),...,(x_K,y_K) to calculate the first convex hull as Kx2 matrix.

points2

Points (x_1,y_1),(x_2,y_2),...,(x_M,y_M)calculate the second convex hull as Mx2 matrix

alpha

Level for which the depth test was computed to get the convex hulls as result.

y1

Data used for the calculation of the first confidence interval or convex hull.

y2

Data used for the calculation of the second confidence interval or convex hull.

notion

Depth notion used to calculate the confidence intevals. Possible notions are "dS", "dS1", "dS2" and "dS3".

plots

A switch (TRUE or FALSE) to indicate if plots shall be produced.

Details

The function is an auxiliary function in the cange point detection algorithm based on simplicial depth. For details see Kustosz (2016).

Value

p1

Points which define the first convex hull.

p2

Points which define the second convex hull.

sumint

Number of intersections between the straights which define the bounds of the convex hulls.

Note

Note, that the value for sumint is 1, if the convex hulls are completely overlapping, to indicate an intersection in this case. This function is an auxiliary function to compare the confidence regions in order to construct a phase change detection algorithms based on simplicial depth.

Author(s)

Kustosz, Christoph

References

Kustosz, C. (2016). Depth based estimators and tests for autoregressive processes with application. Ph. D. thesis. TU Dortmund.

See Also

chull,straight_intersect,dS_lin2_test,dS1_lin2_test,dS2_lin2_test,dS3_lin2_test

Examples

1
2
3
po1 <- rbind(c(1, 1), c(2, 4), c(1, 2), c(2, 3))
po2 <- rbind(c(1, 3), c(2, 1.5), c(1.5, 2), c(1.2, 2))
convex_hull_intersect(po1, po2, plots=TRUE)

ChrisKust/rexpar documentation built on May 6, 2019, 11:48 a.m.