Title: | Modelling Reproduction and Survival Data in Ecotoxicology |
---|---|
Description: | Advanced methods for a valuable quantitative environmental risk assessment using Bayesian inference of survival and reproduction Data. Among others, it facilitates Bayesian inference of the general unified threshold model of survival (GUTS). See our companion paper Baudrot and Charles (2021) <doi:10.21105/joss.03200>, as well as complementary details in Baudrot et al. (2018) <doi:10.1021/acs.est.7b05464> and Delignette-Muller et al. (2017) <doi:10.1021/acs.est.6b05326>. |
Authors: | Virgile Baudrot [aut, cre], Sandrine Charles [aut], Marie Laure Delignette-Muller [aut], Wandrille Duchemin [ctb], Benoit Goussen [ctb], Nils Kehrein [ctb], Guillaume Kon-Kam-King [ctb], Christelle Lopes [ctb], Philippe Ruiz [ctb], Alexander Singer [ctb], Philippe Veber [aut] |
Maintainer: | Virgile Baudrot <[email protected]> |
License: | MIT + file LICENSE |
Version: | 3.3.4 |
Built: | 2024-10-31 18:38:38 UTC |
Source: | https://github.com/cran/morse |
Provides tools for the analysis of survival/reproduction
toxicity test data in quantitative environmental risk assessment. It can be
used to explore/visualize experimental data, and to get estimates
of (
% Lethal Concentration) or,
(
% Effective Concentration) by fitting exposure-response
curves. The
,
and parameters of the curve are
provided along with an indication of the uncertainty of the estimation.
morse
can also be used to get an estimation of the (No Effect Concentration)
by fitting a Toxico-Kinetic Toxico-Dynamic (TKTD) model (GUTS: General Unified Threshold
model of Survival). Within the TKTD-GUTS approach,
,
and
(
% Multiplication Factors aka Lethal Profiles) can be explored in proportion
and
time
.
Estimation procedures in morse
can be used without a deep knowledge of
their underlying probabilistic model or inference methods. Rather, they
were designed to behave as well as possible without requiring a user to
provide values for some obscure parameters. That said, morse
models can also
be used as a first step to tailor new models for more specific situations.
The package currently handles survival and reproduction data. Functions
dedicated to survival (resp. reproduction) analysis start with a
surv
(resp. repro
) prefix. morse
provides a similar
workflow in both cases:
create and validate a data set
explore a data set
plot a data set
fit a model on a data set and output the expected estimates
check goodness of fit with posterior preditive check plot (ppc)
More specifically, for survival data handles with TKTD 'GUTS' model, morse
provides:
plot and
.
compute goodness-of-fit measures (PPC percent, NRMSE and SPPE)
Those steps are presented in more details in the "Tutorial" vignette, while
a more formal description of the estimation procedures are provided in the
vignette called "Models in morse
package". Please refer to these documents
for further introduction to the use of morse
.
This reference manual is a detailed description of the functions exposed in the package.
Getting started The package uses the rjags
package
(Plummer, 2013), an R interface to the JAGS library for Bayesian model
estimation. Note that the rjags
package does not include a copy
of the JAGS library: you need to install it separately. For instructions
on downloading JAGS, see the home page at
https://mcmc-jags.sourceforge.io. Once done, simply follow the steps
described in the tutorial vignette.
Package: | morse |
Type: | Package |
Version: | 3.2.0 |
Date: | 2018-11-15 |
License: | GPL (>=2) |
Virgile Baudrot <[email protected]>, Sandrine Charles <[email protected]>, Marie Laure Delignette-Muller <[email protected]>, Wandrille Duchemin <[email protected]>, Benoit Goussen <[email protected]>, Guillaume Kon-Kam-king <[email protected]>, Christelle Lopes <[email protected]>, Philippe Ruiz <[email protected]>, Alexander Singer, <[email protected]> Philippe Veber <[email protected]>
Maintainer: Philippe Veber <[email protected]>
Delignette-Muller, M.L., Ruiz P. and Veber P. (2017) Robust fit of toxicokinetic-toxicodynamic models using prior knowledge contained in the design of survival toxicity tests.
Delignette-Muller, M.L., Lopes, C., Veber, P. and Charles, S. (2014) Statistical handling of reproduction data for exposure-response modelling.
Forfait-Dubuc, C., Charles, S., Billoir, E. and Delignette-Muller, M.L. (2012) Survival data analyses in ecotoxicology: critical effect concentrations, methods and models. What should we use?
Plummer, M. (2013) JAGS Version 4.0.0 user manual. https://sourceforge.net/projects/mcmc-jags/files/Manuals/4.x/jags_user_manual.pdf/download
Baudrot, V., Preux, S., Ducrot, V., Pavé, A. and Charles, S. (2018) New insights to compare and choose TKTD models for survival based on an inter-laboratory study for Lymnaea stagnalis exposed to Cd.
EFSA PPR Scientific Opinion (2018) Scientific Opinion on the state of the art of Toxicokinetic/Toxicodynamic (TKTD) effect models for regulatory risk assessment of pesticides for aquatic organisms https://www.efsa.europa.eu/en/efsajournal/pub/5377.
Reproduction and survival data sets of chronic laboratory toxicity tests with Daphnia magna freshwater invertebrate exposed to five concentrations of cadmium during 21 days. Five concentrations were tested, with four replicates per concentration. Each replicate contained 10 organisms. Reproduction and survival were monitored at 10 time points.
data(cadmium1)
data(cadmium1)
A data frame with 200 observations of the following five variables:
replicate
A vector of class numeric
with
the replicate code (1
to 20
).
conc
A vector of
class numeric
with the cadmium concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nrepro
A vector of class integer
with the
number of offspring at each time point for each concentration and each
replicate.
Billoir, E., Delhaye, H., Forfait, C., Clement, B., Triffault-Bouchet, G., Charles, S. and Delignette-Muller, M.L. (2012) Comparison of toxicity tests with different exposure time patterns: The added value of dynamic modelling in predictive ecotoxicology, Ecotoxicology and Environmental Safety, 75, 80-86.
Reproduction and survival data sets of chronic laboratory toxicity tests with snails (Lymnaea stagnalis) exposed to six concentrations of cadmium during 28 days. Six concentrations were tested, with six replicates per concentration. Each replicate contained five organisms. Reproduction and survival were monitored at 17 time points.
data(cadmium2)
data(cadmium2)
A data frame with 612 observations of the following five variables:
replicate
A vector of class numeric
with the
replicate code (1
to 36
).
conc
A vector of
class integer
with the cadmium concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nrepro
A vector of class integer
with the
number of clutches at each time point for each concentration and each
replicate.
Ducrot, V., Askem, C., Azam, D., Brettschneider, D., Brown, R., Charles, S., Coke, M., Collinet, M., Delignette-Muller, M.L., Forfait-Dubuc, C., Holbech, H., Hutchinson, T., Jach, A., Kinnberg, K.L., Lacoste, C., Le Page, G., Matthiessen, P., Oehlmann, J., Rice, L., Roberts, E., Ruppert, K., Davis, J.E., Veauvy, C., Weltje, L., Wortham, R. and Lagadic, L. (2014) Development and validation of an OECD reproductive toxicity test guideline with the pond snail Lymnaea stagnalis (Mollusca, Gastropoda), Regulatory Toxicology and Pharmacology, 70(3), 605-14.
Charles, S., Ducrot, V., Azam, D., Benstead, R., Brettschneider, D., De Schamphelaere, K., Filipe Goncalves, S., Green, J.W., Holbech, H., Hutchinson, T.H., Faber, D., Laranjeiro, F., Matthiessen, P., Norrgren, L., Oehlmann, J., Reategui-Zirena, E., Seeland-Fremer, A., Teigeler, M., Thome, J.P., Tobor Kaplon, M., Weltje, L., Lagadic, L. (2016) Optimizing the design of a reproduction toxicity test with the pond snail Lymnaea stagnalis, Regulatory Toxicology and Pharmacology, vol. 81 pp.47-56.
Reproduction and survival data sets of chronic laboratory toxicity tests with Daphnia magna freshwater invertebrate exposed to six concentrations of one organochlorine insecticide (chlordan) during 21 days. Six concentrations were tested, with 10 replicates per concentration. Each replicate contained one organism. Reproduction and survival were monitored at 22 time points.
data(chlordan)
data(chlordan)
A data frame with 1320 observations of the following five variables:
replicate
A vector of class numeric
with
the replicate code (1
to 60
).
conc
A vector of
class numeric
with the chlordan concentrations in .
time
A vector of class integer
with the
time points (in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nrepro
A vector of class integer
with the
number of offspring at each time point for each concentration and each
replicate.
Manar, R., Bessi, H. and Vasseur, P. (2009) Reproductive effects and bioaccumulation of chlordan in Daphnia magna, Environmental Toxicology and Chemistry, 28, 2150-2159.
Reproduction and survival data sets of chronic laboratory toxicity tests with Daphnia magna freshwater invertebrate exposed to five concentrations of copper during 21 days. Five concentrations were tested, with three replicates per concentration. Each replicate contained 20 organisms. Reproduction and survival were monitored at 16 time points.
data(copper)
data(copper)
A data frame with 240 observations of the following five variables:
replicate
A vector of class numeric
with the
replicate code (1
to 15
).
conc
A vector of
class numeric
with the copper concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nrepro
A vector of class integer
with the
number of offspring at each time point for each concentration and each
replicate.
Billoir, E., Delignette-Muller, M.L., Pery, A.R.R. and Charles, S. (2008) A Bayesian Approach to Analyzing Ecotoxicological Data, Environmental Science & Technology, 42 (23), 8978-8984.
Survival data set of chronic laboratory toxicity tests with Daphnia magna freshwater invertebrate exposed to six concentrations of one oxidizing agent (potassium dichromate) during 21 days. Six concentrations were tested with one replicate of 50 organisms per concentration. Survival is monitored at 10 time points.
data(dichromate)
data(dichromate)
A data frame with 60 observations on the following four variables:
replicate
A vector of class numeric
with the
replicate code (1
).
conc
A vector of
class numeric
with dichromate concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Bedaux, J., Kooijman, SALM (1994) Statistical analysis of toxicity tests, based on hazard modeling, Environmental and Ecological Statistics, 1, 303-314.
Exposure profile of 11641 time points used for prediction.
data(FOCUSprofile)
data(FOCUSprofile)
A data frame with 11641 observations on the following two variables:
time
A vector of class numeric
.
conc
A vector of class numeric
with exposure concentrations.
and
replicate
A vector of class factor
.
NA
for each replicate (each time-serie)Test in a well-formed argument to function 'survData' if the concentration
is constant and different from NA
for each replicate (each time-serie)
is_exposure_constant(x)
is_exposure_constant(x)
x |
an object of class |
a boolean TRUE
if concentration in replicate
is constant,
or FALSE
if the concentration in at least one of the replicates is time-variable,
and/or if NA
occures.
% Lethal Concentration at the maximum time point (default).Predict median and 95% credible interval of the x% Lethal Concentration.
The function LCx
, % Lethal Concentration (
), is use to compute
the dose required to kill
% of the members of a tested population
after a specified test duration (
time_LCx
) (default is the maximum
time point of the experiment).
Mathematical definition of % Lethal Concentration at time
,
denoted
, is:
,
where is the survival probability at concentration
at time
, and
is the survival probability at
no concentration (i.e. concentration is
) at time
which
reflect the background mortality
:
.
In the function LCx
, we use the median of to rescale the
% Lethal Concentration at time
.
LCx(object, ...) ## S3 method for class 'survFit' LCx(object, X, time_LCx = NULL, conc_range = NULL, npoints = 100, ...)
LCx(object, ...) ## S3 method for class 'survFit' LCx(object, X, time_LCx = NULL, conc_range = NULL, npoints = 100, ...)
object |
An object of class |
... |
Further arguments to be passed to generic methods |
X |
Percentage of individuals dying (e.g., |
time_LCx |
A number giving the time at which |
conc_range |
A vector of length 2 with minimal and maximal value of the range of concentration. If NULL, the range is define between 0 and the highest tested concentration of the experiment. |
npoints |
Number of time point in |
When class of object
is survFit
, see LCx.survFit.
returns an object of class LCx
.
The function returns an object of class LCx
, which is a list
with the following information:
X_prop |
Survival probability of individuals surviving considering the median
of the background mortality (i.e. |
X_prop_provided |
Survival probability of individuals surviving as provided in arguments (i.e. |
time_LCx |
A number giving the time at which |
df_LCx |
A |
df_dose |
A |
Generic method for MFx
, a function denoted for
% Multiplication Factor at time
.
The function MFx
, % Multiplication Factor at time
, (
),
is used to compute the multiplication factor
applied to the concentration exposure profile in order to
reduce by
% (argument
X
) the survival probability at a
specified test duration (argument
time_MFx
) (default is the maximum
time point of the experiment).
Mathematical definition of % Multiplication Factor at time
(at the end of a time series
),
denoted
, is given by:
,
where is the initial exposure profile without
multiplication factor. And so the expression
is the survival probability after an exposure profile
at time
.
This is a method
to replace function MFx
used on survFit
object when computing issues happen. MFx_ode
uses the deSolve
library to improve robustness. However, time to compute may be longer.
The function MFx_ode
, % Multiplication Factor at time
, (
),
is used to compute the multiplication factor
applied to the concentration exposure profile in order to
reduce by
% (argument
X
) the survival probability at a
specified test duration (argument
time_MFx
) (default is the maximum
time point of the experiment).
Mathematical definition of % Multiplication Factor at time
(at the end of a time series
),
denoted
, is given by:
,
where is the initial exposure profile without
multiplication factor. And so the expression
is the survival probability after an exposure profile
at time
.
MFx(object, ...) ## S3 method for class 'survFit' MFx( object, data_predict, X = 50, time_MFx = NULL, MFx_range = c(0, 1000), mcmc_size = 1000, hb_value = TRUE, spaghetti = FALSE, accuracy = 0.01, quiet = FALSE, threshold_iter = 100, hb_valueFORCED = 0, ode = TRUE, interpolate_length = NULL, interpolate_method = "linear", ... ) MFx_ode(object, ...) ## S3 method for class 'survFit' MFx_ode( object, data_predict, X = 50, time_MFx = NULL, MFx_range = c(0, 1000), mcmc_size = 1000, hb_value = TRUE, spaghetti = FALSE, accuracy = 0.01, quiet = FALSE, threshold_iter = 100, hb_valueFORCED = 0, interpolate_length = NULL, interpolate_method = "linear", ... )
MFx(object, ...) ## S3 method for class 'survFit' MFx( object, data_predict, X = 50, time_MFx = NULL, MFx_range = c(0, 1000), mcmc_size = 1000, hb_value = TRUE, spaghetti = FALSE, accuracy = 0.01, quiet = FALSE, threshold_iter = 100, hb_valueFORCED = 0, ode = TRUE, interpolate_length = NULL, interpolate_method = "linear", ... ) MFx_ode(object, ...) ## S3 method for class 'survFit' MFx_ode( object, data_predict, X = 50, time_MFx = NULL, MFx_range = c(0, 1000), mcmc_size = 1000, hb_value = TRUE, spaghetti = FALSE, accuracy = 0.01, quiet = FALSE, threshold_iter = 100, hb_valueFORCED = 0, interpolate_length = NULL, interpolate_method = "linear", ... )
object |
An object of class |
... |
Further arguments to be passed to generic methods |
data_predict |
A dataframe with two columns |
X |
Percentage of survival change (e.g., |
time_MFx |
A number giving the time at which |
MFx_range |
A vector from which lower and upper bound of the range of the
multiplication factor |
mcmc_size |
Can be used to reduce the number of MCMC samples in order to speed up the computation. The default is 1000. |
hb_value |
If |
spaghetti |
If |
accuracy |
Accuracy of the multiplication factor. The default is 0.01. |
quiet |
If |
threshold_iter |
Threshold number of iteration. |
hb_valueFORCED |
If |
ode |
IF |
interpolate_length |
Length of the time sequence for which output is wanted. |
interpolate_method |
The interpolation method for concentration. See package |
When class of object
is survFit
, see MFx.survFit.
returns an object of class MFx
The function returns an object of class MFx
, which is a list
with the following information:
X_prop |
Survival probability for |
X_prop_provided |
A number giving the proportion of reduction in survival. |
time_MFx |
A number giving the time at which |
df_MFx |
A |
df_dose |
A |
MFx_tested |
A vector of all multiplication factors computed. |
ls_predict |
A list of all object of class |
The function returns an object of class MFx
, which is a list
with the following information:
X_prop |
Survival probability for |
X_prop_provided |
A number giving the proportion of reduction in survival. |
time_MFx |
A number giving the time at which |
df_MFx |
A |
df_dose |
A |
MFx_tested |
A vector of all multiplication factors computed. |
ls_predict |
A list of all object of class |
Create a data set to analyse a survDataCstExp
object.
Create a data set to analyse a survDataVarExp
object.
modelData(x, ...) ## S3 method for class 'survDataCstExp' modelData(x, model_type = NULL, ...) ## S3 method for class 'survDataVarExp' modelData(x, model_type = NULL, extend_time = 100, ...)
modelData(x, ...) ## S3 method for class 'survDataCstExp' modelData(x, model_type = NULL, ...) ## S3 method for class 'survDataVarExp' modelData(x, model_type = NULL, extend_time = 100, ...)
x |
An object of class |
... |
Further arguments to be passed to generic methods |
model_type |
TKTD GUTS model type ('SD' or 'IT') |
extend_time |
Number of for each replicate used for linear interpolation (comprise between time to compute and fitting accuracy) |
A list for parameterization of priors for Bayesian inference.
A list for parameterization of priors for Bayesian inference.
A list for parameterization of priors for Bayesian inference.
Plot priors and posteriors of a survFit
object
plot_prior_post(x, ...)
plot_prior_post(x, ...)
x |
an object used to select a method |
... |
Further arguments to be passed to generic methods |
an object of class plot_prior_post
Plot posteriors vs priors of a survFit
object
## S3 method for class 'survFit' plot_prior_post(x, size_sample = 1000, EFSA_name = FALSE, ...)
## S3 method for class 'survFit' plot_prior_post(x, size_sample = 1000, EFSA_name = FALSE, ...)
x |
an object of class |
size_sample |
Size of the random generation of the distribution.
Default is |
EFSA_name |
If |
... |
Further arguments to be passed to generic methods |
a plot of class ggplot
EFSA PPR Scientific Opinion (2018) Scientific Opinion on the state of the art of Toxicokinetic/Toxicodynamic (TKTD) effect models for regulatory risk assessment of pesticides for aquatic organisms https://www.efsa.europa.eu/en/efsajournal/pub/5377
LCx
objectsThis is the generic plot
S3 method for the LCx class.
It plots the survival probability as a function of concentration.
## S3 method for class 'LCx' plot( x, xlab = "Concentration", ylab = "Survival probability \n median and 95 CI", main = NULL, subtitle = NULL, ... )
## S3 method for class 'LCx' plot( x, xlab = "Concentration", ylab = "Survival probability \n median and 95 CI", main = NULL, subtitle = NULL, ... )
x |
An object of class |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
subtitle |
A subtitle for the plot |
... |
Further arguments to be passed to generic methods. |
a plot of class ggplot
MFx
objectsThis is the generic plot
S3 method for the
MFx
class. It plots the survival probability as a function of
the multiplication factor applied or as a function of time.
## S3 method for class 'MFx' plot( x, x_variable = "MFx", xlab = NULL, ylab = "Survival probability \n median and 95 CI", main = NULL, log_scale = FALSE, ncol = 3, ... )
## S3 method for class 'MFx' plot( x, x_variable = "MFx", xlab = NULL, ylab = "Survival probability \n median and 95 CI", main = NULL, log_scale = FALSE, ncol = 3, ... )
x |
An object of class |
x_variable |
A character to define the variable for the |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
log_scale |
If |
ncol |
An interger for the number of columns when several panels are plotted. |
... |
Further arguments to be passed to generic methods. |
a plot of class ggplot
reproData
objectsThis is the generic plot
S3 method for the reproData
class.
It plots the cumulated number of offspring as a function of time.
## S3 method for class 'reproData' plot( x, xlab, ylab = "Cumulated Number of offspring", main = NULL, concentration = NULL, style = "ggplot", pool.replicate = FALSE, addlegend = FALSE, remove.someLabels = FALSE, ... )
## S3 method for class 'reproData' plot( x, xlab, ylab = "Cumulated Number of offspring", main = NULL, concentration = NULL, style = "ggplot", pool.replicate = FALSE, addlegend = FALSE, remove.someLabels = FALSE, ... )
x |
an object of class |
xlab |
label of the |
ylab |
label of the |
main |
main title for the plot |
concentration |
a numeric value corresponding to some concentration in
|
style |
graphical backend, can be |
pool.replicate |
if |
addlegend |
if |
remove.someLabels |
if |
... |
Further arguments to be passed to generic methods |
a plot of class ggplot
When style = "generic"
, the function calls the generic function
plot
When style = "ggplot"
, the function return an object of class
gg
and ggplot
, see function ggplot
reproFitTT
objectsThis is the generic plot
S3 method for the reproFitTT
class.
It plots the concentration-effect fit under target time reproduction
analysis.
## S3 method for class 'reproFitTT' plot( x, xlab = "Concentration", ylab = "Nb of offspring per ind/day", main = NULL, fitcol = "orange", fitlty = 1, fitlwd = 1, spaghetti = FALSE, cicol = "orange", cilty = 2, cilwd = 1, ribcol = "grey70", addlegend = FALSE, log.scale = FALSE, style = "ggplot", ... )
## S3 method for class 'reproFitTT' plot( x, xlab = "Concentration", ylab = "Nb of offspring per ind/day", main = NULL, fitcol = "orange", fitlty = 1, fitlwd = 1, spaghetti = FALSE, cicol = "orange", cilty = 2, cilwd = 1, ribcol = "grey70", addlegend = FALSE, log.scale = FALSE, style = "ggplot", ... )
x |
an object of class |
xlab |
a label for the |
ylab |
a label for the |
main |
main title for the plot |
fitcol |
color of the fitted curve |
fitlty |
line type of the fitted curve |
fitlwd |
width of the fitted curve |
spaghetti |
if |
cicol |
color of the 95 % credible limits |
cilty |
line type of the 95 % credible limits |
cilwd |
width of the 95 % credible limits |
ribcol |
color of the ribbon between lower and upper credible limits.
Transparent if |
addlegend |
if |
log.scale |
if |
style |
graphical backend, can be |
... |
Further arguments to be passed to generic methods |
The fitted curve represents the estimated reproduction rate at the target time as a function of the chemical compound concentration. The function plots 95% credible intervals for the estimated reproduction rate (by default the grey area around the fitted curve). Typically a good fit is expected to display a large overlap between the two types of intervals. If spaghetti = TRUE, the credible intervals are represented by two dotted lines limiting the credible band, and a spaghetti plot is added to this band. It consists of the representation of simulated curves using parameter values sampled in the posterior distribution (10% of the MCMC chains are randomly taken for this sample).
a plot of class ggplot
When style = "generic"
, the function calls the generic function
plot
When style = "ggplot"
, the function return an object of class
ggplot
, see function ggplot
survData
objectsThis is the generic plot
S3 method for the survData
class.
It plots the number of survivors as a function of time.
## S3 method for class 'survDataCstExp' plot( x, xlab = "Time", ylab = "Number of survivors", main = NULL, concentration = NULL, style = "ggplot", pool.replicate = FALSE, addlegend = FALSE, remove.someLabels = FALSE, ... )
## S3 method for class 'survDataCstExp' plot( x, xlab = "Time", ylab = "Number of survivors", main = NULL, concentration = NULL, style = "ggplot", pool.replicate = FALSE, addlegend = FALSE, remove.someLabels = FALSE, ... )
x |
an object of class |
xlab |
a label for the |
ylab |
a label for the |
main |
main title for the plot |
concentration |
a numeric value corresponding to some concentration(s) in
|
style |
graphical backend, can be |
pool.replicate |
if |
addlegend |
if |
remove.someLabels |
if |
... |
Further arguments to be passed to generic methods |
a plot of class ggplot
When style = "ggplot"
(default), the function calls function
ggplot
and returns an object of class ggplot
.
survDataVarExp
objectsThis is the generic plot
S3 method for the survDataVarC
class.
It plots the number of survivors as a function of time.
## S3 method for class 'survDataVarExp' plot( x, xlab = "Time", ylab = "Number of survivors", main = NULL, one.plot = FALSE, facetting_level = NULL, ... )
## S3 method for class 'survDataVarExp' plot( x, xlab = "Time", ylab = "Number of survivors", main = NULL, one.plot = FALSE, facetting_level = NULL, ... )
x |
an object of class |
xlab |
a label for the |
ylab |
a label for the |
main |
main title for the plot |
one.plot |
if |
facetting_level |
a vector of |
... |
Further arguments to be passed to generic methods |
an object of class ggplot
, see function ggplot
survFit
objectsThis is the generic plot
S3 method for the
survFit
. It plots the fit obtained for each
concentration of chemical compound in the original dataset.
## S3 method for class 'survFitCstExp' plot( x, xlab = "Time", ylab = "Survival probability", main = NULL, concentration = NULL, spaghetti = FALSE, one.plot = FALSE, adddata = TRUE, addlegend = FALSE, style = "ggplot", ... )
## S3 method for class 'survFitCstExp' plot( x, xlab = "Time", ylab = "Survival probability", main = NULL, concentration = NULL, spaghetti = FALSE, one.plot = FALSE, adddata = TRUE, addlegend = FALSE, style = "ggplot", ... )
x |
An object of class |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
concentration |
A numeric value corresponding to some specific concentrations in
|
spaghetti |
if |
one.plot |
if |
adddata |
if |
addlegend |
if |
style |
graphical backend, can be |
... |
Further arguments to be passed to generic methods. |
The fitted curves represent the estimated survival probability as a function
of time for each concentration.
The black dots depict the observed survival
probability at each time point. Note that since our model does not take
inter-replicate variability into consideration, replicates are systematically
pooled in this plot.
The function plots both 95% credible intervals for the estimated survival
probability (by default the grey area around the fitted curve) and 95% binomial confidence
intervals for the observed survival probability (as black error bars if
adddata = TRUE
).
Both types of intervals are taken at the same level. Typically
a good fit is expected to display a large overlap between the two types of intervals.
If spaghetti = TRUE
, the credible intervals are represented by two
dotted lines limiting the credible band, and a spaghetti plot is added to this band.
This spaghetti plot consists of the representation of simulated curves using parameter values
sampled in the posterior distribution (2% of the MCMC chains are randomly
taken for this sample).
a plot of class ggplot
survFitPredict
objectsThis is the generic plot
S3 method for the
survFitPredict
. It plots the predicted survival probability for each
concentration of the chemical compound in the provided dataset.
## S3 method for class 'survFitPredict' plot( x, xlab = "Time", ylab = "Survival probability", main = NULL, spaghetti = FALSE, one.plot = FALSE, mcmc_size = NULL, ... )
## S3 method for class 'survFitPredict' plot( x, xlab = "Time", ylab = "Survival probability", main = NULL, spaghetti = FALSE, one.plot = FALSE, mcmc_size = NULL, ... )
x |
An object of class |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
spaghetti |
If |
one.plot |
if |
mcmc_size |
A numerical value refering by default to the size of the mcmc in object |
... |
Further arguments to be passed to generic methods. |
The fitted curves represent the predicted survival probability as a function
of time for each concentration.
The function plots both the 95% credible band and the predicted survival
probability over time.
If spaghetti = TRUE
, the credible intervals are represented by two
dotted lines limiting the credible band, and a spaghetti plot is added to this band.
This spaghetti plot consists of the representation of simulated curves using parameter values
sampled in the posterior distribution (10% of the MCMC chains are randomly
taken for this sample).
a plot of class ggplot
survFitPredict_Nsurv
objects.This is the generic plot
S3 method for the
survFitPredict_Nsurv
. It plots the predicted survival probability for each
concentration of the chemical compound in the provided dataset.
## S3 method for class 'survFitPredict_Nsurv' plot( x, xlab = "Time", ylab = "Number of survivors", main = NULL, spaghetti = FALSE, one.plot = FALSE, mcmc_size = NULL, ... )
## S3 method for class 'survFitPredict_Nsurv' plot( x, xlab = "Time", ylab = "Number of survivors", main = NULL, spaghetti = FALSE, one.plot = FALSE, mcmc_size = NULL, ... )
x |
An object of class |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
spaghetti |
If |
one.plot |
if |
mcmc_size |
A numerical value refering by default to the size of the mcmc in object |
... |
Further arguments to be passed to generic methods. |
The fitted curves represent the predicted survival probability as a function
of time for each concentration.
The function plots both the 95% credible band and the predicted survival
probability over time.
If spaghetti = TRUE
, the credible intervals are represented by two
dotted lines limiting the credible band, and a spaghetti plot is added to this band.
This spaghetti plot consists of the representation of simulated curves using parameter values
sampled in the posterior distribution (10% of the MCMC chains are randomly
taken for this sample).
a plot of class ggplot
survFitTKTD
objectsThis is the generic plot
S3 method for the
survFitTKTD
. It plots the fit obtained for each
concentration of chemical compound in the original dataset.
## S3 method for class 'survFitTKTD' plot( x, xlab = "Time", ylab = "Survival probablity", main = NULL, concentration = NULL, spaghetti = FALSE, one.plot = FALSE, adddata = FALSE, addlegend = FALSE, style = "ggplot", ... )
## S3 method for class 'survFitTKTD' plot( x, xlab = "Time", ylab = "Survival probablity", main = NULL, concentration = NULL, spaghetti = FALSE, one.plot = FALSE, adddata = FALSE, addlegend = FALSE, style = "ggplot", ... )
x |
An object of class |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
concentration |
A numeric value corresponding to some specific concentration in
|
spaghetti |
if |
one.plot |
if |
adddata |
if |
addlegend |
if |
style |
graphical backend, can be |
... |
Further arguments to be passed to generic methods. |
The fitted curves represent the estimated survival probablity as a function
of time for each concentration
When adddata = TRUE
the black dots depict the observed survival
probablity at each time point. Note that since our model does not take
inter-replicate variability into consideration, replicates are systematically
pooled in this plot.
The function plots both 95% credible intervals for the estimated survival
probablity (by default the grey area around the fitted curve) and 95% binomial confidence
intervals for the observed survival probablity (as black error bars if
adddata = TRUE
).
Both types of intervals are taken at the same level. Typically
a good fit is expected to display a large overlap between the two types of intervals.
If spaghetti = TRUE
, the credible intervals are represented by two
dotted lines limiting the credible band, and a spaghetti plot is added to this band.
This spaghetti plot consists of the representation of simulated curves using parameter values
sampled in the posterior distribution (2% of the MCMC chains are randomly
taken for this sample).
a plot of class ggplot
survFitTT
objectsThis is the generic plot
S3 method for the survFitTT
class. It
plots concentration-response fit under target time survival analysis.
## S3 method for class 'survFitTT' plot( x, xlab = "Concentration", ylab = "Survival probability", main = NULL, fitcol = "orange", fitlty = 1, fitlwd = 1, spaghetti = FALSE, cicol = "orange", cilty = 2, cilwd = 1, ribcol = "grey70", adddata = FALSE, addlegend = FALSE, log.scale = FALSE, style = "ggplot", ... )
## S3 method for class 'survFitTT' plot( x, xlab = "Concentration", ylab = "Survival probability", main = NULL, fitcol = "orange", fitlty = 1, fitlwd = 1, spaghetti = FALSE, cicol = "orange", cilty = 2, cilwd = 1, ribcol = "grey70", adddata = FALSE, addlegend = FALSE, log.scale = FALSE, style = "ggplot", ... )
x |
an object of class |
xlab |
a label for the |
ylab |
a label for the |
main |
main title for the plot |
fitcol |
color of the fitted curve |
fitlty |
line type of the fitted curve |
fitlwd |
width of the fitted curve |
spaghetti |
if |
cicol |
color of the 95 % credible interval limits |
cilty |
line type for the 95 % credible interval limits |
cilwd |
width of the 95 % credible interval limits |
ribcol |
color of the ribbon between lower and upper credible limits.
Transparent if |
adddata |
if |
addlegend |
if |
log.scale |
if |
style |
graphical backend, can be |
... |
Further arguments to be passed to generic methods |
The fitted curve represents the estimated survival probability at
the target time as a function of the concentration of chemical compound;
When adddata = TRUE
the black dots depict the observed survival
probability at each tested concentration. Note that since our model does not take
inter-replicate variability into consideration, replicates are systematically
pooled in this plot.
The function plots both 95% credible intervals for the estimated survival
probability (by default the grey area around the fitted curve) and 95% binomial confidence
intervals for the observed survival probability (as black segments if
adddata = TRUE
).
Both types of intervals are taken at the same level. Typically
a good fit is expected to display a large overlap between the two intervals.
If spaghetti = TRUE, the credible intervals are represented by two dotted
lines limiting the credible band, and a spaghetti plot is added to this band.
This spaghetti plot consists of the representation of simulated curves using parameter values
sampled in the posterior distribution (10% of the MCMC chains are randomly
taken for this sample).
a plot of class ggplot
When style = "ggplot"
, the function calls function
ggplot
and returns an object of class ggplot
.
survFit
objectsThis is the generic plot
S3 method for the
survFit
. It plots the fit obtained for each
concentration profile in the original dataset.
## S3 method for class 'survFitVarExp' plot( x, xlab = "Time", ylab = "Survival probability", main = NULL, spaghetti = FALSE, one.plot = FALSE, adddata = TRUE, mcmc_size = NULL, scales = "fixed", addConfInt = TRUE, ... )
## S3 method for class 'survFitVarExp' plot( x, xlab = "Time", ylab = "Survival probability", main = NULL, spaghetti = FALSE, one.plot = FALSE, adddata = TRUE, mcmc_size = NULL, scales = "fixed", addConfInt = TRUE, ... )
x |
An object of class |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
spaghetti |
if |
one.plot |
if |
adddata |
if |
mcmc_size |
A numerical value refering by default to the size of the mcmc in object |
scales |
Shape the scale of axis. Default is |
addConfInt |
If |
... |
Further arguments to be passed to generic methods. |
The fitted curves represent the estimated survival probability as a function
of time for each concentration profile.
The black dots depict the observed survival
probability at each time point. Note that since our model does not take
inter-replicate variability into consideration, replicates are systematically
pooled in this plot.
The function plots both 95% binomial credible intervals for the estimated survival
probability (by default the grey area around the fitted curve) and 95% binomial confidence
intervals for the observed survival probability (as black segments if
adddata = TRUE
).
Both types of intervals are taken at the same level. Typically
a good fit is expected to display a large overlap between the two types of intervals.
If spaghetti = TRUE
, the credible intervals are represented by two
dotted lines limiting the credible band, and a spaghetti plot is added to this band.
This spaghetti plot consists of the representation of simulated curves using parameter values
sampled in the posterior distribution (10% of the MCMC chains are randomly
taken for this sample).
a plot of class ggplot
Plots the response of the effect as a function of the concentration at a given target time.
plotDoseResponse(x, ...)
plotDoseResponse(x, ...)
x |
an object used to select a method |
... |
Further arguments to be passed to generic methods |
a plot of class ggplot
reproData
objectsThis is the generic plotDoseResponse
S3 method for the reproData
class. It plots the number of offspring per individual-days as a function of
concentration at a given target time.
## S3 method for class 'reproData' plotDoseResponse( x, xlab = "Concentration", ylab = "Nb of offspring per ind.day", main = NULL, ylim = NULL, target.time = NULL, style = "ggplot", log.scale = FALSE, remove.someLabels = FALSE, axis = TRUE, addlegend = TRUE, ... )
## S3 method for class 'reproData' plotDoseResponse( x, xlab = "Concentration", ylab = "Nb of offspring per ind.day", main = NULL, ylim = NULL, target.time = NULL, style = "ggplot", log.scale = FALSE, remove.someLabels = FALSE, axis = TRUE, addlegend = TRUE, ... )
x |
an object of class |
xlab |
a label for the |
ylab |
a label for the |
main |
main title for the plot |
ylim |
|
target.time |
a numeric value corresponding to some observed time points in |
style |
graphical backend, can be |
log.scale |
if |
remove.someLabels |
if |
axis |
if |
addlegend |
if |
... |
Further arguments to be passed to generic methods |
The function plots the observed values of the reproduction rate (number of
reproduction outputs per individual-day) at a given time point as a function of
concentration. The 95 % Poisson confidence interval is added to each reproduction
rate. It is calculated using function pois.exact
from package epitools
.
As replicates are not pooled in this plot, overlapped points are shifted on
the x-axis to help the visualization of replicates.
a plot of class ggplot
When style = "generic"
, the function calls the generic function
plot
When style = "ggplot"
, the function return an object of class
ggplot
, see function ggplot
survData
objectsThis is the generic plotDoseResponse
S3 method for the survData
class. It plots the survival probability as a function of concentration at a given
target time.
## S3 method for class 'survDataCstExp' plotDoseResponse( x, xlab = "Concentration", ylab = "Survival probability", main = NULL, target.time = NULL, style = "ggplot", log.scale = FALSE, remove.someLabels = FALSE, addlegend = TRUE, ... )
## S3 method for class 'survDataCstExp' plotDoseResponse( x, xlab = "Concentration", ylab = "Survival probability", main = NULL, target.time = NULL, style = "ggplot", log.scale = FALSE, remove.someLabels = FALSE, addlegend = TRUE, ... )
x |
an object of class |
xlab |
a label for the |
ylab |
a label for the |
main |
main title for the plot |
target.time |
a numeric value corresponding to some observed time in |
style |
graphical backend, can be |
log.scale |
if |
remove.someLabels |
if |
addlegend |
if |
... |
Further arguments to be passed to generic methods |
The function plots the observed values of the survival probability at a given time point
as a function of concentration. The 95 % binomial confidence interval is added
to each survival probability. It is calculated using function
binom.test
from package stats
.
Replicates are systematically pooled in this plot.
a plot of class ggplot
When style = "generic"
, the function calls the generic function
plot
When style = "ggplot"
, the function return an object of class
ggplot
, see function ggplot
Plots posterior predictive check for reproFitTT
, survFitTT
,
survFitTKTD
, survFitCstExp
and survFitVarExp
objects.
This is the generic ppc
S3 method for the reproFitTT
class.
It plots the predicted values with 95% credible intervals versus the observed
values.
This is the generic ppc
S3 method for the survFitCstExp
class. It
plots the predicted values along with 95% credible intervals
versus the observed values for survFit
objects.
This is the generic ppc
S3 method for the survFitPredict_Nsurv
class. It
plots the predicted values along with 95% credible intervals
versus the observed values for survFitPredict_Nsurv
objects.
This is the generic ppc
S3 method for the survFitTKTD
class. It
plots the predicted values along with 95% credible intervals
versus the observed values for survFitTKTD
objects.
This is the generic ppc
S3 method for the survFitTT
class. It
plots the predicted values with 95 % credible intervals versus the observed
values for survFitTT
objects.
This is the generic ppc
S3 method for the survFitVarExp
class. It
plots the predicted values along with 95% credible intervals
versus the observed values for survFit
objects.
ppc(x, ...) ## S3 method for class 'reproFitTT' ppc( x, style = "ggplot", xlab = "Observed Cumul. Nbr. of offspring", ylab = "Predicted Cumul. Nbr. of offspring", main = NULL, ... ) ## S3 method for class 'survFitCstExp' ppc(x, style = "ggplot", main = NULL, ...) ## S3 method for class 'survFitPredict_Nsurv' ppc( x, xlab = "Observed nb of survivors", ylab = "Predicted nb of survivors", main = NULL, ... ) ## S3 method for class 'survFitTKTD' ppc(x, style = "ggplot", main = NULL, ...) ## S3 method for class 'survFitTT' ppc(x, style = "ggplot", main = NULL, ...) ## S3 method for class 'survFitVarExp' ppc( x, xlab = "Observed nb of survivors", ylab = "Predicted nb of survivors", main = NULL, ... )
ppc(x, ...) ## S3 method for class 'reproFitTT' ppc( x, style = "ggplot", xlab = "Observed Cumul. Nbr. of offspring", ylab = "Predicted Cumul. Nbr. of offspring", main = NULL, ... ) ## S3 method for class 'survFitCstExp' ppc(x, style = "ggplot", main = NULL, ...) ## S3 method for class 'survFitPredict_Nsurv' ppc( x, xlab = "Observed nb of survivors", ylab = "Predicted nb of survivors", main = NULL, ... ) ## S3 method for class 'survFitTKTD' ppc(x, style = "ggplot", main = NULL, ...) ## S3 method for class 'survFitTT' ppc(x, style = "ggplot", main = NULL, ...) ## S3 method for class 'survFitVarExp' ppc( x, xlab = "Observed nb of survivors", ylab = "Predicted nb of survivors", main = NULL, ... )
x |
An object of class |
... |
Further arguments to be passed to generic methods |
style |
graphical backend, can be |
xlab |
A label for the |
ylab |
A label for the |
main |
A main title for the plot. |
Depending on the class of the object x
see their links.
for class reproFitTT
: ppc.reproFitTT ;
for class survFitTT
: ppc.survFitTT ;
for class survFitTKTD
: ppc.survFitTKTD ;
for class survFitCstExp
: ppc.survFitCstExp and
for class survFitVarExp
: ppc.survFitVarExp.
The coordinates of black points are the observed values of the cumulated number
of reproduction outputs for a given concentration (-scale) and the corresponding
predicted values (
-scale). 95% prediction intervals are added to each predicted
value, colored in green if this interval contains the observed value and in red
in the other case. As replicates are not pooled in this plot, overlapped points
are shifted on the
axis to help the visualization of replicates. The bisecting
line (y = x) is added to the plot in order to see if each prediction interval
contains each observed value. As replicates are shifted on the
-axis, this
line may be represented by steps.
The black points show the observed number of survivors (pooled
replicates, on -axis) against the corresponding predicted
number (
-axis). Predictions come along with 95% prediction
intervals, which are depicted in green when they contain the
observed value and in red otherwise. Samples with equal observed
value are shifted on the
-axis. For that reason, the
bisecting line (y = x), is represented by steps when observed
values are low. That way we ensure green intervals do intersect the
bisecting line.
For survFitPredict_Nsurv
object, PPC is based on times series simulated
for each replicate. In addition, the black points show the observed
number of survivors (on -axis)
against the corresponding predicted
number (
-axis). Predictions come along with 95% prediction
intervals, which are depicted in green when they contain the
observed value and in red otherwise.
The black points show the observed number of survivors (pooled
replicates, on -axis) against the corresponding predicted
number (
-axis). Predictions come along with 95% prediction
intervals, which are depicted in green when they contain the
observed value and in red otherwise. Samples with equal observed
value are shifted on the
-axis. For that reason, the
bisecting line (y = x), is represented by steps when observed
values are low. That way we ensure green intervals do intersect the
bisecting line.
The coordinates of black points are the observed values of the number of survivors
(pooled replicates) for a given concentration (-axis) and the corresponding
predicted values (
-axis). 95% prediction intervals are added to each predicted
value, colored in green if this interval contains the observed value and in red
otherwise.
The bisecting line (y = x) is added to the plot in order to see if each
prediction interval contains each observed value. As replicates are shifted
on the x-axis, this line is represented by steps.
The black points show the observed number of survivors (on -axis)
against the corresponding predicted
number (
-axis). Predictions come along with 95% prediction
intervals, which are depicted in green when they contain the
observed value and in red otherwise.
a plot of class ggplot
a plot of class ggplot
a plot of class ggplot
a plot of class ggplot
a plot of class ggplot
a plot of class ggplot
a plot of class ggplot
survFitPredict
and
survFitPredict_Nsurv
objectsIt returns measures of goodness-of-fit for predictions.
Provide various criteria for assessment of the model performance: (i) percentage of observation within the 95% credible interval of the Posterior Prediction Check (PPC), the Normalised Root Mean Square Error (NRMSE) and the Survival Probability Prediction Error (SPPE) as reccommended by the recent Scientific Opinion from EFSA (2018).
predict_Nsurv_check(object, ...) ## S3 method for class 'survFitPredict_Nsurv' predict_Nsurv_check(object, ...)
predict_Nsurv_check(object, ...) ## S3 method for class 'survFitPredict_Nsurv' predict_Nsurv_check(object, ...)
object |
an object of class |
... |
Further arguments to be passed to generic methods |
return a list of data.frame.
The function return a list with three items:
PPC |
The criterion, in percent, compares the predicted median numbers
of survivors associated to their uncertainty limits with the observed numbers
of survivors. Based on experience, PPC resulting in less than |
PPC_global |
percentage of PPC for the whole data set by gathering replicates. |
NRMSE |
The criterion, in percent, is based on the classical root-mean-square error (RMSE), used to aggregate the magnitudes of the errors in predictions for various time-points into a single measure of predictive power. In order to provide a criterion expressed as a percentage, NRMSE is the normalised RMSE by the mean of the observations. |
NRMSE_global |
NRMSE for the whole data set by gathering replicates. |
SPPE |
The SPPE indicator, in percent, is negative (between |
@references EFSA PPR Scientific Opinion (2018) Scientific Opinion on the state of the art of Toxicokinetic/Toxicodynamic (TKTD) effect models for regulatory risk assessment of pesticides for aquatic organisms https://www.efsa.europa.eu/en/efsajournal/pub/5377
survFit
objectsThis is a method
to replace function predict
used on survFit
object when computing issues happen. predict_ode
uses the deSolve
library to improve robustness. However, time to compute may be longer.
predict_ode(object, ...)
predict_ode(object, ...)
object |
an object used to select a method |
... |
Further arguments to be passed to generic methods |
an object of class predict_ode
survFit
objectsThis is the generic predict
S3 method for the survFit
class.
It provides predicted survival rate for "SD" or "IT" models under constant or time-variable exposure.
## S3 method for class 'survFit' predict_ode( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = 1000, hb_value = TRUE, interpolate_length = 100, interpolate_method = "linear", hb_valueFORCED = NA, ... )
## S3 method for class 'survFit' predict_ode( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = 1000, hb_value = TRUE, interpolate_length = 100, interpolate_method = "linear", hb_valueFORCED = NA, ... )
object |
An object of class |
data_predict |
A dataframe with three columns |
spaghetti |
If |
mcmc_size |
Can be used to reduce the number of mcmc samples in order to speed up
the computation. |
hb_value |
If |
interpolate_length |
Length of the time sequence for which output is wanted. |
interpolate_method |
The interpolation method for concentration. See package |
hb_valueFORCED |
If |
... |
Further arguments to be passed to generic methods |
a list
of data.frame
with the quantiles of outputs in
df_quantiles
or all the MCMC chaines df_spaghetti
survFit
objectsThis is the generic predict
S3 method for the survFit
class.
It provides simulation for "SD" or "IT" models under constant or time-variable exposure.
It provides the simulated number of survivors for "SD" or "IT" models under constant or time-variable exposure.
It provides the simulated number of survivors for "SD" or "IT" models under constant or time-variable exposure.
This is a method
to replace function predict_Nsurv
used on survFit
object when computing issues happen. predict_nsurv_ode
uses the deSolve
library to improve robustness. However, time to compute may be longer.
## S3 method for class 'survFit' predict( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = NULL, hb_value = TRUE, ratio_no.NA = 0.95, hb_valueFORCED = NA, extend_time = 100, ... ) predict_Nsurv(object, ...) ## S3 method for class 'survFit' predict_Nsurv( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = NULL, hb_value = TRUE, hb_valueFORCED = NA, extend_time = 100, ... ) predict_Nsurv_ode( object, data_predict, spaghetti, mcmc_size, hb_value, hb_valueFORCED, extend_time, interpolate_length, interpolate_method, ... ) ## S3 method for class 'survFit' predict_Nsurv_ode( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = 1000, hb_value = TRUE, hb_valueFORCED = NA, extend_time = 100, interpolate_length = NULL, interpolate_method = "linear", ... )
## S3 method for class 'survFit' predict( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = NULL, hb_value = TRUE, ratio_no.NA = 0.95, hb_valueFORCED = NA, extend_time = 100, ... ) predict_Nsurv(object, ...) ## S3 method for class 'survFit' predict_Nsurv( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = NULL, hb_value = TRUE, hb_valueFORCED = NA, extend_time = 100, ... ) predict_Nsurv_ode( object, data_predict, spaghetti, mcmc_size, hb_value, hb_valueFORCED, extend_time, interpolate_length, interpolate_method, ... ) ## S3 method for class 'survFit' predict_Nsurv_ode( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = 1000, hb_value = TRUE, hb_valueFORCED = NA, extend_time = 100, interpolate_length = NULL, interpolate_method = "linear", ... )
object |
An object of class |
data_predict |
A dataframe with three columns |
spaghetti |
If |
mcmc_size |
Can be used to reduce the number of mcmc samples in order to speed up
the computation. |
hb_value |
If |
ratio_no.NA |
A numeric between 0 and 1 standing for the proportion of non-NA values
required to compute quantile. The default is |
hb_valueFORCED |
If |
extend_time |
Length of time points interpolated with variable exposure profiles. |
... |
Further arguments to be passed to generic methods |
interpolate_length |
Length of the time sequence for which output is wanted. |
interpolate_method |
The interpolation method for concentration. See package |
a list
of data.frame
with the quantiles of outputs in
df_quantiles
or all the MCMC chaines df_spaghetti
an object of class predict_Nsurv
.
The function returns an object of class survFitPredict_Nsurv
, which is
a list with the two following data.frame
:
df_quantile |
A |
df_spaghetti |
NULL if arguement |
an object of class predict_Nsurv_ode
.
a list
of data.frame
with the quantiles of outputs in
df_quantiles
or all the MCMC chaines df_spaghetti
msgTables
objectsPrint in the REPL the msgTables
## S3 method for class 'msgTable' print(x, ...)
## S3 method for class 'msgTable' print(x, ...)
x |
an object of class |
... |
Further arguments to be passed to generic methods |
Print in the REPL the msgTables
reproFitTT
objectThis is the generic print
S3 method for the reproFitTT
class.
It prints the underlying JAGS model and some information on the Bayesian
inference procedure.
## S3 method for class 'reproFitTT' print(x, ...)
## S3 method for class 'reproFitTT' print(x, ...)
x |
An object of class |
... |
Further arguments to be passed to generic methods |
print the model text and the Jags Computing information
survFit
objectThis is the generic print
S3 method for the survFitCstExp
class.
It prints the underlying JAGS model and some information on the Bayesian
inference procedure.
## S3 method for class 'survFitCstExp' print(x, ...)
## S3 method for class 'survFitCstExp' print(x, ...)
x |
An object of class |
... |
Further arguments to be passed to generic methods. |
print the model text and the Jags Computing information
survFitTKTD
objectThis is the generic print
S3 method for the survFitTKTD
class.
It prints the underlying JAGS model and some information on the Bayesian
inference procedure.
## S3 method for class 'survFitTKTD' print(x, ...)
## S3 method for class 'survFitTKTD' print(x, ...)
x |
An object of class |
... |
Further arguments to be passed to generic methods. |
print the model text and the Jags Computing information
survFitTT
objectThis is the generic print
S3 method for the survFitTT
class.
It prints the underlying JAGS model and some information on the Bayesian
inference procedure.
## S3 method for class 'survFitTT' print(x, ...)
## S3 method for class 'survFitTT' print(x, ...)
x |
An object of class |
... |
Further arguments to be passed to generic methods |
print the model text and the Jags Computing information
survFitVarExp
objectThis is the generic print
S3 method for the survFitVarExp
class.
It prints the underlying JAGS model and some information on the Bayesian
inference procedure.
## S3 method for class 'survFitVarExp' print(x, ...)
## S3 method for class 'survFitVarExp' print(x, ...)
x |
An object of class |
... |
Further arguments to be passed to generic methods. |
print the model text and the Jags Computing information
Return a data.frame
with prior density distributions of parameters used in
object
.
priors_distribution(object, ...)
priors_distribution(object, ...)
object |
An object used to select a method |
... |
Further arguments to be passed to generic methods |
When the object
is of class survFit
, see priors_distribution.survFit
an object of class priors_distribution
survFit
object.Return a data.frame
with priors distribution of parameters used in
object
.
## S3 method for class 'survFit' priors_distribution(object, size_sample = 1000, EFSA_name = FALSE, ...)
## S3 method for class 'survFit' priors_distribution(object, size_sample = 1000, EFSA_name = FALSE, ...)
object |
An object of class |
size_sample |
Size of the random generation of the distribution.
Default is |
EFSA_name |
If |
... |
Further arguments to be passed to generic methods. |
a data.frame
with prio distribution.
EFSA PPR Scientific Opinion (2018) Scientific Opinion on the state of the art of Toxicokinetic/Toxicodynamic (TKTD) effect models for regulatory risk assessment of pesticides for aquatic organisms https://www.efsa.europa.eu/en/efsajournal/pub/5377.
Create a list of scalars giving priors to use in Bayesian inference.
priors_survData(x, model_type = NULL)
priors_survData(x, model_type = NULL)
x |
An object of class |
model_type |
TKTD model type ('SD' or 'IT') |
A list for parameterization of priors for Bayesian inference with JAGS.
Survival data set of chronic laboratory toxicity tests with Gammarus pulex freshwater invertebrate exposed to eight concentrations of one fungicide (propiconazole) during four days. Eight concentrations were tested with two replicates of 10 organisms per concentration. Survival is monitored at five time points.
data(propiconazole)
data(propiconazole)
A dataframe with 75 observations on the following four variables:
replicate
A vector of class factor
with the
replicate code (SC
for the control and A1
to G2
for other profiles).
conc
A vector of class numeric
with propiconazole
concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nyman, A.-M., Schirmer, K., Ashauer, R., (2012) Toxicokinetic-toxicodynamic modelling of survival of Gammarus pulex in multiple pulse exposures to propiconazole: model assumptions, calibration data requirements and predictive power, Ecotoxicology, (21), 1828-1840.
Survival data set of laboratory toxicity tests with Gammarus pulex freshwater invertebrates exposed to several profiles of concentrations (time-variable concentration for each time series) of one fungicide (propiconazole) during 10 days.
data(propiconazole_pulse_exposure)
data(propiconazole_pulse_exposure)
A data frame with 74 observations on the following four variables:
replicate
A vector of class factor
with the
replicate code (varControl
, varA
, varB
and varC
).
conc
A vector of class numeric
with propiconazole
concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nyman, A.-M., Schirmer, K., Ashauer, R., (2012) Toxicokinetic-toxicodynamic modelling of survival of Gammarus pulex in multiple pulse exposures to propiconazole: model assumptions, calibration data requirements and predictive power, Ecotoxicology, (21), 1828-1840.
Survival data set of chronic laboratory toxicity tests with Gammarus pulex freshwater invertebrate exposed to eight concentrations of one fungicide (propiconazole) during four days. Eight concentrations were tested with two replicates of 10 organisms per concentration. Survival is monitored at five time points.
data(propiconazole_split)
data(propiconazole_split)
A dataframe with 75 observations on the following four variables:
replicate
A vector of class factor
with the
replicate code (SC
for the control and A1
to G2
for other profiles).
conc
A vector of class numeric
with propiconazole
concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nyman, A.-M., Schirmer, K., Ashauer, R., (2012) Toxicokinetic-toxicodynamic modelling of survival of Gammarus pulex in multiple pulse exposures to propiconazole: model assumptions, calibration data requirements and predictive power, Ecotoxicology, (21), 1828-1840.
This function creates a reproData
object from experimental
data provided as a data.frame
. The resulting object can then be used
for plotting and model fitting. The reproData
class is a sub-class
of survData
, meaning that all functions and method available for
survival analysis can be used with reproData
objects.
reproData(x)
reproData(x)
x |
a dataframe as expected by |
The x
argument contains the experimental data, and should have
the same structure than the argument of survData
, plus a single
additional column providing the total number of offspring observed since the
last time point. The function fails if x
does not meet the
expected requirements. Please run reproDataCheck
to ensure
x
is well-formed.
Note that experimental data with time-variable exposure are not supported.
An object of class reproData
.
The reproDataCheck
function can be used to check if an object
containing data from a reproduction toxicity assay meets the expectations
of the function reproData
.
reproDataCheck(data, diagnosis.plot = TRUE)
reproDataCheck(data, diagnosis.plot = TRUE)
data |
any object |
diagnosis.plot |
if |
Since in morse' reproduction data sets are a special case of survival data sets,
reproDataCheck
performs the same verifications than
survDataCheck
plus additional ones that are specific to
reproduction data.
The function returns a data.frame
similar to the one returned
by survDataCheck
, except that it may contain the following
additional error id
s:
NreproInteger
: column Nrepro
contains values of class other than integer
Nrepro0T0
: Nrepro
is not 0 at time 0 for each concentration and each replicate
Nsurvt0Nreprotp1P
: at a given time , the number of
alive individuals is null and the number of collected offspring is not null
for the same replicate and the same concentration at time
If an error of type dataframeExpected
or missingColumn
is detected, the function
reproDataCheck
is stopped. When no error is detected the
reproDataCheck
function returns an empty dataframe.
This function estimates the parameters of a concentration-effect model for target-time reproduction analysis using Bayesian inference. In this model the endpoint is the cumulated number of reproduction outputs over time, with potential mortality all along the experiment.
reproFitTT( data, stoc.part = "bestfit", target.time = NULL, ecx = c(5, 10, 20, 50), n.chains = 3, quiet = FALSE )
reproFitTT( data, stoc.part = "bestfit", target.time = NULL, ecx = c(5, 10, 20, 50), n.chains = 3, quiet = FALSE )
data |
an object of class |
stoc.part |
stochastic part of the model. Possible values are |
target.time |
defines the target time point at which to analyse the repro data. By default the last time point |
ecx |
desired values of |
n.chains |
number of MCMC chains. The minimum required number of chains is 2 |
quiet |
if |
Because some individuals may die during the observation period, the
reproduction rate alone is not sufficient to account for the observed number
of offspring at a given time point. In addition, we need the time individuals have stayed alive
during this observation period. The reproFitTT
function estimates the number
of individual-days in an experiment between its start and the target time.
This covariable is then used to estimate a relation between the chemical compound
concentration and the reproduction rate per individual-day.
The reproFitTT
function fits two models, one where inter-individual
variability is neglected ("Poisson" model) and one where it is taken into
account ("gamma-Poisson" model). When setting stoc.part
to
"bestfit"
, a model comparison procedure is used to choose between
both. More details are presented in the vignette accompanying the package.
The function returns an object of class reproFitTT
which is a list
of the following objects:
DIC |
DIC value of the selected model |
estim.ECx |
a table of the estimated 5, 10, 20 and 50 % effective concentrations (by default) and their 95 % credible intervals |
estim.par |
a table of the estimated parameters as medians and 95 % credible intervals |
mcmc |
an object of class |
model |
a JAGS model object |
warnings |
a data.frame with warning messages |
model.label |
a character string, |
parameters |
a list of the parameter names used in the model |
n.chains |
an integer value corresponding to the number of chains used for the MCMC computation |
n.iter |
a list of two indices indicating the beginning and the end of monitored iterations |
n.thin |
a numerical value corresponding to the thinning interval |
jags.data |
a list of the data passed to the jags model |
transformed.data |
the |
dataTT |
the dataset with which the parameters are estimated |
reproData
objectThis is the generic summary
S3 method for the reproData
class.
It provides information about the structure of the data set and the experimental
design.
## S3 method for class 'reproData' summary(object, quiet = FALSE, ...)
## S3 method for class 'reproData' summary(object, quiet = FALSE, ...)
object |
an object of class |
quiet |
if |
... |
Further arguments to be passed to generic methods |
The function returns a list with the same information than
summary.survDataCstExp
plus an additional one:
NboffTimeConc |
nb of offspring for all concentrations and time points |
reproFitTT
objectThis is the generic summary
S3 method for the reproFitTT
class.
It shows the quantiles of priors and posteriors on parameters
and the quantiles of the posterior on the ECx estimates.
## S3 method for class 'reproFitTT' summary(object, quiet = FALSE, ...)
## S3 method for class 'reproFitTT' summary(object, quiet = FALSE, ...)
object |
an object of class |
quiet |
when |
... |
Further arguments to be passed to generic methods |
The function returns a list with the following information:
Qpriors |
quantiles of the model priors |
Qposteriors |
quantiles of the model posteriors |
QECx |
quantiles of ECx estimates |
survDataCstExp
objectThe generic summary
S3 method for the survDataCstExp
class provides
information about the structure of the data set and the experimental design.
## S3 method for class 'survDataCstExp' summary(object, quiet = FALSE, ...)
## S3 method for class 'survDataCstExp' summary(object, quiet = FALSE, ...)
object |
an object of class |
quiet |
when |
... |
Further arguments to be passed to generic methods |
The function returns a list with the following information:
NbrepTimeConc |
nb of replicates for all concentrations and time points |
NbsurvTimeConc |
nb of survivors. for all concentrations and time points |
survDataVarExp
objectThe generic summary
S3 method for the survDataVarExp
class provides
information about the structure of the data set and the experimental design.
## S3 method for class 'survDataVarExp' summary(object, quiet = FALSE, ...)
## S3 method for class 'survDataVarExp' summary(object, quiet = FALSE, ...)
object |
an object of class |
quiet |
when |
... |
Further arguments to be passed to generic methods |
The function returns a list with the following information:
OccRepTime |
Occurence of replicates for all time points |
NbsurvTimeRep |
nb of survivors. for all replicates and time points |
ConcTimeRep |
Concentration for all replicates and time points |
survFit
objectThis is the generic summary
S3 method for the survFit
class.
It shows the quantiles of priors and posteriors on parameters.
## S3 method for class 'survFit' summary(object, quiet = FALSE, EFSA_name = FALSE, ...)
## S3 method for class 'survFit' summary(object, quiet = FALSE, EFSA_name = FALSE, ...)
object |
An object of class |
quiet |
When |
EFSA_name |
If |
... |
Further arguments to be passed to generic methods. |
The function returns a list with the following information:
Qpriors |
quantiles of the model priors |
Qposteriors |
quantiles of the model posteriors |
EFSA PPR Scientific Opinion (2018) Scientific Opinion on the state of the art of Toxicokinetic/Toxicodynamic (TKTD) effect models for regulatory risk assessment of pesticides for aquatic organisms https://www.efsa.europa.eu/en/efsajournal/pub/5377.
survFitTKTD
objectThis is the generic summary
S3 methode for the survFitTKTD
class.
It shows the quantiles of priors and posteriors on parameters.
## S3 method for class 'survFitTKTD' summary(object, quiet = FALSE, ...)
## S3 method for class 'survFitTKTD' summary(object, quiet = FALSE, ...)
object |
an object of class |
quiet |
when |
... |
Further arguments to be passed to generic methods. |
The function returns a list with the following information:
Qpriors |
quantiles of the model priors |
Qposteriors |
quantiles of the model posteriors |
survFitTT
objectThis is the generic summary
S3 method for the survFitTT
class.
It shows the quantiles of priors and posteriors on parameters and the quantiles
of the posteriors on the LCx estimates.
## S3 method for class 'survFitTT' summary(object, quiet = FALSE, ...)
## S3 method for class 'survFitTT' summary(object, quiet = FALSE, ...)
object |
an object of class |
quiet |
when |
... |
Further arguments to be passed to generic methods |
The function returns a list with the following information:
Qpriors |
quantiles of the model priors |
Qposteriors |
quantiles of the model posteriors |
QLCx |
quantiles of LCx estimates |
This function creates a survData
object from experimental data
provided as a data.frame
. The resulting object
can then be used for plotting and model fitting. It can also be used
to generate individual-time estimates.
The survDataCheck
function can be used to check if an object
containing survival data is formatted according to the expectations of the
survData
function.
survData(x) survDataCheck(data, diagnosis.plot = FALSE)
survData(x) survDataCheck(data, diagnosis.plot = FALSE)
x |
a
|
data |
any object |
diagnosis.plot |
if |
Survival data sets can be under either constant or time-variable exposure profile. The
resulting object, in addition to its survData
class, inherits the
class survDataCstExp
or survDataVarExp
respectively.
The x
argument describes experimental results from a survival
toxicity test. Each line of the data.frame
corresponds to one experimental measurement, that is a number of alive
individuals at a given concentration at a given time point and in a given replicate.
Note that either the concentration
or the number of alive individuals may be missing. The data set is inferred
to be under constant exposure if the concentration is constant for each
replicate and systematically available. The function survData
fails if
x
does not meet the
expected requirements. Please run survDataCheck
to ensure
x
is well-formed.
A dataframe of class survData
and column replicate
as factor
.
The function returns a dataframe of class msgTable
and data.frame
with two columns: id
and msg
of
character strings. When no error is detected the object is empty.
Here is the list of possible error id
s with their meaning:
dataframeExpected |
an object of class data.frame is expected |
missingColumn |
at least one expected column heading is missing |
firstTime0 |
the first time point for some (concentration, replicate) couples is not 0 |
concNumeric |
column conc contains a value of class other than numeric |
timeNumeric |
column time contains a value of class other than numeric |
NsurvInteger |
column Nsurv contains a value of class other than integer |
tablePositive |
some data are negative |
Nsurv0T0 |
Nsurv is 0 at time 0 for some (concentration, replicate) |
duplicateID |
there are two identical (replicate , time ) couples |
NsurvIncrease |
Nsurv increases at some time point of some (concentration, replicate) |
maxTimeDiffer |
maximum time for concentration is lower than maximum time for survival |
If an error of type dataframeExpected
or missingColumn
is
detected, the function survDataCheck
is stopped before looking for
other errors.
This function joins two data sets, one for exposure measurements, the other
for survival measurements, into a single dataframe that can be used
with the survData
function.
survData_join(x, y)
survData_join(x, y)
x |
a
|
y |
a
|
a dataframe suitable for 'survData'
This function estimates the parameters of a TKTD model ('SD' or 'IT') for survival analysis using Bayesian inference. In this model, the survival rate of individuals is modeled as a function of the chemical compound concentration with a mechanistic description of the effects on survival over time.
survFit( data, model_type, quiet, n.chains, n.adapt, n.iter, n.warmup, thin.interval, limit.sampling, dic.compute, dic.type, hb_value, hb_valueFIXED, ... ) ## S3 method for class 'survDataCstExp' survFit( data, model_type = NULL, quiet = FALSE, n.chains = 3, n.adapt = 3000, n.iter = NULL, n.warmup = NULL, thin.interval = NULL, limit.sampling = TRUE, dic.compute = FALSE, dic.type = "pD", hb_value = TRUE, hb_valueFIXED = NA, ... ) ## S3 method for class 'survDataVarExp' survFit( data, model_type = NULL, quiet = FALSE, n.chains = 3, n.adapt = 1000, n.iter = NULL, n.warmup = NULL, thin.interval = NULL, limit.sampling = TRUE, dic.compute = FALSE, dic.type = "pD", hb_value = TRUE, hb_valueFIXED = NA, extend_time = 100, ... )
survFit( data, model_type, quiet, n.chains, n.adapt, n.iter, n.warmup, thin.interval, limit.sampling, dic.compute, dic.type, hb_value, hb_valueFIXED, ... ) ## S3 method for class 'survDataCstExp' survFit( data, model_type = NULL, quiet = FALSE, n.chains = 3, n.adapt = 3000, n.iter = NULL, n.warmup = NULL, thin.interval = NULL, limit.sampling = TRUE, dic.compute = FALSE, dic.type = "pD", hb_value = TRUE, hb_valueFIXED = NA, ... ) ## S3 method for class 'survDataVarExp' survFit( data, model_type = NULL, quiet = FALSE, n.chains = 3, n.adapt = 1000, n.iter = NULL, n.warmup = NULL, thin.interval = NULL, limit.sampling = TRUE, dic.compute = FALSE, dic.type = "pD", hb_value = TRUE, hb_valueFIXED = NA, extend_time = 100, ... )
data |
An object of class |
model_type |
Can be |
quiet |
If |
n.chains |
A positive integer specifying the number of MCMC chains. The minimum required number of chains is 2. |
n.adapt |
A positive integer specifying the number of iterations for adaptation. If |
n.iter |
A positive integer specifying the number of iterations to monitor for each chain. |
n.warmup |
A positive integer specifying the number of warmup (aka burnin) iterations per chain. |
thin.interval |
A positive integer specifying the period to monitor. |
limit.sampling |
if |
dic.compute |
if |
dic.type |
type of penalty to use. A string identifying the type of penalty: |
hb_value |
If |
hb_valueFIXED |
If |
... |
Further arguments to be passed to generic methods |
extend_time |
Number of for each replicate used for linear interpolation (comprise between time to compute and fitting accuracy) |
The function survFit
returns the parameter estimates of Toxicokinetic-toxicodynamic (TKTD) models
SD
for 'Stochastic Death' or IT
fo 'Individual Tolerance'.
TKTD models, and particularly the General Unified Threshold model of
Survival (GUTS), provide a consistent process-based
framework to analyse both time and concentration dependent datasets.
In GUTS-SD, all organisms are assumed to have the same internal concentration
threshold (denoted ), and, once exceeded, the instantaneous probability
to die increases linearly with the internal concentration.
In GUTS-IT, the threshold concentration is distributed among all the organisms, and once
exceeded in one individual, this individual dies immediately.
When class of object
is survDataCstExp
, see survFit.survDataCstExp ;
and for a survDataVarExp
, see survFit.survDataVarExp.
an object of class survFit
The function returns an object of class survFitCstExp
, which is
a list with the following information:
estim.par |
a table of the estimated parameters as medians and 95% credible intervals |
mcmc |
an object of class |
model |
a JAGS model object |
dic |
return the Deviance Information Criterion (DIC) if |
warnings |
a table with warning messages |
parameters |
a list of parameter names used in the model |
n.chains |
an integer value corresponding to the number of chains used for the MCMC computation |
mcmcInfo |
a table with the number of iterations, chains, adaptation, warmup and the thinning interval. |
jags.data |
a list of the data passed to the JAGS model |
model_type |
the type of TKTD model used: |
The function returns an object of class survFitVarExp
, which is
a list with the following information:
estim.par |
a table of the estimated parameters as medians and 95% credible intervals |
mcmc |
an object of class |
model |
a JAGS model object |
dic |
return the Deviance Information Criterion (DIC) if |
warnings |
a table with warning messages |
parameters |
a list of parameter names used in the model |
n.chains |
an integer value corresponding to the number of chains used for the MCMC computation |
mcmcInfo |
a table with the number of iterations, chains, adaptation, warmup and the thinning interval |
jags.data |
a list of the data passed to the JAGS model |
model_type |
the type of TKTD model used: |
Jager, T., Albert, C., Preuss, T. G. and Ashauer, R. (2011) General unified threshold model of survival-a toxicokinetic-toxicodynamic framework for ecotoxicology, Environmental Science and Technology, 45, 2529-2540. 303-314.
survDataTKTD
objectThis function estimates the parameters of a TKTD model for survival analysis using Bayesian inference. In this model, the survival rate of individuals is modeled as a function of the chemical compound concentration with a mechanistic description of the effects on survival over time.
survFitTKTD(data, n.chains = 3, quiet = FALSE)
survFitTKTD(data, n.chains = 3, quiet = FALSE)
data |
An object of class |
n.chains |
Number of MCMC chains. The minimum required number of chains is 2. |
quiet |
If |
The function returns an object of class survFitTKTD
, which is
a list with the following information:
estim.par |
a table of the estimated parameters as medians and 95% credible intervals |
mcmc |
an object of class |
warnings |
a table with warning messages |
model |
a JAGS model object |
parameters |
a list of parameter names used in the model |
n.chains |
an integer value corresponding to the number of chains used for the MCMC computation |
n.iter |
a list of two indices indicating the beginning and the end of monitored iterations |
n.thin |
a numerical value corresponding to the thinning interval |
jags.data |
a list of data passed to the JAGS model |
Delignette-Muller ML, Ruiz P and Veber P (2017). Robust fit of toxicokinetic-toxicodynamic models using prior knowledge contained in the design of survival toxicity tests.
Bedaux, J., Kooijman, SALM (1994) Statistical analysis of toxicity tests, based on hazard modeling, Environmental and Ecological Statistics, 1, 303-314.
Fits a Bayesian concentration-response model for target-time survival analysis
survFitTT(data, ...)
survFitTT(data, ...)
data |
an object used to select a method 'survFitTT' |
... |
Further arguments to be passed to generic methods |
an object of class survFitTT
This function estimates the parameters of an concentration-response model for target-time survival analysis using Bayesian inference. In this model, the survival rate of individuals at a given time point (called target time) is modeled as a function of the chemical compound concentration. The actual number of surviving individuals is then modeled as a stochastic function of the survival rate. Details of the model are presented in the vignette accompanying the package.
## S3 method for class 'survDataCstExp' survFitTT( data, target.time = NULL, lcx = c(5, 10, 20, 50), n.chains = 3, quiet = FALSE, ... )
## S3 method for class 'survDataCstExp' survFitTT( data, target.time = NULL, lcx = c(5, 10, 20, 50), n.chains = 3, quiet = FALSE, ... )
data |
an object of class |
target.time |
the chosen endpoint to evaluate the effect of the chemical compound concentration, by default the last time point available for all concentrations |
lcx |
desired values of |
n.chains |
number of MCMC chains, the minimum required number of chains is 2 |
quiet |
if |
... |
Further arguments to be passed to generic methods |
The function returns
parameter estimates of the concentration-response model and estimates of the so-called
, that is the concentration of chemical compound required to get an
survival rate.
The function returns an object of class survFitTT
, which is a
list with the following information:
estim.LCx |
a table of the estimated |
estim.par |
a table of the estimated parameters (medians) and 95% credible intervals |
det.part |
the name of the deterministic part of the used model |
mcmc |
an object of class |
warnings |
a table with warning messages |
model |
a JAGS model object |
parameters |
a list of parameter names used in the model |
n.chains |
an integer value corresponding to the number of chains used for the MCMC computation |
n.iter |
a list of two indices indicating the beginning and the end of monitored iterations |
n.thin |
a numerical value corresponding to the thinning interval |
jags.data |
a list of the data passed to the JAGS model |
transformed.data |
the |
dataTT |
the dataset with which the parameters are estimated |
Reproduction and survival data sets of a chronic laboratory toxicity tests with Daphnia magna freshwater invertebrate exposed to four concentrations of zinc during 21 days. Four concentrations were tested with three replicates per concentration. Each replicate contained 20 organisms. Reproduction and survival were monitored at 15 time points.
data(zinc)
data(zinc)
A data frame with 180 observations on the following five variables:
replicate
A vector of class numeric
with the
replicate code (1
to 12
).
conc
A vector of
class numeric
with zinc concentrations in .
time
A vector of class integer
with the time points
(in days from the beginning of the experiment ).
Nsurv
A vector of class integer
with the number of
alive individuals at each time point for each concentration and each
replicate.
Nrepro
A vector of class integer
with the
number of offspring at each time point for each concentration and each
replicate.
Billoir, E.,Delignette-Muller, M.L., Pery, A.R.R. and Charles S. (2008) A Bayesian Approach to Analyzing Ecotoxicological Data, Environmental Science & Technology, 42 (23), 8978-8984.