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.

Companion R package for MOSAIC website

- need
`Rtools 3.3`

and last`R`

version.

Use the issue tracker to report a problem.

`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(".")`

- under the R interpreter:
- Generate documentation
- reference manual:
`R CMD Rd2pdf --output=documentation .`

- vignettes (using the R interpreter):
`devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))`

- reference manual:
- Run unit tests
- under the R interpreter:
`devtools::test()`

- under the R interpreter:

- need
`devtools`

,`ROxygen2 v5.0.1 or higgher`

- RStudio builder configuration:
- Project Options :
enable
`Use devtools package...`

enable`Generate documentation...`

ROxygen options...`: all enable exept`

Vignettes`and`

Source 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`

- Project Options :
enable

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)

- in

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

OTHER CHANGES

- 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.

DOC ISSUES FIXES

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

NEW FEATURES

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

BUG FIXES

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

NEW FEATURES

- 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

DOC ISSUES FIXES

- changes in the tutorial vignettes.

NEW FEATURES

- 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'.

BUG FIXES

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

NEW FEATURES

- 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.

BUG FIXES

- 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.

NEW FEATURES

- 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.

BUG FIXES

- update the cross-references link to ggplot2 package

SYSTEM REQUIREMENTS

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

NEW FEATURES

- 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.

BUG FIXES

- 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.

OTHER CHANGES

- 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.

NEW FEATURES

- new package structure and function names.
- the repro.data function is now called reproData and creates an object of class reproData without specific target time.
- the repro.check.data 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 repro.fit 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.

BUGS FIXES

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

BUG FIXES

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

- Initial release.