An object of class "SpatPatterns"
.
Given the set of \(n\) points, dat
, in a region, this function assigns some of them as cases,
and the rest as controls in a non-RL type=type
fashion.
Type I nonRL pattern assigns \(n_1=\)round(n*prop,0)
of the data points as cases,
and the rest as controls with first selecting a point, \(Z_i\), as a case and assigning the
label case to the remaining points with infection probabilities prob=c(prop+((1-prop)*rho)/(1:k))
where rho
is a
parameter adjusting the NN dependence of infection probabilities.
Type II nonRL pattern assigns \(n_1=\)round(n*ult.prop,0)
of them as cases,
and the rest as controls with first selecting \(k_0=\)round(n*init.prop,0)
as cases initially, then selecting
a contagious case and then assigning the label case to the remaining points with infection probabilities
inversely proportional to their position in the k
NNs.
Type III nonRL pattern assigns \(n_1=\)round(n*prop,0)
of them as cases,
and the rest as controls with first selecting a point, \(Z_i\), as a case and assigning the
label case to the remaining points with infection probabilities \(prob=rho (1-d_{ij}/d_{\max})^{pow}\) where \(d_{ij}\) is the
distance from \(Z_j\) to \(Z_i\) for \(j \ne i\), \(d_{\max}\) is the maximum of \(d_{ij}\) values, rho
is a scaling parameter for
the infection probabilities and pow
is a parameter in the power adjusting the distance dependence.
Type IV nonRL pattern assigns \(n_1=\)round(n*ult.prop,0)
of them as cases,
and the rest as controls with first selecting \(k_0=\)round(n*init.prop,0)
as cases initially and assigning the
label case to the remaining points with infection probabilities equal to the scaled bivariate normal density values
at those points.
The number of cases in Types I and III will be \(n_1\) on the average if the argument poisson=TRUE
(i.e., \(n_1=\)rpois(1,round(n*prop,0))
), otherwise \(n_1=\)round(n*prop,0)
.
The initial and ultimate number of cases in Types II and IV will be \(k_0\) and \(n_1\) on the average if the argument
poisson=TRUE
(i.e., \(k_0=\)rpois(1,round(n*init.prop,0)
) and \(n_1=\)rpois(1,round(n*ult.prop,0))
), otherwise
they will be exactly equal to \(n_1=\)round(n*ult.prop,0)
and \(k_0=\)round(n*init.prop,0)
.
At each type, we stop when we first exceed \(n_1\) cases. That is, the procedure ends when number of cases \(n_c\)
exceed \(n_1\), and \(n_c-n_1\) of the cases (other than the initial case(s)) are randomly selected and relabeled as
controls, i.e., 0s, so that the number of cases is exactly \(n_1\).
In the output cases are labeled as 1 and controls as 0, and initial contagious case is marked with a red cross
in the plot of the pattern.
See ceyhan:SiM-seg-ind2014;textualnnspat and the functions rnonRLI
,
rnonRLII
, rnonRLIII
, and rnonRLIV
for more detail on each type of
non-RL pattern.
Although the non-RL pattern is described for the case-control setting, it can be adapted for any two-class
setting when it is appropriate to treat one of the classes as cases or one of the classes behave like cases
and other class as controls.
The parameters of the non-RL patterns are specified in the argument par.vec
, and the logical arguments rand.init
and poisson pass on to the types where required. rand.init
is not used in type I but used in all other types,
poisson is used in all types, and init.from.cases is used in type I non-RL only.