Quantitative Ecotoxicology, Page 189, Example 4.12, QICAR-Model
This is example 4.12 on page 189 of Quantitative Ecotoxicology - reproduced with R.
Quantitative Ion Character-Activity Relationships (QICAR) are models that are used to predict toxicity from metal ion characteristics.
One such metal ion characteristic is the ‘softness’:
metal ions can be classified into
- hard (e.g., Be2, Al3, Fe3)
- soft (e.g., Cu, Ag, Hg, Pt2)
- borderline (e.g., Fe2, Co2 , Ni2, Zn2,Cu2) metal ions.
Hard acids preferentially bind to O or N, soft acids to S, and the borderline ions form stable complexes with S, O, or N (Ownby and Newman, 2003).
In this example, the softness of 20 metal ions is given, as well as associated toxicity data (EC50 values from a bacterial assay).
We want to relate softness to toxicity by a linear model.
Get the data from here and read it into R:
As always our first step is to look at the data:
Data consists of a three column table: TOTLEC is the log10 of EC50 values and SOFTCON is a measure of metal ion softness. Plotting the data reveals that there is a strong relationship between both.
To build a linear model we use the
We specify the model via the formula notation
repose ~ predictor and store it as an object names
Since we are interested in the model properties we take a look at the model summary:
This output shows us the intercept (2.617) and slope (SOFTCON, - 2.931) of our model, the R-Square (0.866) as well as some other useful information.
To make a quick plot of our data and model we can use
Polishing the plot
The above plot isn’t very nice, so let’s try to reproduce the plot from Figure 4.15.
To get greek symbols, sub- and superscripts etc into R plots we have to use some special mathematical annotation (see
?plotmath for more information).
As above we plot the data and our model. The model is display as a dashed line (
lty = 'dashed'), the raw data as solid (
pch = 16) and bigger (
cex = 1.4) points.
Moreoever, the axis labels were customized. All
plotmath annotations have to be wrapped into expressions,
sigma[con] is equal to the greek letter sigma subscript with con.
We can also add the model equation to this plot via
text() which is slightly trickier:
First we extract the model coefficients via
If we want to access these numbers (and not type them manually) in the equation, we have to embed the equation into
bqoute() works like
expression() above, except that objects wrapped in
.() will be replaced by their respective values.
Once again we reproduced the same results as in the book using R :) Code and data are available on my github-repo under file name ‘p189’.
 D. Ownby and M. Newman. “Advances in Quantitative Ion Character-Activity Relationships (QICARs): Using Metal-Ligand Binding Characteristics to Predict Metal Toxicity”. In: QSAR \& Combinatorial Science 22.2 (Apr. 2003), pp. 241-246. DOI: 10.1002/qsar.200390018. <URL: http://dx.doi.org/10.1002/qsar.200390018>.