The “growth models tutorials” will take place at Monday/Tuesday 6th and 7th February 2017. The idea is to open the door to the diverse field of mechanistic and statistical modelling of growth processes, especially for laboratory systems.
Prerequisites
The material below is from previuos workshops, to give you a first impression. Specific slides are still in preparation. The prerequitites are approximately at the level of sections 2.1 to 2.9 from http://www.simecol.de/courses/elements_en.pdf, in addition, you may have a look into:
You are welcome!
Thomas Petzoldt, TU Dresden, Institute of Hydrobiology
Monday 2017-02-06 15:00 – 17:00
Slides
Exercises
The selection of an exercise depends on your interest. The Chemostat model should be a good start.
Tuesday 2017-02-07 13:00 – 15:00
Slides
Exercises
Optional
library("deSolve")
learning <- function(t, Knowledge, p) {
with (as.list(p), {
# knowledge increase
dKnowledge <- rate*Knowledge*(1-Knowledge/maxKnowledge)
list(dKnowledge)
})
}
parms <- c (
rate = 0.1, # rate at which new knowledge is acquired
maxKnowledge = 1) # maximal knowledge that can be acquired
# student 1
y1 <- c(Knowledge = 0.01) # initial knowledge about the subject
times <- 1:100
out <- ode(y = y1, times = times, parms = parms, func = learning)
# student 2: more initial knowledge
y2 <- c(Knowledge = 0.1)
out2 <- ode(y = y2, times = times, parms = parms, func = learning)
# student 3: good basic knowledge but too many other things
y3 <- c(Knowledge = 0.1)
parms2 <- parms; parms2["rate"] <- 0.05
out3 <- ode(y = y3, times = times, parms = parms2, func = learning)
plot(out, out2, out3)
library("growthrates")
## Loading required package: lattice
data(bactgrowth)
splitted.data <- multisplit(bactgrowth, c("strain", "conc", "replicate"))
## Get table from single experiment
dat <- splitted.data[["D:0:1"]]
## (1) Spline fit
fit1 <- fit_spline(dat$time, dat$value, spar=0.5)
## derive start parameters from spline fit
p <- coef(fit1)
## (2) exponential model using the first 10 data points
first10 <- dat[1:10, ]
fit2 <- fit_growthmodel(grow_exponential, p=p, time=first10$time, y=first10$value)
## (3) Logistic model for all data
p <- c(coef(fit1), K = max(dat$value))
fit3 <- fit_growthmodel(grow_logistic, p=p, time=dat$time, y=dat$value, transform="log")
plot(fit1)
lines(fit2, col="green")
lines(fit3, col="red")