cl2Mc.int: The closest points to center in each vertex region in an...

View source: R/AuxExtrema.R

cl2Mc.intR 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 M_c-vertex region i.e., finds the closest points from right and left to M_c among points of the 1D data set Xp which reside in in the interval int=(a,b).

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

See also (\insertCiteceyhan:metrika-2012;textualpcds).

Usage

cl2Mc.int(Xp, int, c)

Arguments

Xp

A set or vector of 1D points from which closest points to M_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) parameterizing the center inside int=(a,b). For the interval, int=(a,b), the parameterized center is M_c=a+c(b-a).

Value

A list with the elements

txt1

Vertex Labels are a=1 and b=2 for the interval (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 M_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 M_c.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

cl2CCvert.reg.basic.tri and cl2CCvert.reg

Examples

## Not run: 
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])))

## End(Not run)


pcds documentation built on July 9, 2023, 5:54 p.m.