Learn R Programming

morseTKTD (version 0.1.3)

SurvFit: Fits a TKTD model for survival analysis using Bayesian inference

Description

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.

The function 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 \(z\)), 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.

This is the generic plot S3 method for the SurvFit class. It plots concentration-response fit under target time survival analysis.

Usage

fit(data, model_type, hb_value, ...)

# S3 method for SurvDataCstExp fit(data, model_type, hb_value = NULL, ...)

# S3 method for SurvDataVarExp fit(data, model_type, hb_value = NULL, ...)

# S3 method for SurvFit plot( x, xlab = "Time", ylab = "Number of Survival", main = NULL, add_data = TRUE, add_legend = FALSE, ... )

Value

An object of class stanfit returned by rstan::sampling

an object of class ggplot, see function ggplot

Arguments

data

An object of class survDataCstExp or survDataVarExp.

model_type

Can be "SD" or "IT" to choose between "Stochastic Death" or "Individual Tolerance" models (resp.). See the modeling vignette for details.

hb_value

If TRUE, the background mortality hb is taken into account. If FALSE, parameter hb is set to 0. The default is TRUE.

...

Further arguments to be passed to generic methods using argument of sampling function.

x

a SurvFit object

xlab

label of the x-axis, default is "Time",

ylab

label of the y-axis, default is "Number of Survival"

main

title of the plot, defaul is NULL,

add_data

to add original data to the plot. Default ir TRUE

add_legend

add legend to the plot, default is FALSE

References

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.