Learn R Programming

pcds (version 0.1.2)

NumArcsPEmid1D: Number of Arcs for Proportional Edge Proximity Catch Digraphs (PE-PCDs) - middle interval case

Description

Returns the number of arcs of Proportional Edge Proximity Catch Digraphs (PE-PCDs) whose vertices are the given 1D numerical data set, dat. PE proximity region \(N_{PE}(x,r,c)\) is defined with respect to the interval int\(=(a,b)\) for this function.

PE proximity region is constructed with expansion parameter \(r \ge 1\) and centrality parameter \(c \in (0,1)\).

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)\) and for the number of arcs, loops are not allowed so arcs are only possible for points inside the middle interval int for this function.

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

Usage

NumArcsPEmid1D(dat, r, c, int)

Arguments

dat

A set or vector of 1D points which constitute the vertices of PE-PCD.

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.

Value

Number of arcs for the PE-PCD whose vertices are the 1D data set, dat, with expansion parameter, \(r \ge 1\), and centrality parameter, \(c \in (0,1)\). PE proximity regions are defined only for dat points inside the interval int, i.e., arcs are possible for such points only.

References

See Also

NumArcsPEend1D, NumArcsCSmid1D, and NumArcsCSend1D

Examples

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

n<-10
dat<-runif(n,a,b)
NumArcsPEmid1D(dat,r,c,int)

NumArcsPEmid1D(3,r,c,int)

NumArcsPEmid1D(dat,r,c=.3,int)

NumArcsPEmid1D(dat,r=1.5,c,int)

n<-10  #try also n<-20
dat<-runif(n,a-5,b+5)
NumArcsPEmid1D(dat,r,c,int)

dat<-runif(n,a+10,b+10)
NumArcsPEmid1D(dat,r,c,int)

n<-10
dat<-runif(n,a,b)
NumArcsPEmid1D(dat,r,c,int)

# }

Run the code above in your browser using DataLab