% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adjoint.R
\name{rxSolveAdjoint}
\alias{rxSolveAdjoint}
\title{Solve a model with adjoint (backward) sensitivities, drop-in for forward sens}
\usage{
rxSolveAdjoint(
  object,
  params,
  events,
  calcSens,
  adjStates = NULL,
  denseBy = 0.01,
  atol = 1e-08,
  rtol = 1e-06,
  ...
)
}
\arguments{
\item{object}{model definition accepted by \code{\link[=rxode2]{rxode2()}}.}

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

\item{events}{event table / data used to define dosing and sampling times;
sampling (\code{evid==0}) times become the sensitivity output times.}

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

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

\item{denseBy, atol, rtol}{passed to the adjoint checkpoint solve; see
\code{\link[=.rxAdjointSolveEvalC]{.rxAdjointSolveEvalC()}}.}

\item{...}{additional arguments passed to the primal \code{\link[=rxSolve]{rxSolve()}} call.}
}
\value{
the standard \code{rxSolve()} output (as \code{returnType="data.frame"}) with
\verb{rx__sens_<state>_BY_<param>__} columns appended.
}
\description{
Solves \code{object} as \code{\link[=rxSolve]{rxSolve()}} would, then appends
\verb{rx__sens_<state>_BY_<param>__} columns computed via adjoint (backward)
sensitivity analysis.  Same column names and output structure as
\code{rxSolve(object, ..., calcSens=)}.  Prefer \code{\link[=.rxAdjointGrad]{.rxAdjointGrad()}} when only a
scalar objective gradient is needed.
}
\author{
Matthew L. Fidler
}
