selectPoints: A point selection procedure for multivariate data

View source: R/seqOpenEndCpDistTests.R

selectPointsR Documentation

A point selection procedure for multivariate data

Description

Returns a matrix of ‘representative’ points.

Usage

selectPoints(x, r, kappa = 1.5, plot = FALSE)

Arguments

x

a numeric matrix with d columns whose rows represent multivariate observations.

r

integer specifying the size of an initial uniformly-spaced grid ‘on the probability scale’; an upper bound for the number of selected points is r^d.

kappa

numeric constant required to be strictly greater than one involved in the point selection procedure.

plot

logical used only if d = 2 specifying whether a plot should be produced.

Details

The selection procedure is described in detail in Section 3.2 of the reference below. Set plot = TRUE for visual feedback and information on the minimum number of ‘surrounding’ observations required for a grid point to be selected. The initial grid 'on the probability scale' is in blue, while the points selected by the procedure are in red.

Value

a matrix with d columns whose rows are the selected points.

References

M. Holmes, I. Kojadinovic, and A. Verhoijsen, Multi-purpose open-end monitoring procedures for multivariate observations based on the empirical distribution function, 45 pages, https://arxiv.org/abs/2201.10311.

See Also

selectPoints() is used in detOpenEndCpDist().

Examples

## Generate data
set.seed(123)
x1 <- rnorm(1000, 0, 1)
x2 <- rnorm(1000, 0.7 * x1, sqrt((1 - 0.7^2)))
x <- cbind(x1, x2)

## Point selection
selectPoints(x, r = 3, kappa = 1.5, plot = TRUE)
selectPoints(x, r = 3, kappa = 4, plot = TRUE)

selectPoints(x, r = 5, kappa = 1.5, plot = TRUE)
selectPoints(x, r = 5, kappa = 4, plot = TRUE)

npcp documentation built on Oct. 18, 2024, 9:06 a.m.

Related to selectPoints in npcp...