# Re: [R] Michaelis-menten equation

From: joerg van den hoff <j.van_den_hoff_at_fz-rossendorf.de>
Date: Tue 19 Jul 2005 - 20:51:36 EST

Chun-Ying Lee wrote:
> Dear R users:
> I encountered difficulties in michaelis-menten equation. I found
> that when I use right model definiens, I got wrong Km vlaue,
> and I got right Km value when i use wrong model definiens.
> The value of Vd and Vmax are correct in these two models.
>
> #-----right model definiens--------
> PKindex<-data.frame(time=c(0,1,2,4,6,8,10,12,16,20,24),
> conc=c(8.57,8.30,8.01,7.44,6.88,6.32,5.76,5.20,4.08,2.98,1.89))
> mm.model <- function(time, y, parms) {
> dCpdt <- -(parms["Vm"]/parms["Vd"])*y/(parms["Km"]+y)
> list(dCpdt)}
> Dose<-300
> modfun <- function(time,Vm,Km,Vd) {
> out <- lsoda(Dose/Vd,time,mm.model,parms=c(Vm=Vm,Km=Km,Vd=Vd),
> rtol=1e-8,atol=1e-8)
> out[,2] }
> objfun <- function(par) {
> out <- modfun(PKindex\$time,par,par,par)
> sum((PKindex\$conc-out)^2) }
> print(fit\$par)
>  10.0390733 0.1341544 34.9891829 #--Km=0.1341544,wrong value--
>
>
> #-----wrong model definiens--------
> #-----Km should not divided by Vd--
> PKindex<-data.frame(time=c(0,1,2,4,6,8,10,12,16,20,24),
> conc=c(8.57,8.30,8.01,7.44,6.88,6.32,5.76,5.20,4.08,2.98,1.89))
> mm.model <- function(time, y, parms) {
> dCpdt <- -(parms["Vm"]/parms["Vd"])*y/(parms["Km"]/parms["Vd"]+y)
> list(dCpdt)}
> Dose<-300
> modfun <- function(time,Vm,Km,Vd) {
> out <- lsoda(Dose/Vd,time,mm.model,parms=c(Vm=Vm,Km=Km,Vd=Vd),
> rtol=1e-8,atol=1e-8)
> out[,2]
> }
> objfun <- function(par) {
> out <- modfun(PKindex\$time,par,par,par)
> sum((PKindex\$conc-out)^2)}
> print(fit\$par)
>  10.038821 4.690267 34.989239 #--Km=4.690267,right value--
>
> What did I do wrong, and how to fix it?
> Any suggestions would be greatly appreciated.