IntegrateForward {CollocInfer} | R Documentation |
IntegrateForward
Description
Solves a differential equation going forward based on a proc
object.
Usage
IntegrateForward(y0,ts,pars,proc,more)
Arguments
y0 |
Initial conditions to start from. |
ts |
Vector of time points at which to report values of the differential equation solution. |
pars |
Initial values of parameters to be estimated processes. |
proc |
Object defining the state process. This can either be a function evaluating
the right hand side of the differential equation or a |
more |
If |
Value
Returns the output from solving the differential equation using the lsoda
routines.
Specifically, it returns a list with elements
times The output times.
states The output states.
See Also
Examples
proc = make.SSEproc()
proc$more = make.fhn()
proc$more$names = c('V','R')
y0 = c(-1,1)
names(y0) = c('V','R')
pars = c(0.2,0.2,3)
names(pars) = c('a','b','c')
ts = seq(0,20,0.5)
value = IntegrateForward(y0,ts,pars,proc)
matplot(value$times,value$states)