Hi,
I'm trying to fit bacterial competition models to experimental data.
The experimental data is expressed in natural logarithm scale. I would
like to implement in R the Lotka-Volterra model:
dN1/dt = r1*N1*(1 - N1/K1 - a12*N2/K1)
dN2/dt = r2*N2*(1 - N2/K2 - a12*N1/K2)
We now that: dN1/dt*1/N1 = d(ln(N1))/dt since data is in ln() scale I do
the transformation:
ln(N1) = Y1 thus N1 = exp(Y1)
Considering K1 = N1max and K2=N2max
The Competition model becomes:
dY1/dt = r1*(1 - exp(Y1)/exp(Y1max) - a12*exp(Y2)/exp(Y1max))
dY2/dt = r2*(1 - exp(N2)/exp(Y2max) - a12*exp(N1)/exp(Y2max))
In R, I implemented this model as:
LV <- function(time, state, parms){
with(as.list(c(state, parms)), {
dY1 <- r1*(1 - Y1/Y1max - a12*Y2/Y1max)
dY2 <- r*(1 - Y2/Y2max + a21*Y1/Y2max)
return (list(c(dY1, dY2)))
})
}
So, I would like to know if this implementation of the model is correct.
Thanks
Vasco
Prof. Vasco Augusto Pil?o Cadavez Department of Animal Science Food Safety and Technology Group CIMO - Mountain Research Centre School of Agriculture, Polytechnic Institute of Braganza Campus de Santa Apol?nia 5300-253 Portugal Phone: +351 273 303 403 e-mail: vcadavez at ipb.pt Website: http://esa.ipb.pt/~vcadavez/ Scopus Author ID: 9039121900 ResearcherID: A-3958-2010 ORCID ID: 0000-0002-3077-7414