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 subintervals based on Yp
points (both residing in the
interval \((a,b)\)).
If Yp=NULL
the support interval \((a,b)\) is partitioned as Yp=(b-a)*(0:nint)/nint
where nint=round(sqrt(nx),0)
and nx
is number of Xp
points, and the test is for testing the uniformity of Xp
points in the interval \((a,b)\). If Yp
points are given, the test is for testing the spatial interaction between
Xp
and Yp
points.
In either case, the null hypothesis is uniformity of Xp
points on \((a,b)\).
Yp
determines the end points of the intervals (i.e., partition the real line via intervalization)
where end points are the order statistics of Yp
points.
The alternatives are segregation (where Xp
points cluster away from Yp
points i.e., cluster around the centers of the subintervals)
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 subintervals based on Yp
points.
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\(=2)\)), and method and name of the data set used.
Under the null hypothesis of uniformity of Xp
points in the interval based on Yp
points, probability of success
(i.e., \(Pr(\)domination number\(=2)\)) 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 subintervals, 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 \(M=a+c(b-a)\) for the centrality parameter c
and 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 domination number is scaled
to have value 0 and 1 in the one interval case (i.e., Domination Number minus 1 for the one interval case).
That is, the test statistic is based on the domination number for Xp
points inside the interval based on Yp
points
for the PE-PCD . For this approach to work, Xp
must be large for each subinterval, but 5 or more per subinterval
seems to work fine in practice. Probability of success is chosen in the following way for various parameter choices.
asy.bin
is a logical argument for the use of asymptotic probability of success for the binomial distribution,
default is asy.bin=FALSE
. It is an option only when Yp
is not provided. When Yp
is provided or when Yp
is not provided
but asy.bin=TRUE
, asymptotic probability of success for the binomial distribution is used. When Yp
is not provided
and asy.bin=FALSE
, the finite sample asymptotic probability of success for the binomial distribution is used with number
of trials equals to expected number of Xp
points per subinterval.
TSDomPEBin1D(
Xp,
Yp = NULL,
int,
c = 0.5,
asy.bin = FALSE,
end.int.cor = FALSE,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)
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 subintervals, default is NULL
.
When Yp=NULL
, the support interval \((a,b)\) is partitioned as Yp=(b-a)*(0:nint)/nint
where nint=round(sqrt(nx),0)
and nx
is the number of Xp
points.
Support interval \((a,b)\) with \(a<b\). uniformity of Xp
points in this interval
is tested.
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 the use of asymptotic probability of success for the binomial distribution,
default asy.bin=FALSE
. It is an option only when Yp
is not provided. When Yp
is provided or when Yp
is not provided
but asy.bin=TRUE
, asymptotic probability of success for the binomial distribution is used. When Yp
is not provided
and asy.bin=FALSE
, the finite sample asymptotic probability of success for the binomial distribution is used with number
of trials equals to expected number of Xp
points per subinterval.
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 probability of success
(i.e., \(Pr(\)domination number\(=2)\) for PE-PCD whose vertices are the 1D data set Xp
.
A list
with the elements
Test statistic
The \(p\)-value for the hypothesis test for the corresponding alternative
Confidence interval for \(Pr(\)domination number\(=2)\) at the given level conf.level
and
depends on the type of alternative
.
A vector
with two entries: first is is the estimate of the parameter, i.e.,
\(Pr(\)domination number\(=2)\) and second is the domination number
Hypothesized value for the parameter, i.e., the null value for \(Pr(\)domination number\(=2)\)
Type of the alternative hypothesis in the test, one of "two.sided"
, "less"
, "greater"
Description of the hypothesis test
Name of the data set
TSDomPEBin
and PEdom1D
# NOT RUN {
a<-0; b<-10; int<-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<-20; 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)
PEdom1D(Xp,Yp,r,c)
plotIntervals(Xp,Yp,xlab="",ylab="")
plotPEregsMI(Xp,Yp,r,c)
TSDomPEBin1D(Xp,Yp,int,c,alt="t")
TSDomPEBin1D(Xp,int=int,c=c,alt="t")
TSDomPEBin1D(Xp,Yp,int,c,alt="l")
TSDomPEBin1D(Xp,Yp,int,c,alt="g")
TSDomPEBin1D(Xp,Yp,int,c,end=TRUE)
TSDomPEBin1D(Xp,Yp,int,c=.25)
# }
Run the code above in your browser using DataLab