| epidataCS_update | R Documentation |
"epidataCS"
The update method for the "epidataCS" class
may be used to modify the hyperparameters \epsilon (eps.t)
and \delta (eps.s), the indicator matrix qmatrix determining
possible transmission between the event types, the numerical
accuracy nCircle2Poly of the polygonal approximation, and
the endemic covariates from stgrid (including the time intervals).
The update method will also update the auxiliary information contained
in an "epidataCS" object accordingly, e.g., the vector of potential
sources of each event, the influence regions, or the endemic covariates
copied from the new stgrid.
## S3 method for class 'epidataCS'
update(object, eps.t, eps.s, qmatrix, nCircle2Poly, stgrid, ...)
object |
an object of class |
eps.t |
numeric vector of length 1 or corresponding to the number of events in
|
eps.s |
numeric vector of length 1 or corresponding to the number of events in
|
qmatrix |
square indicator matrix (0/1 or TRUE/FALSE) for possible transmission between the event types. |
nCircle2Poly |
accuracy (number of edges) of the polygonal approximation of a circle. |
stgrid |
a new |
... |
unused (argument of the generic). |
The updated "epidataCS" object.
Sebastian Meyer
class "epidataCS".
data("imdepi")
## modify interaction ranges: shorter but over the whole observation region
imdepi2 <- update(imdepi, eps.t = 20, eps.s = Inf)
## Note: this reduces the number of infectives per time point
plot(as.stepfun(imdepi))
lines(as.stepfun(imdepi2), col = 2)
## and affects the set of potential sources for each event:
table("imdepi" = summary(imdepi) $nSources,
"imdepi2" = summary(imdepi2)$nSources)
## switch to a time-constant grid
imdepi3 <- update(imdepi2, stgrid = subset(imdepi2$stgrid, BLOCK == 1, -stop))
imdepi3 # "1 time block"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.