rel.vert.end.int | R Documentation |
Returns the index of the vertex in the interval, int
,
whose end interval contains the 1D point p
,
that is, it finds the index of the vertex for the point, p
, outside
the interval int
=(a,b)=
(vertex 1,vertex 2);
vertices of interval are labeled as 1 and 2
according to their order in the interval.
If the point, p
, is inside int
,
then the function yields NA
as output.
The corresponding vertex region is an interval
as (-\infty,a)
or (b,\infty)
for the interval (a,b)
.
Then if p<a
, then rv=1
and if p>b
,
then rv=2
.
Unlike rel.vert.mid.int
, centrality parameter (i.e., center
of the interval is not relevant for rel.vert.end.int
.)
See also (\insertCiteceyhan:metrika-2012,ceyhan:revstat-2016;textualpcds).
rel.vert.end.int(p, int)
p |
A 1D point whose end interval region is provided by the function. |
int |
A |
A list
with two elements
rv |
Index of the end vertex whose region contains point, |
int |
The vertices of the interval as a |
Elvan Ceyhan
rel.vert.mid.int
a<-0; b<-10; int<-c(a,b)
rel.vert.end.int(-6,int)
rel.vert.end.int(16,int)
n<-10
xf<-(int[2]-int[1])*.5
XpL<-runif(n,a-xf,a)
XpR<-runif(n,b,b+xf)
Xp<-c(XpL,XpR)
rel.vert.end.int(Xp[1],int)
Rv<-vector()
for (i in 1:length(Xp))
Rv<-c(Rv,rel.vert.end.int(Xp[i],int)$rv)
Rv
Xlim<-range(a,b,Xp)
xd<-Xlim[2]-Xlim[1]
plot(cbind(a,0),xlab="",pch=".",xlim=Xlim+xd*c(-.05,.05))
abline(h=0)
abline(v=c(a,b),col=1,lty = 2)
points(cbind(Xp,0))
text(cbind(Xp,0.1),labels=factor(Rv))
text(cbind(c(a,b),-0.1),c("rv=1","rv=2"))
jit<-.1
yjit<-runif(length(Xp),-jit,jit)
Xlim<-range(a,b,Xp)
xd<-Xlim[2]-Xlim[1]
plot(cbind(a,0),
main="vertex region indices for the points\n in the end intervals",
xlab=" ", ylab=" ",pch=".",xlim=Xlim+xd*c(-.05,.05),ylim=3*range(yjit))
points(Xp, yjit,xlim=Xlim+xd*c(-.05,.05),pch=".",cex=3)
abline(h=0)
abline(v=c(a,b),lty = 2)
text(Xp,yjit,labels=factor(Rv))
text(cbind(c(a,b),-.01),c("rv=1","rv=2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.