initialize,odemodel-method | R Documentation |
Constructor method of "odemodel" class
## S4 method for signature 'odemodel' initialize( .Object, name, model, observation, initial, par, link, diffnames, keep_sensitivity = TRUE, call )
.Object |
object |
name |
name of the model |
model |
ode model |
observation |
observation model |
initial |
initial values |
par |
model parameters |
link |
link functions for parameters (log links are used as default) |
diffnames |
optional character vector specifying the names of a variable for which the consecutive difference needs to be calculated |
keep_sensitivity |
(logical) maintain the Jacobian as a part of the model object? |
call |
original function call |
An object of class “odemodel” as described in odemodel-class
.
SI_model <- odemodel( name = "SI", model = list( S ~ - beta*S*I/N, I ~ beta*S*I/N - gamma*I ), observation = list( susceptible ~ dnorm(mean=S, sd=sigma1), infected ~ dnorm(mean=I, sd=sigma2) ), initial = list( S ~ N * (1 - i0), I ~ N * i0 ), par = c("beta", "gamma", "N", "i0", "sigma1", "sigma2"), link = c(i0="logit") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.