% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adjoint.R
\name{.rxAdjointSolve}
\alias{.rxAdjointSolve}
\title{Solve the full-trajectory adjoint sensitivities for a model}
\usage{
.rxAdjointSolve(
  object,
  params,
  events,
  calcSens,
  outTimes,
  adjStates = NULL,
  denseBy = 0.01,
  atol = 1e-10,
  rtol = 1e-10
)
}
\arguments{
\item{object}{model definition accepted by \code{\link[=rxode2]{rxode2()}} (text,
\code{rxode2} object, or function/ui).}

\item{params}{named numeric vector of parameter values.}

\item{events}{event table / data used to define dosing.}

\item{calcSens}{character vector of parameter names to differentiate with
respect to.}

\item{outTimes}{numeric vector of output (observation) times at which the
sensitivities are requested.}

\item{adjStates}{character vector of output states of interest.  Defaults to
all ODE states (full forward-sensitivity parity).}

\item{denseBy}{grid spacing for the forward checkpoint trajectory; smaller
values reduce the covariate-interpolation error.}

\item{atol, rtol}{solver tolerances used for both the forward checkpoint and
the backward sweeps.}
}
\value{
data.frame with a \code{time} column and one
\verb{rx__sens_<state>_BY_<param>__} column per (state, param) pair.
}
\description{
Reconstructs \code{dy_k(t_i)/dp} for every output state \code{k}, parameter \code{p} and
output time \code{t_i} via backward (adjoint) integration, returning the same
\verb{rx__sens_<state>_BY_<param>__} columns that forward sensitivities produce.
}
\author{
Matthew L. Fidler
}
\keyword{internal}
