Giter VIP home page Giter VIP logo

sensitivitymetals's Introduction

Comparisons of sensitivity rankings for heavy metals

This file contains part of the R code for the article:

Malaj, E., Grote M, Schäfer RB, Brack W, von der Ohe PC. (2012). Physiological sensitivity of freshwater macroinvertebrates to heavy metals. Environmental Toxicology and Chemistry; 31: 1754-1764. https://doi.org/10.1002/etc.1868

Depends

To run this analysis two files are require:
Org_File.csv original data downloaded from ECOTOX (https://cfpub.epa.gov/ecotox/);
Outlier.csv file with lab conditions to be removed.

R version 3.6.1

Packages: lme4, reshape, doBy

Approach

The aim of this work was to derive a unique heavy metal ranking for a representative set of bivalent metals (Cd, Cu, Cr, Ni, Pb, Zn, and Hg) using acute laboratory assays of aquatic invertebrate species. This parameter served as a basis for developing indices to investigate metal pollution. The goal here was not to investigate if toxicity of metals differs (which it does!), but to investigate whether there are differences after scaling. The lack of differences means that we can aggregate metals into a combined index.

Data cleaning

Data was retrieved from US EPA ECOTOX (16,827 observations x 97 features) in 2011 (https://cfpub.epa.gov/ecotox/). Note that more recent versions of ECOTOX dataset might yield different results. ECOTOX is continuously updated as new results are published in peer-reviewed journals. This is an example of how to format and use a dataset in R.

Data wrangling included reshaping, summarizing, making new variables, and combining different datasets using R. Duplicate entries were removed, features were scaled, and independent variable log10-transformed. Where no mean values were reported, the average of the maximum and minimum values was taken. Extreme test conditions were removed, and each species needed to have toxicity data available for at least three metals. In total, 75.7% of the original data were omitted. Subsequently, 4,103 entries remained for seven selected heavy metals, with a diverse taxonomic range of 114 species, based on 412 different sources over the last 50 years.

GLMM

Exploratory data analysis included Pearson correlation coefficient (Figure 1) to examine the strength of relationships variables, model diagnostics (qq-plots, histograms) to check for normality and heterogeneity, outlier detection by using outlier tests and estimating Cook’s distance, and general plotting of parameters in base R. A generalized mixed effect regression algorithm (‘glmer’ in the R package lme4) was used to check for differences between metals groups under the condition of unbalanced design.

Results from the glmer showed that the scaled ranking were comparable across different species, therefore a Smetal ranking was developed and used in other studies (e.g., https://doi.org/10.1016/j.envpol.2017.05.017).

Pair_Plot

Figure 1: Pairwise mean comparison of physiological sensitivity values for each taxa of the seven heavy metals.

sensitivitymetals's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.