Returns an object of type DiscuitModel. Available models: SI, SIS, SIR, SEI, SEIR, SEIRa (SEIR and SEIRa are for modelling systems with permanent and temporary immunity, respectively). Custom models can be created by accesing the library directly via C++.
DiscuitModel(modelName, initialCondition, rateFunction, transitionMatrix, observationFunction, priorDensity, observationModel, t0Index = 0)
| modelName | model name (e.g. "SIS", "SEIR", etc) |
|---|---|
| initialCondition | initial condition. |
| rateFunction | string representing the event rate function, e.g. "output1 = parameters1 * population1 * population2". |
| transitionMatrix | transition matrix. |
| observationFunction | observation function. |
| priorDensity | prior density function. |
| observationModel | observation model likelihood function. |
| t0Index | index of the parameter that represents the initial time. |
DiscuitModel("SI", c(100, 1), "output[1] = parameters[1] * population[1] * population[2]", c(-1, 1) , "return population", "return parameters[1] > 0 ? 1 : 0")#>#>#>#> rf (generic function with 1 method) #> #> of (generic function with 1 method) #> #> prior (generic function with 1 method) #>#> Error in paste("function om(y::Array{Int64, 1}, population::Array{Int64, 1})", observationModel, "end", sep = "\n"): argument "observationModel" is missing, with no default