Modelling Tools for Reproduction and Survival Data in Ecotoxicology

Tools for ecotoxicologists and regulators dedicated to the mathematical and statistical modelling of toxicity test data. They use advanced and innovative methods for a valuable quantitative environmental risk assessment. See also Delignette-Muller et al. (2017) . and Baudrot et al. (2018) .

Companion R package for MOSAIC website

  • need Rtools 3.3 and last R version.


CRAN release version

CRAN version

Build status for development version

Build Status

Report a problem

Use the issue tracker to report a problem.

Compilation (for command-line users)

  • cd to source directory
  • Build from sources (creates vignette and archive) R CMD build .
  • Build and install R CMD INSTALL --build .
  • Check the package R CMD check --as-cran morse_X.X.X.tar.gz
  • Update package description/NAMESPACE
    • under the R interpreter: roxygen2::roxygenise(".")
  • Generate documentation
    • reference manual: R CMD Rd2pdf --output=documentation .
    • vignettes (using the R interpreter): devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
  • Run unit tests
    • under the R interpreter: devtools::test()

Compilation (with RStudio)

  • need devtools, ROxygen2 v5.0.1 or higgher
  • RStudio builder configuration:
    • Project Options : enable Use devtools package... enable Generate documentation... ROxygen options...: all enable exeptVignettesandSource and binary package build`
    • vignettes folder must contain only 3 files: biblio.bib modelling.Snw tutorial.Rmd
    • update Documentation (no vignette, only NAMESPACE and Rd) Document or Ctrl + Shift + D
    • check if the two folder inst and build were created.
    • build the source file : More : Build Source Package

Install the package from source

R: remove.packages("morse", lib="~/Documents/R/R-X.X.X/library") R: install.packages("~/Documents/morse_X.X.X.tar.gz", repos = NULL, type = "source") R: library("morse") R: ?morse


  • Build from sources: Build & Reload
  • Test: Build > More > Test package (Ctrl + Shift + T). Note that you must activate the option "Use devtools package functions if available" in Project Options > Build Tools.
  • Generate the documentation: Build & Reload or Build > More > Document (Ctrl + Shift + D)
  • Check the package with the stable and the devel version of R:
    • in Build > More > Configure Build Tools, add --as-cran in Check Package -- R CMD check additional options
    • Build > Check (Ctrl + Shift + E)


=== morse : MOdelling tools for Reproduction and Survival data in Ecotoxicology ===

Version 3.2.2


  • add warning message in 'survFit' function when 'hb_value' is fixed.
  • add function 'predict_Nsurv_ode' function to compute predictive function with the ODE solver from deSolve package.

Version 3.2.1


  • changes in the vignette 'Tutorial'.
  • changes in the Reference manual 'morse.pdf'.


  • Details NRMSE and PPC for each time-series (i.e., replicates)

Version 3.2.0


  • Change default value for argument 'adddata' in function 'plot' as TRUE


  • add 'predict_Nsurv' function to compute prediction for the number of survivors.
  • add 'predict_Nsurv_check' function to compute criteria to check model. performance: (i) percentage of observation within the 95% credible interval of prediction drawn from posterior, (ii) the Normalised Root Mean Square Error (NRMSE) and (iii) the Survival-Probability Prediction Error (SPPE).
  • add 'ppc.survFitPredict_Nsurv' function to plot ppc for 'survFitPredict_Nsurv' object
  • add 'plot.survFitPredict_Nsurv' function to plot 'survFitPredict_Nsurv' object
  • add 'Nsurv_ppc' and 'Nsurv_sim' in 'mcmc' object within 'survFit' class objects
  • Modif JAGS models to ensure probability use for binomial distribution is <1 (JAGS does not work with p=1).
  • add option to remove background mortality, 'hb_value' TRUE/FALSE, in 'survFit' methods.
  • add 'predict_ode' function to include deSolve package for ode integration for prediction.
  • add option 'EFSA_name' in function 'summary', 'plot_prior_posterior' and 'priors_distribution' to adapt parameter name of GUTS model to EFSA Scientific Opinion (doi: 10.2903/j.efsa.2018.5377) naming.
  • add binomial credible interval of observation in plot for 'survFitVarExp' object

Version 3.1.1


  • changes in the tutorial vignettes.

Version 3.1.0


  • add 'priors_distribution' function to easly returned the distribution of priors.
  • add 'MFx' function to compute the Multiplication Factor leading to a reduction of x percent of survival. Return an object of class 'MFx'.
  • add 'plot.MFx' function to plot object of class 'MFx'.


  • change the automatized title of the plot of an 'LCx' object.

Version 3.0.0


  • add survival dataset for pulse exposure: 'propiconazole_pulse_exposure'.
  • add S3 'survFit' method for TKTD modeling with model SD or IT for both 'time constant exposure' or 'time varying exposure'.
  • add 'LCx' function to plot Lethal Concentration for x percent of the population for survFit model (TKTD SD or IT with constant or varying exposure).
  • add option 'main' to add title in plot for PPC.
  • add section for 'survFit' TKTD IT and SD (cst and var exposure) in the tutorial vignette.


  • change the require dataset for survData and reproData: replicates are unique for each time-serie all over concentration profiles
  • change the structure of all datasets included to satisfy that all replicates are unique for each time-serie all over concentration profiles.

Version 2.2.0


  • add the 'survFitTKTD' function to analyse 'survData' object with a time-exposur response model.
  • add the S3 'plot', 'print', 'summary' and 'ppc' methods for the 'survFitTKTD' class.
  • add two survival datasets : dichromate and propiconazole.
  • the method plotDoseResponse replaces the plot.survData and plot.reproData when the argument target.time was set. Now the response is expressed in survival rate or in number of offspring per individual-days.
  • the calcul of the mean fitted curve of 'plot.reproFitTT' and 'plot.survFitTT' is the same of the 95 % Credible limits.
  • the ci arg in 'plot.reproFitTT' and 'plot.survFitTT' was suppressed and the credible limites was allways plotted.
  • added a new argument 'adddata' in 'plot.reproFitTT' and 'plot.survFitTT' to draw the datas with theyre confidence interval.
  • add a new argument 'spaghetti' in 'plot.reproFitTT' and 'plot.survFitTT' to draw the credible interval as multiple curves.

Version 2.1.1


  • update the cross-references link to ggplot2 package

Version 2.1.0


  • JAGS version 4.0.0 or higher is required
  • rjags version 4.4 or higher is required


  • the dataset cadmium2 now reports the number of eggs instead of the number of clutches.
  • add S3 method ppc to plot the posterior predictive check on reproFitTT and survFitTT objects.
  • added a new argument 'remove.someLabels' to plot.reproData and plot.survData functions to avoid the overlap of labels of the X-axis in ggplot style.


  • the check on replicate's label has been removed in the survDatacheck function.
  • minor changes in the tutorial vignette.
  • remove titles in legend of plot.reproFitTT and plot.survFitTT in ggplot style.
  • remove observed value points in plot.reproFitTT.
  • survDataCheck and reproDataCheck would fail on datasets with integer-only concentrations.
  • the summary functions for survData and reproData now don't show the number of datapoints per concentration and the number of datapoints per time. This was considered misleading in the case where some replicates have a different initial number of individuals.
  • plot.survData (and plot.reproData) don't display a legend anymore with unconstrained time and concentration. They used to display a misleading "replicate" legend, which would not correspond to a real replication unit (beaker).
  • in plot.survData all ggplot style graphique start at 0,0.


  • the DIC is not calculated in survFiTT anymore. Since we don't perform model selection, this was not really useful and we thus obtain a significant speed-up.
  • the column ID was removed in survData and reproData objects.

Version 2.0.0


  • new package structure and function names.
  • the function is now called reproData and creates an object of class reproData without specific target time.
  • the function is now called reproDataCheck.
  • the repro.fullsurvplot and repro.cumulplot functions are replaced by the generic plot S3 method for the class reproData.
  • the repro.survplot function now depends on the plot S3 metod for the new class survData.
  • the function is now called reproFitTT with the associated class reproFitTT, with the argument target.time.
  • add of new arguments for the reproFitTT function:
    • "stoc.part" to choose the stochastic part of the model.
    • "ecx" to choose the value of ECx estimated by the function.
    • the deterministic part name are now in the legend of the plot function.
    • when stoc.part = "bestfit" is choosen, the model "gammapoisson" is chosen if the DIC of gamma-poisson model is smaller than DIC of poisson model of 10 (1 in the previous version).
  • upgrade the informations in the summary of the reproData class.
  • upgrade the informations in the summary of the reproFitTT function, and values of parameters are expressed in untransformed values.
  • the credible interval in plot.reproFitTT are now a ribbon.
  • add a new group of functions to analyze survival data:
    • the survDataCheck function checks the integrity of the dataset.
    • the survData function with associated S3 method creates survData object.
    • the survFitTT function run the bayesian estimation to fit an exposure-response model for survival data with the associated specific S3 method: print, plot and summary.
  • the lattice graphics was suppressed.
  • the repro.convergence function was suppressed.


  • new selection rules for the "bestfit" method in the function reproFitTT.
  • in log scale the points at concentration = 0 are not drawn (ggplot).

Version 1.0.2


  • correction of points color in the legend for the function (ggplot).
  • change the ylim range for the function (generic).
  • correction of the log.scale option for the repro.survplot function.

Version 1.0.1

  • Initial release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


3.2.5 by Philippe Veber, a year ago

Report a bug at

Browse source code at

Authors: Virgile Baudrot [aut] , Sandrine Charles [aut] , Marie Laure Delignette-Muller [aut] , Wandrille Duchemin [ctb] , Benoit Goussen [ctb] , Guillaume Kon-Kam-King [ctb] , Christelle Lopes [ctb] , Philippe Ruiz [aut] , Alexander Singer [ctb] , Philippe Veber [aut]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports coda, deSolve, dplyr, epitools, graphics, grDevices, ggplot2, grid, gridExtra, magrittr, methods, reshape2, rjags, stats, tibble, tidyr, zoo

Suggests knitr, rmarkdown, testthat

System requirements: JAGS (>= 4.0.0) (see

See at CRAN