initialize-odemodel-method: Constructor method of "odemodel" class

initialize,odemodel-methodR Documentation

Constructor method of "odemodel" class

Description

Constructor method of "odemodel" class

Usage

## S4 method for signature 'odemodel'
initialize(
  .Object,
  name,
  model,
  observation,
  initial,
  par,
  link,
  diffnames,
  keep_sensitivity = TRUE,
  call
)

Arguments

.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

Value

An object of class “odemodel” as described in odemodel-class.

Examples

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")
)

parksw3/fitode documentation built on April 3, 2024, 7:45 a.m.