Learn R Programming

pcds (version 0.1.4)

plotPEregsMI: The plot of the Proportional Edge (PE) Proximity Regions (vertices jittered along \(y\)-coordinate) - multiple interval case

Description

Plots the points in and outside of the intervals based on Yp points and also the PE proximity regions (i.e., intervals). PE proximity region is constructed with expansion parameter \(r \ge 1\) and centrality parameter \(c \in (0,1)\).

For better visualization, a uniform jitter from \(U(-Jit,Jit)\) (default is \(Jit=.1\)) times range of Xp and Yp and the proximity regions (intervals)) is added to the \(y\)-direction.

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:metrika-2012;textualpcds).

Usage

plotPEregsMI(
  Xp,
  Yp,
  r,
  c,
  Jit = 0.1,
  main = "",
  xlab = "",
  ylab = "",
  xlim = NULL,
  ylim = NULL,
  centers = FALSE,
  ...
)

Value

Plot of the PE proximity regions for 1D points located in the middle or end intervals based on Yp points

Arguments

Xp

A set of 1D points for which PE proximity regions are plotted.

Yp

A set of 1D points which constitute the end points of the intervals which partition the real line.

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=0.5.

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 and the proximity regions (intervals) multiplied by Jit).

main

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

xlab, ylab

Titles for the \(x\) and \(y\) axes, respectively (default="" 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 (default is FALSE).

...

Additional plot parameters.

Author

Elvan Ceyhan

References

See Also

plotPEregsMI, plotCSregsInt, and plotCSregsMI

Examples

Run this code
r<-2
c<-.4
a<-0; b<-10;

#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)

plotPEregsMI(Xp,Yp,r,c,xlab="",ylab="")

plotPEregsMI(Xp,Yp+10,r,c,xlab="",ylab="")

Run the code above in your browser using DataLab