FitTT: Fits a Bayesian concentration-response model for target-time

FitTTR Documentation

Fits a Bayesian concentration-response model for target-time

Description

  • binary data: This function estimates the parameters of a concentration-response model for target-time binary data analysis using Bayesian inference. In this model, the rate of binary effect (survival or immobility) individuals at a given time point (called target time) is modeled as a function of the chemical compound concentration. The actual number of surviving individuals is then modeled as a stochastic function of the survival rate. Details of the model are presented in the vignette accompanying the package.

  • count data: This function estimates the parameters of a concentration-effect model for target-time reproduction analysis using Bayesian inference. In this model the endpoint is the cumulated number of event (like reproduction) over time, with potential failure (death) all along the experiment. Particularly dedicated to reproduction data, because some individuals may die during the observation period, the reproduction rate alone is not sufficient to account for the observed number of offspring at a given time point. In addition, we need the time individuals have stayed alive during this observation period. The fit function estimates the number of individual-days in an experiment between its start and the target time. This covariable is then used to estimate a relation between the chemical compound concentration and the reproduction rate per individual-day. The fit function on CountData fits two models, one where inter-individual variability is neglected ("Poisson" model) and one where it is taken into account ("gamma-Poisson" model). When setting stoc.part to "bestfit", a model comparison procedure is used to choose between both. More details are presented in the vignette accompanying the package.

  • continuous data: This function estimates the parameters of a concentration-response model for target-time of any continuous data analysis using Bayesian inference. This model is particularly well-suited for growth data. Details of the model are presented in the vignette accompanying the package. We can choose the stochastic part to be either "gamma" or "normal", with a default to "gamma".

Usage

## S3 method for class 'BinaryData'
fit(
  data,
  target.time = NULL,
  inits = NULL,
  n.chains = 3,
  n.adapt = 3000,
  quiet = FALSE,
  warning.print = TRUE,
  n.iter = NA,
  ...
)

## S3 method for class 'ContinuousData'
fit(
  data,
  stoc.part = "gamma",
  target.time = NULL,
  inits = NULL,
  n.chains = 3,
  n.adapt = 3000,
  quiet = FALSE,
  warning.print = TRUE,
  n.iter = NA,
  low.asympt = FALSE,
  ...
)

## S3 method for class 'CountData'
fit(
  data,
  stoc.part = "bestfit",
  target.time = NULL,
  inits = NULL,
  n.chains = 3,
  n.adapt = 3000,
  quiet = FALSE,
  warning.print = TRUE,
  n.iter = NA,
  ...
)

fit(data, ...)

Arguments

data

an object of class BinaryData, CountData or CountinuousData

target.time

the chosen endpoint to evaluate the effect of the chemical compound concentration, by default the last time point available for all concentrations

inits

See jags.model. Optional specification of initial values.

n.chains

number of MCMC chains, the minimum required number of chains is 2

n.adapt

The number of iterations for adaptation. See jags.model for further details.

quiet

if TRUE, does not print messages and progress bars from JAGS

warning.print

if TRUE, print the warnings in REPL

n.iter

if NA, default, the number of iteration is estimated from raftery.diag process, otherwise, set the n.iter provided.

...

Further arguments to be passed to generic methods

stoc.part

a string for stochastic part. For "" model, the stoc.part is "gamma" (default) but can be "normal".

low.asympt

binary TRUE/FALSE. If TRUE, a parameter for the lower side of the assymptote is compute in case of Continuous Data. Default is FALSE.

Value

The function returns an object of class FitTT and BinaryFitTT, which is a list with the following information:

mcmc

an object of class mcmc.list with the posterior distribution

warnings

a table with warning messages

parameters

a list of parameter names used in the model

model.specification

a set of parameters describing th model used

jags.data

a list of the data passed to the JAGS model

original.data

the survData object passed to the function

dataTT

the dataset with which the parameters are estimated


morseDR documentation built on June 8, 2025, 10:20 a.m.