| Title: | Exploration of Multiple Biomarker Responses using Effect Size |
|---|---|
| Description: | Summarize multiple biomarker responses of aquatic organisms to contaminants using Cliff’s delta, as described in Pham & Sokolova (2023) <doi:10.1002/ieam.4676>. |
| Authors: | Duy Nghia Pham [aut, cre] (ORCID: <https://orcid.org/0000-0003-1349-1710>), Inna M. Sokolova [ths] (ORCID: <https://orcid.org/0000-0002-2068-4302>) |
| Maintainer: | Duy Nghia Pham <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.8 |
| Built: | 2026-05-19 06:48:03 UTC |
| Source: | https://github.com/phamdn/mbres |
Summarize multiple biomarker responses of aquatic organisms to contaminants using Cliff’s delta, as described in Pham & Sokolova (2023) doi:10.1002/ieam.4676.
mbr and visual are the main
functions to compute and visualize Cliff’s delta and S-value which are
results of cliff and resampling.
setpop, simul, and plotsam
simulate and visualize a hypothetical dataset. compare
compares the results of Cliff’s delta and two other integrated indices
published earlier (i.e., RSI and IBR, see blaise2002 and
beliaeff2002). The others (ggheat and
ggdot) are helper functions and are not meant to be called
directly by users.
mbr.cliff and mbr.glass simply
compute and visualize Cliff’s delta and Glass's delta.
mbRes: Exploration of Multiple Biomarker Responses using
Effect Size.
Copyright (C) 2021-2023 Duy Nghia Pham & Inna M. Sokolova
mbRes is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
mbRes is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of
the GNU General Public License along with mbRes. If not, see
https://www.gnu.org/licenses/.
Duy Nghia Pham & Inna M. Sokolova
beliaeff2002 calculates IBR in the hypothetical case study. This is
not meant to be called directly.
beliaeff2002(sam_mean)beliaeff2002(sam_mean)
sam_mean |
a data frame, the third output of |
beliaeff2002 returns a data frame of IBR.
Beliaeff, B., & Burgeot, T. (2002). Integrated biomarker response: A useful tool for ecological risk assessment. Environmental Toxicology and Chemistry, 21(6), 1316–1322. doi:10.1002/etc.5620210629.
blaise2002 calculates RSI in the hypothetical case study. This is not
meant to be called directly.
blaise2002(sam, sam_mean)blaise2002(sam, sam_mean)
sam |
a data frame, the first output of |
sam_mean |
a data frame, the third output of |
blaise2002 returns a data frame of RSI.
Blaise, C., Gagné, F., Pellerin, J., Hansen, P.-D., & Trottier, S. (2002). Molluscan shellfish biomarker study of the Quebec, Canada, Saguenay Fjord with the soft-shell clam, Mya arenaria. Environmental Toxicology, 17(3), 170–186. doi:10.1002/tox.10048.
cliff calculates Cliff's delta statistic using the rank sum method.
cliff(v1, v0)cliff(v1, v0)
v1 |
a vector, biomarker values from the treatment group. |
v0 |
a vector, biomarker values from the control group. |
cliff returns a numeric that is the Cliff's delta of the
treatment group.
Cliff, N. (1993). Dominance statistics: Ordinal analyses to
answer ordinal questions. Psychological Bulletin, 114(3), 494–509.
doi:10.1037/0033-2909.114.3.494.
Vargha, A., & Delaney, H. D.
(2000). A Critique and Improvement of the CL Common Language Effect Size
Statistics of McGraw and Wong. Journal of Educational and Behavioral
Statistics, 25(2), 101–132. doi:10.3102/10769986025002101.
Ruscio, J., & Mullen, T. (2012). Confidence Intervals for the Probability
of Superiority Effect Size Measure and the Area Under a Receiver Operating
Characteristic Curve. Multivariate Behavioral Research, 47(2), 201–223.
doi:10.1080/00273171.2012.658329.
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) cliff(subset(temp$sam, Site == "S1", Bmk1, drop = TRUE), subset(temp$sam, Site == "S0", Bmk1, drop = TRUE))set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) cliff(subset(temp$sam, Site == "S1", Bmk1, drop = TRUE), subset(temp$sam, Site == "S0", Bmk1, drop = TRUE))
compare calculates RSI assigned values, IBR translated scores, and
Cliff's delta in the hypothetical case study.
compare(sam, sam_mean)compare(sam, sam_mean)
sam |
a data frame, the first output of |
sam_mean |
a data frame, the third output of |
compare returns a list of length 5:
blaise |
RSI assigned values and final RSI. |
beliaeff |
IBR translated scores and final IBR. |
pham |
Cliff's delta and the average of absolute Cliff’s delta. |
fig1 |
ggplot object of comparisions among RSI assigned values, IBR translated scores, and Cliff's delta. |
fig2 |
ggplot object of comparision among RSI, IBR, and the average of absolute Cliff’s delta. |
Blaise, C., Gagné, F., Pellerin, J., Hansen, P.-D., & Trottier,
S. (2002). Molluscan shellfish biomarker study of the Quebec, Canada,
Saguenay Fjord with the soft-shell clam, Mya arenaria. Environmental
Toxicology, 17(3), 170–186. doi:10.1002/tox.10048.
Beliaeff, B.,
& Burgeot, T. (2002). Integrated biomarker response: A useful tool for
ecological risk assessment. Environmental Toxicology and Chemistry, 21(6),
1316–1322. doi:10.1002/etc.5620210629.
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) compare(temp$sam, temp$sam_mean) #might take more than 5s in some machinesset.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) compare(temp$sam, temp$sam_mean) #might take more than 5s in some machines
ggbar creates bar plot of the ecological relevance. This is not meant
to be called directly.
ggbar(dat, hax, vax, sub, env = parent.frame())ggbar(dat, hax, vax, sub, env = parent.frame())
dat |
a data frame with at least two columns. |
hax |
a character, name of the column to be used as the horizontal axis. |
vax |
a character, name of the column to be used as the vertical axis. |
sub |
a numeric, mean ecological relevance. |
env |
an environment, to access outer scope variables. |
ggbar returns a ggplot object.
ggdot creates dot plot of the average of absolute Cliff’s delta. This
is not meant to be called directly.
ggdot(dat, hax, vax)ggdot(dat, hax, vax)
dat |
a data frame with at least two columns. |
hax |
a character, name of the column to be used as the horizontal axis. |
vax |
a character, name of the column to be used as the vertical axis. |
ggdot returns a ggplot object.
ggheat creates heatmaps of the Cliff's delta and S-value. This is not
meant to be called directly.
ggheat( dat, hax, vax, cell, nm, lim, lo, hi, diverging = FALSE, env = parent.frame() )ggheat( dat, hax, vax, cell, nm, lim, lo, hi, diverging = FALSE, env = parent.frame() )
dat |
a data frame with at least three columns. |
hax |
a character, name of the column to be used as the horizontal axis. |
vax |
a character, name of the column to be used as the vertical axis. |
cell |
a character, name of the column to be used as the cells. |
nm |
a character, name of the heatmap. |
lim |
a numeric vector, limits of the color scale. |
lo |
a character, color of the color scale low end. |
hi |
a character, color of the color scale high end. |
diverging |
a logical, whether to use diverging color gradient. |
env |
an environment, to access outer scope variables. |
ggheat returns a ggplot object.
mbr summarizes Cliff's delta and S-value for multiple groups and
multiple biomarkers.
mbr(df)mbr(df)
df |
a data frame with the name of experimental groups or biomonitoring sites as the first column and the measurement of biomarkers as the remaining columns. |
The header of the first column can be any character, for example, 'group' or 'site'. The first name appearing in the first column will determine the control group or the reference site. The other names will be treatment groups or test sites. The header of the remaining columns will define the list of biomarkers.
mbr returns a list of length 3:
mess |
a list of
length 3 confirms the information about |
es |
a data frame with 9 columns:
|
idx |
a data frame summarizes |
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr(temp$sam) #might take more than 5s in some machinesset.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr(temp$sam) #might take more than 5s in some machines
mbr.cliff summarizes Cliff's delta for multiple groups and
multiple biomarkers.
mbr.cliff(df)mbr.cliff(df)
df |
a data frame with the name of experimental groups or biomonitoring sites as the first column and the measurement of biomarkers as the remaining columns. |
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr.cliff(temp$sam) #might take more than 5s in some machinesset.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr.cliff(temp$sam) #might take more than 5s in some machines
mbr.glass summarizes Glass's delta for multiple groups and
multiple biomarkers.
mbr.glass(df)mbr.glass(df)
df |
a data frame with the name of experimental groups or biomonitoring sites as the first column and the measurement of biomarkers as the remaining columns. |
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr.glass(temp$sam) #might take more than 5s in some machinesset.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr.glass(temp$sam) #might take more than 5s in some machines
perch analyses the biomarker results of Hansson et al. (2014)
<doi:10.1007/s00244-013-9974-5>.
perch()perch()
perch returns a list of length 3:
tab |
a list of length 2
|
fig |
a list of 5 ggplot objects
|
est |
full results of our estimation method given by
|
Hansson, T., Hansen, W., Tjärnlund, U., Balk, L., & Bengtsson, B.-E. (2014). Biomarker Investigations in Adult Female Perch (Perca fluviatilis) From Industrialised Areas in Northern Sweden in 2003. Archives of Environmental Contamination and Toxicology, 66(2), 237–247. doi:10.1007/s00244-013-9974-5.
plotsam plots the sample dataset of biomarker responses. This is used
for the hypothetical case study.
plotsam(pop_mean_long, pop_profile, sam_long)plotsam(pop_mean_long, pop_profile, sam_long)
pop_mean_long |
a data frame, the second output of |
pop_profile |
a data frame, the third output of |
sam_long |
a data frame, the second output of |
plotsam returns a ggplot object.
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) plotsam(setting$pop_mean_long, setting$pop_profile, temp$sam_long)set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) plotsam(setting$pop_mean_long, setting$pop_profile, temp$sam_long)
resampling performs randomization test to calculate P-value and
S-value.
resampling(v1, v0, nrand = 1999, seed = 1)resampling(v1, v0, nrand = 1999, seed = 1)
v1 |
a vector, biomarker values from the treatment group. |
v0 |
a vector, biomarker values from the control group. |
nrand |
an integer, the number of randomization samples. The default value is 1999. |
seed |
an integer, the seed for random number generation. Setting a seed
ensures the reproducibility of the result. See |
resampling returns a one-row data frame with 3 numerics:
delta |
the Cliff's delta of the treatment group. |
pval |
the observed P-value p under the null hypothesis. |
sval |
the S-value s calculated from P-value p. |
Greenland, S. (2019). Valid P-Values Behave Exactly as They
Should: Some Misleading Criticisms of P-Values and Their Resolution With
S-Values. The American Statistician, 73(sup1), 106–114.
doi:10.1080/00031305.2018.1529625.
Phipson, B., & Smyth, G. K.
(2010). Permutation P-values Should Never Be Zero: Calculating Exact
P-values When Permutations Are Randomly Drawn. Statistical Applications in
Genetics and Molecular Biology, 9(1). doi:10.2202/1544-6115.1585.
A1.
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) resampling(subset(temp$sam, Site == "S1", Bmk1, drop = TRUE), subset(temp$sam, Site == "S0", Bmk1, drop = TRUE))set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) resampling(subset(temp$sam, Site == "S1", Bmk1, drop = TRUE), subset(temp$sam, Site == "S0", Bmk1, drop = TRUE))
setpop sets the true means of biomarker responses in populations. This
is used for the hypothetical case study.
setpop()setpop()
setpop returns a list of length 3:
pop_mean |
true means of biomarker responses in populations. |
pop_mean_long |
true means of biomarker responses in long format. |
pop_profile |
profile of biomarkers. |
simul yields a sample dataset of biomarker responses. This
is used for the hypothetical case study.
simul(pop_mean, size = 75)simul(pop_mean, size = 75)
pop_mean |
a data frame, the first output of |
size |
an integer, the sample size. |
simul returns a list of length 3:
sam |
sample dataset. |
sam_long |
sample dataset in long format. |
sam_mean |
sample means of biomarker responses. |
sokolova2021 contains the biomarker responses of the blue mussel
Mytilus edulis to organic UV filters ensulizole and octocrylene.
ecorelevance contains the ecological relevance of the biomarkers.
sokolova2021 ecorelevancesokolova2021 ecorelevance
sokolova2021 is a data frame with 30 rows and 31 variables:
5 experimental groups:
control group
10 ug/L of ensulizole
100 ug/L of ensulizole
10 ug/L of octocrylene
100 ug/L of octocrylene
lysosomal membrane stability
reactive oxygen species generation
lipid peroxidation in digestive gland
lipid peroxidation in gills
protein carbonylation in digestive gland
protein carbonylation in gills
NADPH–P450 reductase activity in digestive gland
NADPH–P450 reductase activity in gills
7-ethoxyresorufin-O-deethylase activity in digestive gland
7-ethoxyresorufin-O-deethylase activity in gills
carboxylesterase activity in digestive gland
carboxylesterase activity in gills
glutathione-S-transferase activity in digestive gland
glutathione-S-transferase activity in gills
glutathione reductase activity in digestive gland
glutathione reductase activity in gills
total cathepsin D activity in digestive gland
total cathepsin D activity in gills
free cathepsin D activity in digestive gland
free cathepsin D activity in gills
caspase 2
caspase 3
Bcl-2-associated X protein
B-cell lymphoma 2
tumor protein 53
growth arrest and DNA-damage-inducible protein 45
nuclear factor kB
interleukin 17
cyclooxygenase 2
acetyl-CoA carboxylase
ecorelevance is a data frame with 30 rows and 2 variables:
30 endpoints as documented in sokolova2021
ecological relevance
Sokolova, I. M., Falfushynska, H., & Sokolov, E. P. (2021). Biomarker responses of the blue mussels to organic UV filters [Data set]. Zenodo. doi:10.5281/zenodo.5176087.
visual plots Cliff's delta and S-value for multiple groups and
multiple biomarkers.
visual(rs, rotate = FALSE, display = TRUE)visual(rs, rotate = FALSE, display = TRUE)
rs |
a list, output of |
rotate |
a logical, whether to rotate the biomarker labels in figures. |
display |
a logical, whether to display cell values in heatmaps. |
visual returns a list of ggplot objects:
fig.delta |
heatmap of Cliff's delta. |
fig.sval |
heatmap of S-value. |
fig.avg |
dot plot of the average of absolute Cliff’s delta. |
mbr_fig |
combined heatmaps of Cliff's delta and S-value. |
set.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr_result <- mbr(temp$sam) visual(mbr_result) #might take more than 5s in some machinesset.seed(1) setting <- setpop() temp <- simul(setting$pop_mean) mbr_result <- mbr(temp$sam) visual(mbr_result) #might take more than 5s in some machines