A second contribution is a discussion of model averaging applied to SSDs. The literature cited is useful. It would have been helpful to include a few detailed examples showing the utility or dangers of such an approach. It would also have been helpful to include more details on the software packages cited, at least for the two they say they focused on.
8 Responses
Comments are closed.
RESOLUTION
Adopted suggestions to incorporate statement about Schwarz and Tillmanns (2019) :
Schwarz and Tillmans (2019) used data sets extracted from the CCME Guidelines for the Protection of Aquatic Life for boron (CCME 2009) and silver (CCME 2015) to assess and compare the results from model averaged and single SSDs. Among other things, they concluded that model averaging can reduce the uncertainty associated with fitting distributions to small data sets as well as providing some immunity to perturbations in HCx values due to the influence of a single sensitive data point.
An example (e.g. using the ERISS ammonia dataset) could be put together and included as Supplementary material, to avoid word limit issues. However, it would still need someone’s time to draft it.
I found an email thread from when we were exploring the issue of example datasets. I think we had decided on total ammonia as the best option before David decided it was getting too much for the paper.
My code for exploring this was:
library(ssdtools)
library(ggplot2)
source(“lnormlnorm.R”)
require(tidyverse)
# Total ammonia —-
# this is the output of dput, which is used to create a data.frame from data entered in interactive spreadsheet
data <- data.frame(Concentration = c(16.12, 3.27, 0.47, 4.61, 4.23, 1.13,
0.5, 0.6))#,
#495, 431.5, 87, 27.9, 25.4, 172.6, 37.6))
# fix unacceptable column names
colnames(data) <- make.names(colnames(data))
data$Species <- NA
#data <- rbind(data,data)
# fit distributions
dist <- ssd_fit_dists(data, left = ‘Concentration’, dists = c(‘llogis’, ‘gamma’, ‘lnorm’, ‘lgumbel’, ‘weibull’,
‘lnormlnorm’))
# plot distributions
ssdtools::ssd_plot_cdf(dist)
# goodness of fit table
gof.1 <- ssd_gof(dist)
# width and height are in inches, dpi (dots per inch) sets resolution
ggsave(‘fit_dist_plot_total_amonia.png’, width = 8 , height = 6 , dpi = 300)
# plot model average
# to add confidence intervals set ci = TRUE in predict and ssd_plot
# we recommend using nboot = 10000 in predict, although this may take several minutes to run
pred <- predict(dist, nboot = 10L)
ssd_plot(data, pred, left = ‘Concentration’, label = ‘Species’, color = NULL, shape = NULL, hc = 5L, ci = FALSE,
shift_x = 1.3, xlab = ‘Concentration’, ylab = ‘Percent of Species Affected’) +
ggtitle(”) +
theme(panel.border = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = NA, colour=’black’),
axis.text = element_text(color = ‘black’),
legend.key = element_rect(fill = NA, colour = NA)) +
expand_limits(x = 16.12) +
scale_color_brewer(palette = ‘Dark2’, name = ‘-none-‘) +
scale_shape(name = NULL)
# save plot
# width and height are in inches, dpi (dots per inch) sets resolution
ggsave(‘model_average_plot.png’, width = 8 , height = 6 , dpi = 600)
# get confidence limits
# use the nboot argument in ssd_hc to set the number of bootstrap samples
dist <- ssd_fit_dists(data, left = ‘Concentration’, dists = c(‘llogis’, ‘gamma’, ‘lnorm’, ‘lgumbel’, ‘weibull’))
hc.vals <- ssd_hc(dist, percent = 5L, ci = TRUE, nboot = 500L)
hc5.all <- data.frame(do.call(“rbind”,lapply(dist,FUN=ssd_hc, percent = 5L, ci = TRUE, nboot = 500L)))
hc1.all <- data.frame(do.call(“rbind”,lapply(dist,FUN=ssd_hc, percent = 1L, ci = TRUE, nboot = 500L)))
hc.out <- data.frame(‘dist’=hc5.all$dist, ‘HC5’=hc5.all$est, ‘hc1’=hc1.all$est)
stats.out <- data.frame(gof.1) %>%
left_join(hc.out)
stats.out
write.csv(stats.out, “Total ammonia – gof with lnormlnorm.csv”)
I can’t seem to copy the plot in sorry.
Given the word limits in the journal and the number of topics covered in the MS adding detailed examples would be very difficult. We could add a model averaged estimate for the Fig1 data – although that example doesn’t actually show much difference in the HC5 estimates across the four distributions:
The weights for that example are:
Another relatively simple option would be the boron dataset because it is already available on the web, but again – not a lot of difference across the distributions:
We do plan a further MS based on specific examples and simulations to explore these issues.
Rather than adding an example in this MS, perhaps we could just expand the detail around the ssdtools package and refer to the testing that was done in Schwarz and Tilmlmanns (2019). A couple of key lines in their executive summary that stand out are “The model averaging approach showed greater stability than single distributions when data points from the middle or right side of the distribution were added” and that model averaging can “also reduce the uncertainty associated to fitting distributions to small data sets”.
I agree with citing Schwarz and Tillmans to deal with this.
Perhaps citing Schwarz and Tillmanns and providing a few sentences that describe how model averaging was evaluated and the results.
This links to other comments e.g. issue #22; Issue #29; Issue#31