This is example 3.8 on page 109 of Quantitative Ecotoxicology - reproduced with R. This example is about accumulation and elimination of bromophos from water in a guppy (Poecilia reticulata).
There are two data files for this example - one for the accumulation and on for the elimination.
First we will look at the accumulation phase:
Again we have two columns: One for the time and one for the concentration.
We fit can same model as in example 3.7 to this data. The uptake $(k_u)$ and elimination $(k_e)$ constants are estimated simultaneously (at the same time):
Note that I used different starting values than in the SAS-Code (must be a typo in the book). Also I didn’t specify any bounds.
So from the accumulation data we estimated the uptake and elimination constants as:
- $k_e = 0.0053 \pm 0.0010$
- $k_u = 344.798 \pm 31.855$
However we could also estimate the elimination constant $(k_e)$ from the elimination phase and then use this estimate for our accumulation data.
- First estimate $k_e$ from a linear model (linear transformation)
- Plug this estimated $k_e$ into a nonlinear model to estimate $k_u$
We will estimate $k_e$ from a linear model like in previous examples. We could also use nls for this.
First we need to transform the bromophos-concentration to linearize the relationship.
The we can use lm() to fit the linear model:
So we get an estimate of $k_e$ as $0.0147 \pm 0.0003$.
This is quite different to the $k_e$ estimated simultaneous from the accumulation data!
Our linear model fits very good (R^2 = 0.998, no pattern in the residuals), so something is strange here…
Plug $k_e$ from the elimination phase into the accumulation model
Lets take $k_e$ from the elimination phase and plug it into our accumulation model and investigate the differences:
This estimates $k_u = 643.9 \pm 40.4$ which differs greatly from our initial results!
Lets plot this model and the residuals:
The residuals show a clear curve pattern. But we could also look at the residual sum of squares and the AIC to see which model fit better to the accumulation data:
So the first model seem to better fit to the data. However see the discussion in the book for this example!
Once again we reproduced the results as in the book using R :)
Code and data are available on my github-repo under file name ‘p109’.