The function fitBeeGUTS estimates the parameters of a GUTS model
for the stochastic death (SD) or individual tolerance (IT) death mechanisms for
survival analysis using Bayesian inference.
fitBeeGUTS(
data,
modelType = NULL,
distribution = "loglogistic",
priorsList = NULL,
parallel = TRUE,
nCores = parallel::detectCores() - 1L,
nChains = 3,
nIter = 2000,
nWarmup = floor(nIter/2),
thin = 1,
adaptDelta = 0.95,
odeIntegrator = "rk45",
relTol = 1e-08,
absTol = 1e-08,
maxSteps = 1000,
...
)The function fitBeeGUTS returns the parameter estimates
of the General Unified Threshold model of Survival (GUTS) in an object
of class beeSurvFit. This object is a list composed of the following:
An object of S4 class stanfit. More information is available
in the package rstan.
The data object provided as argument of the function
A list of data passed to the Stan model object
A list containing the setup used for the MCMC chains
A character vector specifying the type of GUTS model used between
SD and IT
A character vector specifying the type of distribution used in case IT was used;
NA otherwise
A character vector containing warning messages
An object of class beeSurvData
A model type between "SD" for Stochastic Death and
"IT" for Individual Tolerance.
A distribution for the IT death mechanism. To be chosen between
"loglogistic" and "lognormal". Default is "loglogistic"
A list containing the prior distribution for the parameter considered.
By default, when no priors are provided (default is NULL), priors are set automatically
based on the experimental design (adapted from Delignette-Muller et al 2017)
Logical indicating whether parallel computing should be used or not. Default is TRUE
A positive integer specifying the number of cores to use. Default is one core less than maximum number of cores available
A positive integer specifying the number of MCMC chains to run. Default is 3.
A positive integer specifying the number of iteration to monitor for each MCMC chain. Default is 2000
A positive integer specifying the number of warmup iteration per chain. Default is half the number of iteration
A positive integer specifying the interval between the iterations to monitor. Default is 1 (all iterations are monitored)
A double, bounded between 0 and 1 and controlling part of the sampling algorithms.
See the control in the function stan rstan::stan() of the package rstan. The default is 0.95.
A string specifying the integrator used to solve the system of
differential equations (ODE) in the stan module. To be chosen between
"rk45" and "euler". Default is "rk45". The "euler"
integrator uses a fixed step of 0.01 d to calculate the solution (avoid using it
for fast varying concentrations)
A double, bounded between 0 and 1 and controlling the relative tolerance of the accuracy of the solutions generated by the integrator. A smaller tolerance produces more accurate solution at the expanse of the computing time. Default is 1e-8
A double, bounded between 0 and 1 and controlling the absolute tolerance of the accuracy of the solutions generated by the integrator. A smaller tolerance produces more accurate solution at the expanse of the computing time. Default is 1e-8
A double controlling the maximum number of steps that can be taken before stopping a runaway simulation. Default is 1000
Additional parameters to be passed to sampling from stan
The automated prior determination is modified from Delignette-Muller et al. by considering that the minimal concentration for the prior can be close to 0 (1e-6) whereas the original paper considered the lowest non-zero concentration. Similarly, the minimal kd considered for the prior calculation was reduced to allow more chance to capture slow kinetics.
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. tools:::Rd_expr_doi("10.1021/acs.est.6b05326")
# \donttest{
data(betacyfluthrinChronic)
fit <- fitBeeGUTS(betacyfluthrinChronic, modelType = "SD", nIter = 1000, nCores = 2)
# }
Run the code above in your browser using DataLab