| PEdom.num.binom.test1D | R Documentation |
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
within the partition intervals based on Yp points (both residing in the
support interval (a,b)).
The test is for testing the spatial interaction between Xp and Yp points.
The null hypothesis is uniformity of Xp points on (y_{\min},y_{\max}) (by default)
where y_{\min} and y_{\max} are minimum and maximum of Yp points, respectively.
Yp determines the end points of the intervals
(i.e., partition the real line via its spacings called intervalization)
where end points are the order statistics of Yp points.
If there are duplicates of Yp points,
only one point is retained for each duplicate value,
and a warning message is printed.
The alternatives are segregation (where Xp points cluster away from Yp points
i.e., cluster around the centers of the
partition intervals) and association (where Xp
points cluster around Yp points).
The test is based on the (asymptotic) binomial
distribution of the domination number of PE-PCD
for uniform 1D data in the partition intervals based on Yp points.
The test by default is restricted to the range of Yp points,
and so ignores Xp points outside this range.
However, a correction for the Xp points outside
the range of Yp points is available by setting
end.int.cor=TRUE,
which is recommended when both Xp and Yp
have the same interval support.
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
Pr(domination number\le 1)),
and method and name of the data set used.
Under the null hypothesis of uniformity of Xp points in the intervals
based on Yp points, probability of success
(i.e., Pr(domination number\le 1)) equals to its expected value) 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 partition intervals, or segregation).
PE proximity region is constructed with the expansion parameter r \ge 1
and centrality parameter c which yields
M-vertex regions. More precisely,
for a middle interval (y_{(i)},y_{(i+1)}), the center is
M=y_{(i)}+c(y_{(i+1)}-y_{(i)}) for the centrality parameter c.
For a given c \in (0,1), the
expansion parameter r is taken to be 1/\max(c,1-c)
which yields non-degenerate asymptotic distribution of the
domination number.
The test statistic is based on the binomial distribution,
when success is defined as domination number being less than or
equal to 1 in the one interval case
(i.e., number of successes is equal to
domination number \le 1 in the partition intervals).
That is, the test statistic is based on the domination number
for Xp points inside range of Yp points
(the domination numbers are summed over the |Yp|-1 middle intervals)
for the PE-PCD and default end-interval correction, end.int.cor, is FALSE
and the center Mc is chosen so that asymptotic distribution
for the domination number is nondegenerate.
For this test to work, Xp must be at least 10 times more than Yp points
(or Xp must be at least 5 or more per partition interval).
Probability of success is the exact probability of success for the binomial distribution.
**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).
This test is more appropriate when supports of Xp
and Yp have a substantial overlap.
Currently, the Xp points outside the range of Yp points
are handled with an end-interval correction factor
(see the description below and the function code.)
Removing the conditioning and extending it to the case of non-concurring supports is
an ongoing line of research of the author of the package.
See also (\insertCiteceyhan:stat-2020;textualpcds) for more on the uniformity test based on the arc density of PE-PCDs.
PEdom.num.binom.test1D(
Xp,
Yp,
c = 0.5,
support.int = NULL,
end.int.cor = FALSE,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)
Xp |
A set of 1D points which constitute the vertices of the PE-PCD. |
Yp |
A set of 1D points which constitute the end points of the partition intervals. |
c |
A positive real number
which serves as the centrality parameter in PE proximity region;
must be in |
support.int |
Support interval |
end.int.cor |
A logical argument for end-interval correction, default is |
alternative |
Type of the alternative hypothesis in the test,
one of |
conf.level |
Level of the confidence interval, default is |
A list with the elements
statistic |
Test statistic |
p.value |
The |
conf.int |
Confidence interval for |
estimate |
A |
null.value |
Hypothesized value for the parameter, i.e., the null value for |
alternative |
Type of the alternative hypothesis in the test, one of |
method |
Description of the hypothesis test |
data.name |
Name of the data set |
Elvan Ceyhan
PEdom.num.binom.test and PEdom.num1D
a<-0; b<-10; supp<-c(a,b)
c<-.4
r<-1/max(c,1-c)
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-100; ny<-4; #try also nx<-40; ny<-10 or nx<-1000; ny<-10;
set.seed(1)
Xp<-runif(nx,a,b)
Yp<-runif(ny,a,b)
PEdom.num.binom.test1D(Xp,Yp,c,supp)
PEdom.num.binom.test1D(Xp,Yp,c,supp,alt="l")
PEdom.num.binom.test1D(Xp,Yp,c,supp,alt="g")
PEdom.num.binom.test1D(Xp,Yp,c,supp,end=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.