cl2Mc.int {pcds}R Documentation

The closest points to center in each vertex region in an interval

Description

An object of class "Extrema". Returns the closest data points among the data set, Xp, in each McM_c-vertex region i.e., finds the closest points from right and left to McM_c among points of the 1D data set Xp which reside in in the interval int=(a,b)=(a,b).

McM_c is based on the centrality parameter c(0,1)c \in (0,1), so that 100c100c % of the length of interval is to the left of McM_c and 100(1c)100(1-c) % of the length of the interval is to the right of McM_c. That is, for the interval (a,b)(a,b), Mc=a+c(ba)M_c=a+c(b-a). If there are no points from Xp to the left of McM_c in the interval, then it yields NA, and likewise for the right of McM_c in the interval.

See also (Ceyhan (2012)).

Usage

cl2Mc.int(Xp, int, c)

Arguments

Xp

A set or vector of 1D points from which closest points to McM_c are found in the interval int.

int

A vector of two real numbers representing an interval.

c

A positive real number in (0,1)(0,1) parameterizing the center inside int=(a,b)=(a,b). For the interval, int=(a,b)=(a,b), the parameterized center is Mc=a+c(ba)M_c=a+c(b-a).

Value

A list with the elements

txt1

Vertex Labels are a=1a=1 and b=2b=2 for the interval (a,b)(a,b).

txt2

A short description of the distances as "Distances from ..."

type

Type of the extrema points

desc

A short description of the extrema points

mtitle

The "main" title for the plot of the extrema

ext

The extrema points, here, closest points to McM_c in each vertex region

ind.ext

The data indices of extrema points, ext.

X

The input data vector, Xp.

num.points

The number of data points, i.e., size of Xp

supp

Support of the data points, here, it is int.

cent

The (parameterized) center point used for construction of vertex regions.

ncent

Name of the (parameterized) center, cent, it is "Mc" for this function.

regions

Vertex regions inside the interval, int, provided as a list.

region.names

Names of the vertex regions as "vr=1", "vr=2"

region.centers

Centers of mass of the vertex regions inside int.

dist2ref

Distances from closest points in each vertex region to McM_c.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2012). “The Distribution of the Relative Arc Density of a Family of Interval Catch Digraph Based on Uniform Data.” Metrika, 75(6), 761-793.

See Also

cl2CCvert.reg.basic.tri and cl2CCvert.reg

Examples


c<-.4
a<-0; b<-10; int<-c(a,b)

Mc<-centerMc(int,c)

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

Xp<-runif(nx,a,b)

Ext<-cl2Mc.int(Xp,int,c)
Ext
summary(Ext)
plot(Ext)

cMc<-Ext

Xlim<-range(a,b,Xp)
xd<-Xlim[2]-Xlim[1]

plot(cbind(a,0),xlab="",pch=".",
main=paste("Closest Points in Mc-Vertex Regions \n to the Center Mc = ",Mc,sep=""),
  xlim=Xlim+xd*c(-.05,.05))
  abline(h=0)
abline(v=c(a,b,Mc),col=c(1,1,2),lty=2)
points(cbind(Xp,0))
points(cbind(c(cMc$ext),0),pch=4,col=2)
text(cbind(c(a,b,Mc)-.02*xd,-0.05),c("a","b",expression(M[c])))



[Package pcds version 0.1.8 Index]