Description Usage Arguments Details
Generate bootstrap samples given a sampling procedure for initial values and a procedure for sampling transitions (conditional only on the current value of the process).
1 | sample_markov(times, rinitial, rtransition, time.column.name = "time", ...)
|
times |
vector of timepoints at which to sample |
rinitial |
function to sample initial data.table/values |
rtransition |
function to sample transitions given a data.frame containing current values and the current and proceeding time point |
time.column.name |
column name to use store time values in (defaults to "time") |
... |
additional values to pass to rinitial and rtransition |
rinitial
should take no paramters not specified in
...
while rtransition
takes three arguments:
the time to transition from, the time to transition to, and
a data.table containing the current set of values, in that
order.
rtransition
*is* allowed to destructively update the
data.table
it is passed, but should even then return
that destructively updated data table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.