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 range (i.e., range) 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 arc density of the PE-PCD for uniform 1D 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 arc density),
and method and name of the data set used.
Under the null hypothesis of uniformity of Xp
points in the range of Yp
points, arc density
of PE-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).
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 \in (0,1)\).
**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 range of Yp
points are handled with a range correction (or
end interval correction) factor (see the description below and the function code.)
However, in the special case of no Xp
points in the range of Yp
points, arc 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 line of research of the author of the package.
end.int.cor
is for end interval correction, (default is "no end interval correction", i.e., end.int.cor=FALSE
),
recommended when both Xp
and Yp
have the same interval support.
See also (ceyhan:metrika-2012;textualpcds) for more on the uniformity test based on the arc density of PE-PCDs.
TSArcDensPE1D(
Xp,
Yp,
support.int,
r,
c = 0.5,
end.int.cor = FALSE,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)
A list
with the elements
Test statistic
The \(p\)-value for the hypothesis test for the corresponding alternative
.
Confidence interval for the arc density at the given confidence level conf.level
and
depends on the type of alternative
.
Estimate of the parameter, i.e., arc density
Hypothesized value for the parameter, i.e., the null arc density, which is usually the mean arc density under uniform distribution.
Type of the alternative hypothesis in the test, one of "two.sided"
, "less"
, "greater"
Description of the hypothesis test
Name of the data set
A set of 1D points which constitute the vertices of the PE-PCD.
A set of 1D points which constitute the end points of the partition intervals.
Support interval \((a,b)\) with \(a<b\). Uniformity of Xp
points in this interval
is tested.
A positive real number which serves as the expansion parameter in PE proximity region; must be \(\ge 1\).
A positive real number which serves as the centrality parameter in PE proximity region;
must be in \((0,1)\) (default c=.5
).
A logical argument for end interval correction, default is FALSE
,
recommended when both Xp
and Yp
have the same interval support.
Type of the alternative hypothesis in the test, one of "two.sided"
, "less"
, "greater"
.
Level of the confidence interval, default is 0.95
, for the arc density
PE-PCD whose vertices are the 1D data set Xp
.
Elvan Ceyhan
TSArcDensPE
, TSDomPEBin1D
, and TSArcDensPEint
if (FALSE) {
r<-2
c<-.4
a<-0; b<-10; int=c(a,b)
#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)
xf<-(int[2]-int[1])*.1
Xp<-runif(nx,a-xf,b+xf)
Yp<-runif(ny,a,b)
TSArcDensPE1D(Xp,Yp,int,r,c)
#try also TSArcDensPE1D(Xp,Yp,int,r,c,alt="l") and TSArcDensPE1D(Xp,Yp,int,r,c,alt="g")
TSArcDensPE1D(Xp,Yp,int,r,c,end.int.cor = TRUE)
}
Run the code above in your browser using DataLab