View source: R/StepGillespie.R
simSample | R Documentation |
This function
simulates
many realisations of a model at a given fixed time in the future given an initial time and state, using a function (closure) for advancing the state of the model
, such as created by StepGillespie
or StepSDE
.
simSample(n=100,x0,t0=0,deltat,stepFun,...)
n |
The number of samples required. Defaults to 100. |
x0 |
The initial state of the process at time |
t0 |
The initial time to be associated with the initial state |
deltat |
The amount of time in the future of |
stepFun |
A function (closure) for advancing the state of the process, such as produced by |
... |
Additional arguments will be passed to |
An R matrix whose rows represent the simulated states of the process at time t0+deltat
.
StepSDE
, StepGillespie
, simTimes
, simTs
out3 = simSample(100,c(x1=50,x2=100),0,20,stepLVc)
hist(out3[,"x2"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.