% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/debtox.R
\name{bdeb_tox}
\alias{bdeb_tox}
\title{DEBtox Model Specification}
\usage{
bdeb_tox(
  data,
  stress = c("assimilation", "maintenance", "growth_cost"),
  priors = list(),
  ...
)
}
\arguments{
\item{data}{A \code{\link[=bdeb_data]{bdeb_data()}} object with \code{concentration} specified.}

\item{stress}{Physiological mode of action.  Currently only
\code{"assimilation"} is implemented.}

\item{priors}{Named list of priors.  Missing entries filled from
\code{prior_default("debtox")}.  The toxicological parameters \eqn{k_d},
\eqn{z_w}, \eqn{b_w} default to weakly informative log-normal priors.}

\item{...}{Additional arguments passed to \code{\link[=bdeb_model]{bdeb_model()}}.}
}
\value{
A \code{bdeb_model} object of type \code{"debtox"}.
}
\description{
Convenience wrapper for \code{\link[=bdeb_model]{bdeb_model()}} that sets \code{type = "debtox"} and
provides a \code{stress} argument to select the physiological mode of action
(PMoA) of the toxicant.  The underlying TKTD framework follows
Jager et al. (2006) and the GUTS-RED-SD simplification of
Jager & Zimmer (2012):
}
\details{
\strong{Toxicokinetics.} Scaled internal damage \eqn{D_w} tracks the
external concentration with first-order kinetics:
\deqn{\frac{dD_w}{dt} = k_d\bigl(\max(C_w - z_w,\, 0) - D_w\bigr)}
where \eqn{k_d} is the dominant rate constant, \eqn{z_w} is the NEC
(no-effect concentration), and \eqn{C_w} is the external concentration.

\strong{Stress on assimilation.} The assimilation flux is reduced by a
factor \eqn{\max(1 - b_w D_w, 0)}, where \eqn{b_w} is the effect
intensity.  At steady state (\eqn{D_w = C_w - z_w}), the
\eqn{\mathrm{EC}_{50}} for 50\\% assimilation reduction is
\eqn{z_w + 0.5/b_w}.
}
\note{
\strong{Lifecycle: beta.}  Stress on assimilation is implemented and
tested; \code{"maintenance"} and \code{"growth_cost"} modes are planned.

\strong{Important limitation:} the DEBtox model fits \strong{one ODE per
concentration group}, not per individual.  If your data contain
multiple individuals per concentration, they are automatically
aggregated to group means per time point (with a warning).
This is appropriate for group-level summary data but does not
capture within-group individual variation.  A hierarchical
DEBtox extension is planned for a future version.
}
\examples{
# R-side specification only (no Stan sampling)
data(debtox_growth)
# one replicate per concentration avoids aggregation warning
dt <- debtox_growth[debtox_growth$id \%in\% c(1, 11, 21, 31), ]
dat <- bdeb_data(growth = dt, concentration = c(0, 20, 80, 200))
mod <- bdeb_tox(dat, stress = "assimilation")
}
\references{
Jager, T., Heugens, E.H.W. and Kooijman, S.A.L.M. (2006). Making
sense of ecotoxicological test results: towards application of
process-based models. \emph{Ecotoxicology}, 15(3), 305--314.
\doi{10.1007/s10646-006-0060-x}

Jager, T. and Zimmer, E.I. (2012). Simplified Dynamic Energy Budget
model for analysing ecotoxicity data. \emph{Ecological Modelling}, 225,
74--81. \doi{10.1016/j.ecolmodel.2011.11.012}
}
