| rassoc {nnspat} | R Documentation |
Generation of Points Associated with a Given Set of Points
Description
An object of class "SpatPatterns".
Generates n_2 2D points associated with the given set of points (i.e., reference points) X_1 in the
type=type fashion with the parameter=asc.par which specifies the level of association.
The generated points are intended to be from a different class, say class 2 (or X_2 points)
than the reference (i.e., X_1 points, say class 1 points, denoted as X1 as an argument
of the function), say class 1 points).
To generate n_2 (denoted as n2 as an argument of the function)X_2 points,
n_2 of X_1 points are randomly selected (possibly with replacement) and
for a selected X1 point, say x_{1ref},
a new point from the class 2, say x_{2new}, is generated from a distribution specified
by the type argument.
In type I association, i.e., if type="I", first a Uniform(0,1) number, U, is generated.
If U \le p, x_{2new} is generated (uniform in the polar coordinates) within a
circle with radius equal to the distance to the closest X_1 point,
else it is generated uniformly within the smallest bounding box containing X_1 points.
In the type C association pattern
the new point from the class 2, x_{2new}, is generated (uniform in the polar coordinates) within a circle
centered at x_{1ref} with radius equal to r_0,
in type U association pattern x_{2new} is generated similarly except it is uniform in the circle.
In type G association, x_{2new} is generated from the bivariate normal distribution centered at x_{1ref} with covariance
\sigma I_2 where I_2 is 2 \times 2 identity matrix.
See Ceyhan (2014) for more detail.
Usage
rassoc(X1, n2, asc.par, type)
Arguments
X1 |
A set of 2D points representing the reference points, also referred as class 1 points. The generated points are associated in a type=type sense with these points. |
n2 |
A positive integer representing the number of class 2 points to be generated. |
asc.par |
A positive real number representing the association parameter. For |
type |
The type of the association pattern. Takes on values |
Value
A list with the elements
pat.type |
= |
type |
The type of the point pattern |
parameters |
The |
ref.points |
The input set of reference points |
desc.pat |
Description of the point pattern |
mtitle |
The |
num.points |
The |
xlimit, ylimit |
The possible ranges of the |
Author(s)
Elvan Ceyhan
References
Ceyhan E (2014). “Simulation and characterization of multi-class spatial patterns from stochastic point processes of randomness, clustering and regularity.” Stochastic Environmental Research and Risk Assessment (SERRA), 38(5), 1277-1306.
See Also
rassocI, rassocC, rassocU, and rassocG
Examples
n1<-20; n2<-1000; #try also n1<-10; n2<-1000;
#with default bounding box (i.e., unit square)
X1<-cbind(runif(n1),runif(n1))
Xdat<-rassoc(X1,n2,asc.par=.05,type="G") #try other types as well
Xdat
summary(Xdat)
plot(Xdat,asp=1)
plot(Xdat)
#with type U association
Xdat<-rassoc(X1,n2,asc.par=.1,type="U")
Xdat
summary(Xdat)
plot(Xdat,asp=1)
plot(Xdat)
#with type C association
Xdat<-rassoc(X1,n2,asc.par=.1,type=2) #2 is for "C"
Xdat
summary(Xdat)
plot(Xdat,asp=1)
plot(Xdat)