Eduard Szöcs

Data in Environmental Science and Eco(toxico-)logy

# Quantitative Ecotoxicology, Page 94, Example 3.5

Get the data from here and read it into R:

As always we first take a look at the data:

A simple power model may fit the data:

We could fit such model as in example 3.3 via Nonlinear Least Squares or we could try to linearize the relationship by a ln-transform of both DAY and LEAD:

Now we can us lm() to estimate the coefficients and check our model:

The residuals show no pattern:

From the model-output:

We see that out fitted model hast the formula: $Ln(LEAD) = 3.0008 - 0.272 ln(DAY)$ with an R-squared of 0.77 and is statistically significant. The standard errors for the two parameters are 0.064 and 0.031.

So our backtransformed model would be: $LEAD = exp(3.0008)~Day^{-0.272} = 20.68~Day^{-0.272}$

Finally we can also plot our model:

Code and data are available at my github-repo under filename ‘p94’.

Written on January 23, 2013