Learn R Programming

pcds (version 0.1.1)

IndNPEmid1D: The indicator for the presence of an arc from a point to another for Proportional Edge Proximity Catch Digraphs (PE-PCDs) - middle interval case

Description

Returns I(x2 in \(NPE(x1,r,c)\)) for points x1 and x2, that is, returns 1 if x2 is in \(NPE(x1,r,c)\), returns 0 otherwise, where \(NPE(x,r,c)\) is the PE proximity region for point \(x\) and is constructed with expansion parameter \(r \ge 1\) and centrality parameter c in \((0,1)\) for the interval \((a,b)\).

PE proximity regions are defined with respect to the middle interval int and vertex regions are based on the center associated with the centrality parameter c in \((0,1)\). For the interval, \(int=(a,b)\), the parameterized center is \(M_c=a+c(b-a)\). rv is the index of the vertex region x1 resides, with default=NULL. If x1 and x2 are distint and either of them are outside interval int, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., loops are allowed in the digraph).

See also (ceyhan:metrika-2012,ceyhan:revstat-2016;textualpcds).

Usage

IndNPEmid1D(x1, x2, r, c, int, rv = NULL)

Arguments

x1, x2

1D points; x1 is the point for which the proximity region, \(NPE(x1,r,c)\) is constructed and x2 is the point which the function is checking whether its inside \(NPE(x1,r,c)\) or not.

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)\).

int

A vector of two real numbers representing an interval.

rv

The index of the vertex region x1 resides, with default=NULL.

Value

I(x2 in \(NPE(x1,r,c)\)) for points x1 and x2 that is, returns 1 if x2 is in \(NPE(x1,r,c)\), returns 0 otherwise

References

See Also

IndNPEend1D, IndNCSmid1D, and IndNCSend1D

Examples

Run this code
# NOT RUN {
c<-.4
r<-2
a<-0; b<-10; int<-c(a,b)

IndNPEmid1D(7,5,r,c,int)
IndNPEmid1D(17,17,r,c,int)
IndNPEmid1D(1,3,r,c,int)

IndNPEmid1D(3,5,r,c,int)
IndNPEmid1D(3,3,r,c,int)
IndNPEmid1D(4,5,r,c,int)
IndNPEmid1D(a,5,r,c,int)

c<-.4
r<-2
a<-0; b<-10; int<-c(a,b)
IndNPEmid1D(7,5,r,c,int)

# }

Run the code above in your browser using DataLab