survFitTKTD: Fits a TKTD for survival analysis using Bayesian inference...

View source: R/survFitTKTD.R

survFitTKTDR Documentation

Fits a TKTD for survival analysis using Bayesian inference for survDataTKTD object

Description

This 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.

Usage

survFitTKTD(data, n.chains = 3, quiet = FALSE)

Arguments

data

An object of class survData.

n.chains

Number of MCMC chains. The minimum required number of chains is 2.

quiet

If FALSE, prints logs and progress bar from JAGS.

Value

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

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

References

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.

Examples


# (1) Load the survival data
data(propiconazole)

# (2) Create an object of class "survData"
dataset <- survData(propiconazole)


# (3) Run the survFitTKTD function
out <- survFitTKTD(dataset)

# (4) Summarize look the estimated parameters
summary(out)

# (5) Plot the fitted curve
plot(out, adddata = TRUE)

# (6) Plot the fitted curve with ggplot style and CI as spaghetti
plot(out, spaghetti = TRUE , adddata = TRUE,
     style = "ggplot")



morse documentation built on Oct. 29, 2022, 1:14 a.m.