Learn R Programming

morse (version 3.3.4)

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.

Usage

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 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 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, ... )

Value

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 mcmc.list with the posterior distribution

model

a JAGS model object

dic

return the Deviance Information Criterion (DIC) if dic.compute is TRUE

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: SD or IT

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 mcmc.list with the posterior distribution

model

a JAGS model object

dic

return the Deviance Information Criterion (DIC) if dic.compute is TRUE

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: SD or IT

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.

quiet

If FALSE, prints logs and progress bar from JAGS.

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.adapt = 0 then no adaptation takes place.

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 FALSE (default is TRUE), there is no limit to the number of iterations in MCMC imposed by the raftery.diag test.

dic.compute

if TRUE (default is FALSE), it generates penalized deviance samples to compute the Deviance Information Criterion (DIC) with the rjags package

dic.type

type of penalty to use. A string identifying the type of penalty: pD or popt (see function dic.samples)

hb_value

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

hb_valueFIXED

If hb_value is FALSE, then hb_valueFiXED is the value to fix hb. If hb_value is FALSE and hb_valueFiXED is NA, then hb is fixed to 0.

...

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)

Details

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 \(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.

When class of object is survDataCstExp, see survFit.survDataCstExp ; and for a survDataVarExp, see survFit.survDataVarExp.

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.