Eduard Szöcs

Data in Environmental Science and Eco(toxico-)logy

# Quantitative Ecotoxicology, Page 89, Example 3.3, Backstripping

Get the data from here and read it into R:

We can identify two compartments on this plot: A slow one after day 22 and a fast one before day 22.

First we estimate $C_B$ and $k_B$ for the slow compartment, using linear regression of ln-transformed activity against day and predict from this slow compartment the activity over the whole period:

So this gives us the model $C = 12468 \cdot e^{-0.0124 * Day}$ for the slow component.

We do a bias correction and predict the activity for the whole data-range:

The residuals from these predictions for day 3 to 22 are associated with the fast compartment. And we fit a linear regression to the ln-transformed residuals for the fast compartment.

So the model for the fast component is: $C = 36171 \cdot e^{-0.297 * Day}$

Now we have two models: one for the fast component and one for the slow component, and we can make a plot similar to Figure 8.1 in Newman and Clements (2008, pp. 119–120).

We can use this estimates as start-values to fit a non-linear Model to the data (therefore we stored them into objects).

We want to fit the following model: $C=C_A e^{-k_A \cdot Day} + C_B e^{-k_B \cdot Day}$

• $C_A$ is estimated as $37909 \pm 4824$
• $C_B$ is estimated as $12245 \pm 858$
• $k_A$ is estimated as $0.297 \pm 0.045$
• $k_A$ is estimated as $0.012 \pm 0.001$

And finally we plot data and model.

Again we get nearly the same results with R, except for some differences in the linear models.

This is probably due to the bias-correction in slow-component-model. We have a MSE of

which is identical to the book. From the previous example, the bias can be estimated as $e^{MSE/2}$:

which is different to the book (1.002). However we only use this as starting values for nls() and the results of the non-linear regression are the same in R and SAS.

I have no SAS at hand, so I cannot check this with SAS. However let me know if there is an error in my calculations.

Refs

Newman, Michael C., and William Henry Clements. Ecotoxicology: A Comprehensive Treatment. Boca Raton: Taylor /& Francis, 2008.

Code and data are available at my github-repo under file name ‘p89’.

Written on December 1, 2012