Learn R Programming

pcds (version 0.1.6)

NumArcsPE1D: Number of arcs and related quantities of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - multiple interval case

Description

Returns the number of arcs and various other quantities, vectors, and lists for Proportional Edge Proximity Catch Digraph (PE-PCD) whose vertices are the data points in Xp in the multiple interval case.

For this function, PE proximity regions are constructed data points inside or outside the intervals based on Yp points with expansion parameter \(r \ge 1\) and centrality parameter \(c \in (0,1)\). That is, for this function, arcs may exist for points in the middle or end intervals.

Range (or convex hull) of Yp (i.e., the interval \((\min(Yp),\max(Yp))\)) is partitioned by the spacings based on Yp points (i.e., multiple intervals are these partition intervals based on the order statistics of Yp points whose union constitutes the range of Yp points). For the number of arcs, loops are not counted.

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

Usage

NumArcsPE1D(Xp, Yp, r, c = 0.5)

Value

A list with the elements

num.arcs

Total number of arcs in all intervals (including the end intervals), i.e., the number of arcs for the entire PE-PCD

num.in.range

Number of Xp points in the range or convex hull of Yp points

num.in.ints

The vector of number of Xp points in the partition intervals (including the end intervals) based on Yp points

weight.vec

The vector of the lengths of the middle partition intervals (i.e., end intervals excluded) based on Yp points

int.num.arcs

The vector of the number of arcs of the components of the PE-PCD in the partition intervals (including the end intervals) based on Yp points

part.int

A matrix with columns corresponding to the partition intervals based on Yp points.

data.int.ind

A vector of indices of partition intervals in which data points reside, i.e., column number of part.int is provided for each Xp point. Partition intervals are numbered from left to right with 1 being the left end interval.

Arguments

Xp

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

Yp

A set or vector of 1D points which constitute the end points of the partition intervals.

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 the middle (partition) intervals with the default c=.5. For an interval, \((a,b)\), the parameterized center is \(M_c=a+c(b-a)\).

Author

Elvan Ceyhan

References

See Also

NumArcsPEint, NumArcsPEmid.int, NumArcsPEend.int, and NumArcsCS1D

Examples

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

#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-15; ny<-4;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
xf<-(int[2]-int[1])*.1

Xp<-runif(nx,a-xf,b+xf)
Yp<-runif(ny,a,b)

NumArcsPE1D(Xp,Yp,r,c)
NumArcsPE1D(Xp,Yp,r,c=.3)
NumArcsPE1D(Xp,Yp,r=1.5,c)
}

Run the code above in your browser using DataLab