CSedge.dens.test {pcds.ugraph} | R Documentation |
A test of segregation/association based on edge density of underlying or reflexivity graph of Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data
Description
An object of class "htest"
(i.e., hypothesis test) function
which performs a hypothesis test of complete spatial
randomness (CSR) or uniformity of Xp
points
in the convex hull of Yp
points against the alternatives
of segregation (where Xp
points cluster
away from Yp
points) and association
(where Xp
points cluster around
Yp
points) based on the normal approximation
of the edge density of the underlying or reflexivity graph of
CS-PCD for uniform 2D data.
The function yields the test statistic,
p
-value for the corresponding alternative
,
the confidence interval, estimate
and null value for the parameter of interest
(which is the edge density),
and method and name of the data set used.
Under the null hypothesis of uniformity of Xp
points
in the convex hull of Yp
points, edge density
of underlying or reflexivity graph of CS-PCD
whose vertices are Xp
points equals
to its expected value under the uniform distribution and
alternative
could be two-sided, or left-sided
(i.e., data is accumulated around the Yp
points, or association)
or right-sided (i.e., data is accumulated
around the centers of the triangles,
or segregation).
CS proximity region is constructed
with the expansion parameter t > 0
and CM
-edge regions
(i.e., the test is not available for a general center M
at this version of the function).
**Caveat:** This test is currently a conditional test,
where Xp
points are assumed to be random,
while Yp
points are
assumed to be fixed (i.e., the test is conditional on Yp
points).
Furthermore,
the test is a large sample test when Xp
points
are substantially larger than Yp
points,
say at least 5 times more.
This test is more appropriate when supports of Xp
and Yp
have a substantial overlap.
Currently, the Xp
points
outside the convex hull of Yp
points
are handled with a correction factor
which is derived under the assumption of
uniformity of Xp
and Yp
points in the study window,
(see the description below for the argument ch.cor
and the function code.)
However, in the special case of no Xp
points
in the convex hull of Yp
points,
edge density is taken to be 1,
as this is clearly a case of segregation.
Removing the conditioning and extending it to
the case of non-concurring supports is
an ongoing topic of research of the author of the package.
ch.cor
is for convex hull correction
(default is "no convex hull correction"
, i.e., ch.cor=FALSE
)
which is recommended
when both Xp
and Yp
have the same rectangular support.
See also (Ceyhan (2005, 2016)) for more on the test based on the edge density of underlying or reflexivity graphs of CS-PCDs.
Usage
CSedge.dens.test(
Xp,
Yp,
t,
ugraph = c("underlying", "reflexivity"),
ch.cor = FALSE,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)
Arguments
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD. |
Yp |
A set of 2D points which constitute the vertices of the Delaunay triangles. |
t |
A positive real number which serves as the expansion parameter in CS proximity region. |
ugraph |
The type of the graph based on CS-PCDs,
|
ch.cor |
A logical argument for convex hull correction,
default |
alternative |
Type of the alternative hypothesis in the test,
one of |
conf.level |
Level of the confidence interval,
default is |
Value
A list
with the elements
statistic |
Test statistic |
p.value |
The |
conf.int |
Confidence interval for the edge density
at the given confidence level |
estimate |
Estimate of the parameter, i.e., edge density |
null.value |
Hypothesized value for the parameter, i.e., the null edge density, which is usually the mean edge density under uniform distribution. |
alternative |
Type of the alternative hypothesis in the test,
one of |
method |
Description of the hypothesis test |
data.name |
Name of the data set |
Author(s)
Elvan Ceyhan
References
Ceyhan E (2005).
An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications.
Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.
Ceyhan E (2016).
“Edge Density of New Graph Types Based on a Random Digraph Family.”
Statistical Methodology, 33, 31-54.
See Also
PEedge.dens.test
and CSarc.dens.test
Examples
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-100; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))
pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="")
CSedge.dens.test(Xp,Yp,t=1.5)
CSedge.dens.test(Xp,Yp,t=1.5,ch=TRUE)
CSedge.dens.test(Xp,Yp,t=1.5,ugraph="r")
CSedge.dens.test(Xp,Yp,t=1.5,ugraph="r",ch=TRUE)
#since Y points are not uniform, convex hull correction is invalid here