rseg.std.tri {pcds} | R Documentation |
Generation of points segregated (in a Type I fashion)
from the vertices of T_e
Description
An object of class "Patterns"
.
Generates n
points uniformly
in the standard equilateral triangle
T_e=T((0,0),(1,0),(1/2,\sqrt{3}/2))
under the type I segregation alternative for eps
in (0,\sqrt{3}/3=0.5773503]
.
In the type I segregation, the triangular forbidden regions
around the vertices are determined by
the parameter eps
which serves as the height of these triangles
(see examples for a sample plot.)
See also (Ceyhan et al. (2006); Ceyhan et al. (2007); Ceyhan (2011)).
Usage
rseg.std.tri(n, eps)
Arguments
n |
A positive integer representing the number of points to be generated. |
eps |
A positive real number representing the parameter of type I segregation (which is the height of the triangular forbidden regions around the vertices). |
Value
A list
with the elements
type |
The type of the point pattern |
mtitle |
The |
parameters |
The exclusion parameter, |
ref.points |
The input set of points |
gen.points |
The output set of generated points segregated
from |
tri.Y |
Logical output for triangulation
based on |
desc.pat |
Description of the point pattern |
num.points |
The |
xlimit , ylimit |
The ranges of the |
Author(s)
Elvan Ceyhan
References
Ceyhan E (2011).
“Spatial Clustering Tests Based on Domination Number of a New Random Digraph Family.”
Communications in Statistics - Theory and Methods, 40(8), 1363-1395.
Ceyhan E, Priebe CE, Marchette DJ (2007).
“A new family of random graphs for testing spatial segregation.”
Canadian Journal of Statistics, 35(1), 27-50.
Ceyhan E, Priebe CE, Wierman JC (2006).
“Relative density of the random r
-factor proximity catch digraphs for testing spatial patterns of segregation and association.”
Computational Statistics & Data Analysis, 50(8), 1925-1964.
See Also
rseg.circular
, rassoc.circular
,
rsegII.std.tri
, and rseg.multi.tri
Examples
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
n<-100
eps<-.3 #try also .15, .5, .75
set.seed(1)
Xdt<-rseg.std.tri(n,eps)
Xdt
summary(Xdt)
plot(Xdt,asp=1)
Xlim<-range(Te[,1])
Ylim<-range(Te[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
Xp<-Xdt$gen.points
plot(Te,asp=1,pch=".",xlab="",ylab="",
main="Type I segregation in the \n standard equilateral triangle",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
polygon(Te)
points(Xp)
#The support for the Type I segregation alternative
sr<-eps/(sqrt(3)/2)
C1<-C+sr*(A-C); C2<-C+sr*(B-C)
A1<-A+sr*(B-A); A2<-A+sr*(C-A)
B1<-B+sr*(A-B); B2<-B+sr*(C-B)
supp<-rbind(A1,B1,B2,C2,C1,A2)
plot(Te,asp=1,pch=".",xlab="",ylab="",
main="Support of the Type I Segregation",
xlim=Xlim+xd*c(-.01,.01),ylim=Ylim+yd*c(-.01,.01))
if (sr<=.5)
{
polygon(Te)
polygon(supp,col=5)
} else
{
polygon(Te,col=5,lwd=2.5)
polygon(rbind(A,A1,A2),col=0,border=NA)
polygon(rbind(B,B1,B2),col=0,border=NA)
polygon(rbind(C,C1,C2),col=0,border=NA)
}
points(Xp)