Assume that \(X\) is an \(n\times m\) matrix representing the multivariate
exposure of interest. We can define the convex hull of these observations as
H. There are two distinct processes for defining H depending
on whether \(m=2\) or \(m>2\).
If \(m=2\), we use the chull
function to define the
vertices of the convex hull. The algorithm implemented is described in eddy1977new;textualmvGPS.
If \(m>2\), we use the convhulln
function. This algorithm
for obtaining the convex hull in m-dimensional space uses Qhull described in
barber1996quickhull;textualmvGPS. Currently this function returns
only the vertex set hpts_vs
without the grid sample points. There are
options to visualize the convex hull when \(m=3\) using triangular facets,
but there are no implementable solutions to sample along convex hulls in higher
dimensions.
To restrict the convex hull to higher density regions of the exposure we can
apply trimming. To apply trimming set trim_hull=TRUE
and specify
trim_quantile=q
where q
must be in \[0.5, 1\]. Along each
exposure dimension we then calculate the upper and lower bounds using the
quantile
function, i.e., quantile(q)
and
quantile(1-q)
. Any observations that have a value above or below these
sample quantiles is excluded. The remaining observations that fall completely
within the sample quantiles across all dimensions are used to estimate the
convex hull. We return X
that represents the observations used.
If trim_hull=FALSE
, then X
is unchanged. However, if trimming
is applied then X
contains only the remaining observations after trimming.