
Last chance! 50% off unlimited learning
Sale ends in
odeModel
object.ssqOdeModel(p, simObj, obstime, yobs,
sd.yobs = as.numeric(lapply(yobs, sd)),
initialize = TRUE, lower. = -Inf, upper. = Inf,
debuglevel = 0, ..., pnames = NULL)
odeModel
,odeModel
.yobs
. If no standard
deviations are given, these are estimated from yobs.simObj
should be re-initialized after the assignment of new parameter
values. This can be necessary in certain models to assign consistent
values to initial state variables if they depend on paralsoda
),yobs
and simulation,
weighted by the inverse of the standard deviations of the respective
variables.fitOdeModel
. The source code of this function can be
used as a starting point to develop user-defined optimization
criteria (cost functions).fitOdeModel
, optim
,
p.constrain
data(chemostat)
cs1 <- chemostat
## generate some noisy data
parms(cs1)[c("vm", "km")] <- c(2, 10)
times(cs1) <- c(from=0, to=20, by=2)
yobs <- out(sim(cs1))
obstime <- yobs$time
yobs$time <- NULL
yobs$S <- yobs$S + rnorm(yobs$S, sd= 0.1 * sd(yobs$S))*2
yobs$X <- yobs$X + rnorm(yobs$X, sd= 0.1 * sd(yobs$X))
## SSQ between model and data
ssqOdeModel(NULL, cs1, obstime, yobs)
## SSQ between model and data, different parameter set
ssqOdeModel(p=c(vm=1, km=2), cs1, obstime, yobs)
Run the code above in your browser using DataLab