Learn R Programming

pcds (version 0.1.4)

TSDomPEBin: A test of segregation/association based on domination number of Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D data - Binomial Approximation

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 i.e., cluster around the centers of the Delaunay triangles) and association (where Xp points cluster around Yp points) based on the (asymptotic) binomial d distribution of the domination number of PE-PCD for uniform 2D data in the convex hull of 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\(=3)\)), 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, probability of success (i.e., \(Pr(\)domination number\(=3)\)) 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 \(M\)-vertex regions where M is a center that 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 triangle case (i.e., Domination Number minus 2 for the one triangle case). That is, the test statistic is based on the domination number for Xp points inside convex hull of Yp points for the PE-PCD and default convex hull correction, ch.cor, is FALSE where M is the center that yields nondegenerate asymptotic distribution for the domination number. For this approximation to work, Yp must be at least 10 (i.e., about 15 or more Delaunay triangles) and Xp must be at least 7 times more than Yp points.

See also (ceyhan:dom-num-NPE-Spat2011;textualpcds).

Usage

TSDomPEBin(
  Xp,
  Yp,
  r,
  ch.cor = F,
  nt = NULL,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Value

A list with the elements

statistic

Test statistic

p.value

The \(p\)-value for the hypothesis test for the corresponding alternative

conf.int

Confidence interval for \(Pr(\)Domination Number\(=3)\) at the given level conf.level and depends on the type of alternative.

estimate

A vector with two entries: first is is the estimate of the parameter, i.e., \(Pr(\)Domination Number\(=3)\) and second is the domination number

null.value

Hypothesized value for the parameter, i.e., the null value for \(Pr(\)Domination Number\(=3)\)

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater"

method

Description of the hypothesis test

data.name

Name of the data set

Arguments

Xp

A set of 2D points which constitute the vertices of the PE-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be in \((1,1.5]\).

ch.cor

A logical argument for convex hull correction, default ch.cor=FALSE, recommended when both Xp and Yp have the same rectangular support.

nt

Number of Delaunay triangles based on Yp points, default is NULL.

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater".

conf.level

Level of the confidence interval, default is 0.95, for the probability of success (i.e., \(Pr(\)domination number\(=3)\) for PE-PCD whose vertices are the 2D data set Xp.

Author

Elvan Ceyhan

References

See Also

TSDomPENor

Examples

Run this code
nx<-20; ny<-4  #try also nx<-1000; ny<-10
r<-1.4  #try also r<-1.5

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,1),runif(ny,0,1))

oldpar <- par(no.readonly = TRUE)
plotDeltri(Xp,Yp,xlab="",ylab="")
par(oldpar)

PEdomMTnd(Xp,Yp,r)

TSDomPEBin(Xp,Yp,r,alt="t")
TSDomPEBin(Xp,Yp,r,alt="l")
TSDomPEBin(Xp,Yp,r,alt="g")
TSDomPEBin(Xp,Yp,r,ch=TRUE)
TSDomPEBin(Xp,Yp,r=1.25)

#or try
ndt<-NumDelTri(Yp)
TSDomPEBin(Xp,Yp,r,nt=ndt)
#values might differ due to the random of choice of the three centers M1,M2,M3
#for the non-degenerate asymptotic distribution of the domination number

TSDomPEBin(Xp,Yp,r)
TSDomPEBin(Xp,Yp[1:3,],r)

TSDomPEBin(Xp,rbind(Yp,Yp),r)

dat.fr<-data.frame(a=Xp)
TSDomPEBin(dat.fr,Yp,r)

dat.fr<-data.frame(a=Yp)
TSDomPEBin(Xp,dat.fr,r)

Run the code above in your browser using DataLab