BCDevExchange Status Travis-CI Build Status Coverage Status CRAN status CRAN DownloadsDOI

ssdtools is an R package to plot and fit Species Sensitivity Distributions (SSD).

SSDs are cumulative probability distributions which are fitted to toxicity concentrations for multiple species. The ssdtools package uses Maximum Likelihood to fit log-normal, log-logistic, log-Gumbel, Gompertz, gamma or Weibull distributions. Multiple distributions can be averaged using Information Criteria. Confidence intervals on fits and hazard concentrations are produced by bootstrapping.

Installation

To install the latest version from CRAN

install.packages("ssdtools")

To install the latest development version:

install.packages("devtools")
devtools::install_github("bcgov/ssdtools")

Introduction

ssdtools provides a data set for several chemicals including Boron.

Multiple distributions can be fit using ssd_fit_dists()

and plot using the ggplot2 generic autoplot

library(ggplot2)
theme_set(theme_bw())
autoplot(boron_dists)

The goodness of fit can be assessed using ssd_gof

and the model-averaged 5% hazard concentration estimated using ssd_hc

boron_hc5 <- ssd_hc(boron_dists, nboot = 10000)

Model-averaged predictions complete with confidence intervals can be produced using the stats generic predict

and plotted together with the original data using ssd_plot.

ssd_plot(boron_data, boron_pred, shape = "Group", color = "Group", label = "Species",
         xlab = "Concentration (mg/L)", ribbon = TRUE) + expand_limits(x = 3000)

Information

The ssdtools manual is available at https://bcgov.github.io/ssdtools/articles/ssdtools-manual.html.

A shiny webpage developed for non-R-users is available at https://poissonconsulting.shinyapps.io/ssdtools/.

The data included in ssdtools are sourced from the Canadian environmental quality guidelines published by the Canadian Council of Ministers of the Environment. See the data-raw folder for more information.

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

Citation


To cite ssdtools in publications use:

  Thorley et al., (2018). ssdtools An R package to fit Species
  Sensitivity Distributions. Journal of Open Source Software,
  3(31), 1082. https://doi.org/10.21105/joss.01082

A BibTeX entry for LaTeX users is

  @Article{,
    title = {{ssdtools}: An R package to fit Species Sensitivity Distributions},
    author = {Joe Thorley and Carl Schwarz},
    journal = {Journal of Open Source Software},
    year = {2018},
    volume = {3},
    number = {31},
    pages = {1082},
    doi = {10.21105/joss.01082},
  }

How to Contribute

If you would like to contribute to the package, please see our CONTRIBUTING guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

The code is released under the Apache License 2.0

Copyright 2015 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at 

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.