View source: R/interventions.R
intfunc | R Documentation |
This internal function executes the intervention of interest on the specified intervention variable
in the data table newdf
.
intfunc(newdf, pool, intervention, intvar, int_time, time_name, t)
newdf |
Data table containing the simulated data at time |
pool |
Data table containing the simulated data at times before |
intervention |
List, whose elements are lists of vectors. Each vector contains a function implementing a particular intervention on a single variable, optionally followed by one or more "intervention values" (i.e., integers used to specify the treatment regime). |
intvar |
Character string specifying the name of the variable to be intervened on in each round of the simulation. |
int_time |
Vector specifying the time points in which the intervention is applied. |
time_name |
Character string specifying the name of the time variable in |
t |
Integer specifying the current time index. |
No value is returned. The data table newdf
is modified in place.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.