epidataCS_permute | R Documentation |
"epidataCS"
Monte Carlo tests for space-time interaction (epitest
)
use the distribution of some test statistic under the null hypothesis
of no space-time interaction. For this purpose, the function
permute.epidataCS
randomly permutes the time or space labels of
the events.
permute.epidataCS(x, what = c("time", "space"), keep)
x |
an object of class |
what |
character string determining what to permute: time points (default) or locations. |
keep |
optional logical expression to be evaluated in the context
of |
the permuted "epidataCS"
object.
Sebastian Meyer
epitest
data("imdepi")
set.seed(3)
permepi <- permute.epidataCS(imdepi, what = "time", keep = time <= 30)
print(imdepi, n = 8)
print(permepi, n = 8)
## the first 6 events are kept (as are all row.names),
## the time labels of the remaining events are shuffled
## (and events then again sorted by time),
## the marginal temporal distribution is unchanged
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.