plotCSarcs1D {pcds}R Documentation

The plot of the arcs of Central Similarity Proximity Catch Digraphs (CS-PCDs) for 1D data (vertices jittered along y-coordinate) - multiple interval case

Description

Plots the arcs of CS-PCD whose vertices are the 1D points, Xp. CS proximity regions are constructed with expansion parameter t>0 and centrality parameter c \in (0,1) and the intervals are based on Yp points (i.e. the intervalization is based on Yp points). That is, data set Xp constitutes the vertices of the digraph and Yp determines the end points of the intervals. If there are duplicates of Yp or Xp points, only one point is retained for each duplicate value, and a warning message is printed.

For better visualization, a uniform jitter from U(-Jit,Jit) (default for Jit=.1) is added to the y-direction where Jit equals to the range of Xp and Yp multiplied by Jit with default for Jit=.1).

centers is a logical argument, if TRUE, plot includes the centers of the intervals as vertical lines in the plot, else centers of the intervals are not plotted.

See also (Ceyhan (2016)).

Usage

plotCSarcs1D(
  Xp,
  Yp,
  t,
  c = 0.5,
  Jit = 0.1,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  centers = FALSE,
  ...
)

Arguments

Xp

A vector of 1D points constituting the vertices of the CS-PCD.

Yp

A vector of 1D points constituting the end points of the intervals.

t

A positive real number which serves as the expansion parameter in CS proximity region.

c

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

Jit

A positive real number that determines the amount of jitter along the y-axis, default=0.1 and Xp points are jittered according to U(-Jit,Jit) distribution along the y-axis where Jit equals to the range of Xp and Yp multiplied by Jit).

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles of the x and y axes in the plot (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

centers

A logical argument, if TRUE, plot includes the centers of the intervals as vertical lines in the plot, else centers of the intervals are not plotted.

...

Additional plot parameters.

Value

A plot of the arcs of CS-PCD whose vertices are the 1D data set Xp in which vertices are jittered along y-axis for better visualization.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2016). “Density of a Random Interval Catch Digraph Family and its Use for Testing Uniformity.” REVSTAT, 14(4), 349-394.

See Also

plotPEarcs1D

Examples

t<-1.5
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<-20; ny<-4;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
xr<-range(a,b)
xf<-(xr[2]-xr[1])*.1

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

Xlim=range(Xp,Yp)
Ylim=c(-.2,.2)

jit<-.1

plotCSarcs1D(Xp,Yp,t,c,jit,xlab="",ylab="",xlim=Xlim,ylim=Ylim)

set.seed(1)
plotCSarcs1D(Xp,Yp,t=1.5,c=.3,jit,main="t=1.5, c=.3",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=2,c=.3,jit,main="t=2, c=.3",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=1.5,c=.5,jit,main="t=1.5, c=.5",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=2,c=.5,jit,main="t=2, c=.5",xlab="",ylab="",centers=TRUE)


[Package pcds version 0.1.8 Index]