Description Usage Arguments Value Author(s) References See Also Examples
The function stKtest
wraps functions in package splancs to
perform the K-function based Monte Carlo permutation test for space-time
clustering (Diggle et al, 1995) for "epidataCS"
.
1 2 3 4 5 6 7 |
object |
an object of class |
eps.s, eps.t |
numeric vectors defining the spatial and temporal
grids of critical distances over which to evaluate the test.
The default ( |
B |
the number of permutations. |
cores |
the number of parallel processes over which to distribute the requested number of permutations. |
seed |
argument for |
poly |
the polygonal observation region of the events (as an object handled
by |
x |
an |
which |
a character vector indicating which diagnostic plots to produce.
The full set is |
args.D,args.D0,args.R,args.MC |
argument lists for the plot functions |
mfrow |
|
... |
ignored (argument of the generic). |
an object of class "stKtest"
(inheriting from "htest"
),
which is a list with the following components:
method |
a character string indicating the type of test performed. |
data.name |
a character string naming the supplied |
statistic |
the sum U of the standardized residuals R(s,t). |
parameter |
the number |
p.value |
the p-value for the test. |
pts |
the coordinate matrix of the event locations (for
|
stK |
the estimated K-function as returned by
|
seD |
the standard error of the estimated D(s,t) as
returned by |
mctest |
the observed and permutation values of the test
statistic as returned by |
The plot
-method invisibly returns NULL
.
Sebastian Meyer
Diggle, P. J.; Chetwynd, A. G.; HÀggkvist, R. and Morris, S. E. (1995): Second-order analysis of space-time clustering Statistical Methods in Medical Research, 4, 124-136.
the simple knox
test and function epitest
for testing "twinstim"
models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if (requireNamespace("splancs")) {
data("imdepi")
imdepiB <- subset(imdepi, type == "B")
mainpoly <- coordinates(imdepiB$W@polygons[[1]]@Polygons[[5]])
if (surveillance.options("allExamples")) {
SGRID <- c(0, 10, 25, 50, 75, 100, 150, 200)
TGRID <- c(0, 7, 14, 21, 28)
B <- 99
CORES <- 2
} else { # dummy settings for fast CRAN checks
SGRID <- c(0, 50)
TGRID <- c(0, 30)
B <- 9
CORES <- 1
}
imdBstKtest <- stKtest(imdepiB, eps.s = SGRID, eps.t = TGRID, B = B,
cores = CORES, seed = 1, poly = list(mainpoly))
print(imdBstKtest)
plot(imdBstKtest)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.