Displaying 1 result from an estimated 1 matches for "modelfunc".
Did you mean:
modelfun
2013 Jan 03
1
R2OpenBUGS question with differential equations
... dCpdt <- (XD/IT)/parms["Vol"] - (parms["Vm"]/parms["Vol"])*y[1]/(parms["Km"]/parms["Vol"]+y[1])
else
dCpdt <- -(parms["Vm"]/parms["Vol"])*y[1]/(parms["Km"]/parms["Vol"]+y[1])
list(dCpdt)
}
modelfunc<-function(time,Vm,Km,Vol) {
out <- lsoda(0,c(0,time),diffeqfun,parms=c(Vm=Vm,Km=Km,Vol=Vol),rtol=1e-5,atol=1e-5)
out[-1,2]
}
objectfunc <- function(par) {
out <- modelfunc(Input$time, par[1], par[2], par[3])
gift <- which( Input$lev != 0 )
sum((Input$lev[gift]-out[gift])...