precog.sim {smerc} | R Documentation |
Perform precog.test
on simulated data.
Description
procog.sim
efficiently performs
precog.test
on a simulated data set.
The function is meant to be used internally by the
precog.test
function, but is
informative for better understanding the implementation
of the test.
Usage
precog.sim(
nsim = 1,
zones,
ty,
ex,
w,
pop,
max_pop,
logein,
logeout,
d,
cl = NULL,
tol_prob = 0.9,
ysim = NULL
)
Arguments
nsim |
The number of simulations from which to compute the p-value. |
zones |
A list with of candidate zones that includes each regions and its adjacent neighbors. |
ty |
The total number of cases in the study area. |
ex |
The expected number of cases for each region. The default is calculated under the constant risk hypothesis. |
w |
A binary spatial adjacency matrix for the regions. |
pop |
The population size associated with each region. |
max_pop |
The maximum population size allowable for a cluster. |
logein |
The |
logeout |
The |
d |
A precomputed distance matrix based on |
cl |
A cluster object created by |
tol_prob |
A single numeric value between 0 and 1 that describes the quantile of the tolerance envelopes used to prefilter regions from the candidate zones. |
ysim |
A matrix of size |
Value
A list with the vector of tolerance quantiles associated with each region and a vector with the maximum test statistic for each simulated data set.
Author(s)
Joshua French and Mohammad Meysami