MOSAIC~SSD~ report

knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
label <- params$use_groups || params$use_names
library(ssd4mosaic)

# group plots require adjustable height in case there is a lot of labels
group_plot_height <- ifelse(params$use_groups,
                            6.5 + 0.1575 * (length(unique(params$data$group)) %/% 5),
                            5)

This report is provided by the MOSAIC~SSD~ application available at: https://mosaic.univ-lyon1.fr/ssd

Contact: sandrine.charles@univ-lyon1.fr

MOSAIC~SSD~ is a web tool allowing easy Species Sensitivity Distribution analyses based on pointwise or censored toxicity data. It is powered by the R software and in particular the Shiny package, as well as the fitdistrplus and ssd4mosaic packages.

cat("# Dataset: ", paste0("*",params$title, "*"))
cat("\n Confidence intervals level: ", params$CI.level)
* Estimated hazardous concentration
* R script

# Estimated distributions
```{asis, echo = !params$ok_bts}
**The bootstrap procedure did not converge, the confidence intervals are 
displayed but may not be accurate!**
p <- base_cdf(params$fits, unit = params$unit, logscale = params$logscale)
add_CI_plot(p, params$bts, params$logscale, CI.level = params$CI.level)
# cat(ssd4mosaic:::get_parameters_html(bootstrap = params$bts))
out <- list()
for (bts in params$bts){
  CI <- if(params$CI.level == 0.9) {
    CI <- bts$CI90
  } else {
    CI <- bts$CI
  }
    out[[length(out) + 1]] <- paste0(
      "**",
      ifelse(bts$fitpart$distname == "lnorm",
             "Log normal distribution",
             "Log logistic distribution"
      ),
      "**

*(log-likelihood = ",
      round(bts$fitpart$loglik, digits = 1),
      ")*

",
      names(bts$fitpart$estimate[1]), ": ",
      round(CI[1, 1], digits = 1),
      " [ ", round(CI[1, 2], digits = 1), " ; ",
      round(CI[1, 3], digits = 1), " ]

",
      names(bts$fitpart$estimate[2]), ": ",
      round(CI[2, 1], digits = 1),
      " [ ", round(CI[2, 2], digits = 1), " ; ",
      round(CI[2, 3], digits = 1), " ]

"
    )
}
cat(unlist(out))

```{asis, echo = label}

Label display

```r
if (params$use_names) {
  p <- options_plot(params$fits, params$unit, params$logscale, params$data,
               use_names = TRUE)
  add_CI_plot(p, params$bts, params$logscale, CI.level = params$CI.level)
}
if (params$use_groups) {
  p <- options_plot(params$fits, params$unit, params$logscale, params$data,
               use_groups = TRUE)
  add_CI_plot(p, params$bts, params$logscale, CI.level = params$CI.level)
}

Estimated hazardous concentration

```{asis, echo = !params$ok_bts} The bootstrap procedure did not converge, the confidence intervals are displayed but may not be accurate!

```r
knitr::kable(
  ssd4mosaic:::get_HCx_table(params$fits, params$distributions, params$bts, CI.level = params$CI.level)
  )

R script

cat(ssd4mosaic:::code_r_ssd(params$data, params$distributions, params$censored,
                        logscale = params$logscale, names = params$use_names,
                        groups = params$use_groups, CI.level = params$CI.level))

Dataset content

knitr::kable(
  params$data
  )


Try the ssd4mosaic package in your browser

Any scripts or data that you put into this service are public.

ssd4mosaic documentation built on April 4, 2025, 1:42 a.m.