Learn R Programming

pcds (version 0.1.4)

plotPEregsInt: The plot of the Proportional Edge (PE) Proximity Regions for a general interval (vertices jittered along \(y\)-coordinate) - one interval case

Description

Plots the points in and outside of the interval int and also the PE proximity regions (which are also intervals). PE proximity regions are 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 proximity regions and dat) 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

plotPEregsInt(
  dat,
  r,
  c = 0.5,
  int,
  Jit = 0.1,
  main = "",
  xlab = "",
  ylab = "",
  xlim = NULL,
  ylim = NULL,
  centers = FALSE,
  ...
)

Value

Plot of the PE proximity regions for 1D points in or outside the interval int

Arguments

dat

A set of 1D points for which PE proximity regions are to be constructed.

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

int

A vector of two real numbers representing an interval.

Jit

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

main

Title of the main heading of the plot.

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.

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.

Author

Elvan Ceyhan

References

See Also

plotPEregsMI, plotCSregsInt, and plotCSregsMI

Examples

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

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

dat<-runif(n,a-xf,b+xf)  #try also dat<-runif(n,a-5,b+5)

plotPEregsInt(7,r,c,int)

plotPEregsInt(dat,r,c,int)

plotPEregsInt(17,r,c,int)
plotPEregsInt(1,r,c,int)
plotPEregsInt(4,r,c,int)

plotPEregsInt(-7,r,c,int)

Run the code above in your browser using DataLab