Idom.num1PEint: The indicator for a point being a dominating point for...

View source: R/PropEdge1D.R

Idom.num1PEintR Documentation

The indicator for a point being a dominating point for Proportional Edge Proximity Catch Digraphs (PE-PCDs) for an interval

Description

Returns I(p is a dominating point of the PE-PCD) where the vertices of the PE-PCD are the 1D data set Xp.

PE proximity region is defined with respect to the interval int with an expansion parameter, r \ge 1, and a centrality parameter, c \in (0,1), so arcs may exist for Xp points inside the interval int=(a,b).

Vertex regions are based on the center associated with the centrality parameter c \in (0,1). rv is the index of the vertex region p resides, with default=NULL.

ch.data.pnt is for checking whether point p is a data point in Xp or not (default is FALSE), so by default this function checks whether the point p would be a dominating point if it actually were in the data set.

Usage

Idom.num1PEint(p, Xp, int, r, c = 0.5, rv = NULL, ch.data.pnt = FALSE)

Arguments

p

A 1D point that is to be tested for being a dominating point or not of the PE-PCD.

Xp

A set of 1D points which constitutes the vertices of the PE-PCD.

int

A vector of two real numbers representing an interval.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

c

A positive real number in (0,1) parameterizing the center inside int=(a,b). For the interval, int=(a,b), the parameterized center is M_c=a+c(b-a); default c=.5.

rv

Index of the vertex region in which the point resides, either 1,2 or NULL (default is NULL).

ch.data.pnt

A logical argument for checking whether point p is a data point in Xp or not (default is FALSE).

Value

I(p is a dominating point of the PE-PCD) where the vertices of the PE-PCD are the 1D data set Xp, that is, returns 1 if p is a dominating point, returns 0 otherwise

Author(s)

Elvan Ceyhan

See Also

Idom.num1PEtri

Examples

## Not run: 
r<-2
c<-.4
a<-0; b<-10
int=c(a,b)

Mc<-centerMc(int,c)

n<-10

set.seed(1)
Xp<-runif(n,a,b)

Idom.num1PEint(Xp[5],Xp,int,r,c)

gam.vec<-vector()
for (i in 1:n)
{gam.vec<-c(gam.vec,Idom.num1PEint(Xp[i],Xp,int,r,c))}

ind.gam1<-which(gam.vec==1)
ind.gam1

domset<-Xp[ind.gam1]
if (length(ind.gam1)==0)
{domset<-NA}

#or try
Rv<-rel.vert.mid.int(Xp[5],int,c)$rv
Idom.num1PEint(Xp[5],Xp,int,r,c,Rv)

Xlim<-range(a,b,Xp)
xd<-Xlim[2]-Xlim[1]

plot(cbind(a,0),xlab="",pch=".",xlim=Xlim+xd*c(-.05,.05))
abline(h=0)
points(cbind(Xp,0))
abline(v=c(a,b,Mc),col=c(1,1,2),lty=2)
points(cbind(domset,0),pch=4,col=2)
text(cbind(c(a,b,Mc),-0.1),c("a","b","Mc"))

Idom.num1PEint(2,Xp,int,r,c,ch.data.pnt = FALSE)
#gives an error message if ch.data.pnt = TRUE since point p is not a data point in Xp

## End(Not run)


elvanceyhan/pcds documentation built on June 29, 2023, 8:12 a.m.