Title: | Solve ODE for GUTS-RED-SD and GUTS-RED-IT Using Compiled Code |
---|---|
Description: | Allows performing forwards prediction for the General Unified Threshold model of Survival using compiled ode code. This package was created to avoid dependency with the 'morse' package that requires the installation of 'JAGS'. This package is based on functions from the 'morse' package v3.3.1: Virgile Baudrot, Sandrine Charles, Marie Laure Delignette-Muller, Wandrille Duchemin, Benoit Goussen, Nils Kehrein, Guillaume Kon-Kam-King, Christelle Lopes, Philippe Ruiz, Alexander Singer and Philippe Veber (2021) <https://CRAN.R-project.org/package=morse>. |
Authors: | Benoit Goussen [aut, cre] |
Maintainer: | Benoit Goussen <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.3 |
Built: | 2025-03-06 05:34:19 UTC |
Source: | https://github.com/bgoussen/odeguts |
Model calibration results for a GUTS-SD theoretical species exposed to a compound.
data(fit_odeGUTS)
data(fit_odeGUTS)
A list of class survFit
constructed
mcmc
A list of mcmc chain results
model_type
A character string containing the type of GUTS model used (here 'SD').
survFitPredict
and
survFitPredict_Nsurv
objectsFunction from the morse v 3.3.1
package.
It returns measures of goodness-of-fit for predictions.
Function from the morse v 3.3.1
package.
Provide various criteria for assessment of the model performance:
(i) percentage of observation within the 95\
interval of the Posterior Prediction Check (PPC), the Normalised Root Mean
Square Error (NRMSE) and the Survival Probability Prediction Error (SPPE) as
recommended 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 |
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
objectsFunction from the morse v 3.3.1
package.
This 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.
Function from the morse v 3.3.1
package.
This 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.
Function from the morse v 3.3.1
package.
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.
predict_ode(object, ...) ## S3 method for class 'survFit' predict_ode( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = 1000, hb_value = FALSE, interpolate_length = 100, interpolate_method = "linear", hb_valueFORCED = 0, ... ) 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 = FALSE, hb_valueFORCED = 0, extend_time = 100, interpolate_length = NULL, interpolate_method = "linear", ... )
predict_ode(object, ...) ## S3 method for class 'survFit' predict_ode( object, data_predict = NULL, spaghetti = FALSE, mcmc_size = 1000, hb_value = FALSE, interpolate_length = 100, interpolate_method = "linear", hb_valueFORCED = 0, ... ) 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 = FALSE, hb_valueFORCED = 0, extend_time = 100, interpolate_length = NULL, interpolate_method = "linear", ... )
object |
An object of class |
... |
Further arguments to be passed to generic methods |
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 |
extend_time |
Length of time points interpolated with variable exposure profiles. |
The function returns an object of class survFitPredict
or
survFitPredict_Nsurv
with two items:
df_quantile |
Predicted quantiles (q50, qinf95, and qsup95) |
df_spaghetti |
Predicted survival curve (if spaghetti = |
library("odeGUTS") data(fit_odeGUTS) data_4prediction <- data.frame(time = 1:10, conc = c(0,5,30,30,0,0,5,30,15,0), replicate= rep("predict", 10)) predict_out <- predict_ode(object = fit_odeGUTS, data_predict = data_4prediction, mcmc_size = 200, spaghetti = FALSE)
library("odeGUTS") data(fit_odeGUTS) data_4prediction <- data.frame(time = 1:10, conc = c(0,5,30,30,0,0,5,30,15,0), replicate= rep("predict", 10)) predict_out <- predict_ode(object = fit_odeGUTS, data_predict = data_4prediction, mcmc_size = 200, spaghetti = FALSE)