% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{rxDerived}
\alias{rxDerived}
\title{Calculate derived parameters for the 1-, 2-, and 3- compartment
linear models.}
\usage{
rxDerived(..., verbose = FALSE, digits = 0)
}
\arguments{
\item{...}{The input can be:
\itemize{
\item A data frame with PK parameters in it; This should ideally
be a data frame with one pk parameter per row since it will
output a data frame with one PK parameter per row.
\item PK parameters as either a vector or a scalar
}}

\item{verbose}{boolean that when TRUE provides a message about the detected pk parameters
and the detected compartmental model.  By default this is \code{FALSE}.}

\item{digits}{represents the number of significant digits for the
output; If the number is zero or below (default), do not round.}
}
\value{
Return a data.frame of derived PK parameters for a 1-, 2-,
or 3-compartment linear model given provided clearances and
volumes based on the inferred model type.

The model parameters that will be provided in the data frame are:
\itemize{
\item \code{vc}: Central Volume (for 1-, 2- and 3-
compartment models)
\item \code{kel}: First-order elimination rate (for 1-, 2-, and
3-compartment models)
\item \code{k12}: First-order rate of transfer from central to
first peripheral compartment; (for 2- and 3-compartment models)
\item \code{k21}: First-order rate of transfer from first
peripheral to central compartment, (for 2- and 3-compartment
models)
\item \code{k13}: First-order rate of transfer from central to
second peripheral compartment; (3-compartment model)
\item \code{k31}: First-order rate of transfer from second
peripheral to central compartment (3-compartment model)
\item \code{vp}: Peripheral Volume (for 2- and 3- compartment models)
\item \code{vp2}: Peripheral Volume for 3rd compartment (3- compartment model)
\item \code{vss}: Volume of distribution at steady state; (1-, 2-, and 3-compartment models)
\item \code{t12alpha}: \eqn{t_{1/2,\alpha}}; (1-, 2-, and 3-compartment models)
\item \code{t12beta}: \eqn{t_{1/2,\beta}}; (2- and 3-compartment models)
\item \code{t12gamma}: \eqn{t_{1/2,\gamma}}; (3-compartment model)
\item \code{alpha}: \eqn{\alpha}; (1-, 2-, and 3-compartment models)
\item \code{beta}: \eqn{\beta}; (2- and 3-compartment models)
\item \code{gamma}: \eqn{\beta}; (3-compartment model)
\item \code{A}: true \code{A}; (1-, 2-, and 3-compartment models)
\item \code{B}: true \code{B}; (2- and 3-compartment models)
\item \code{C}: true \code{C}; (3-compartment model)
\item \code{fracA}: fractional A; (1-, 2-, and 3-compartment models)
\item \code{fracB}: fractional B; (2- and 3-compartment models)
\item \code{fracC}: fractional C; (3-compartment model)
}
}
\description{
This calculates the derived parameters based on what is provided
in a data frame or arguments
}
\examples{

## Note that rxode2 parses the names to figure out the best PK parameter

params <- rxDerived(cl = 29.4, v = 23.4, Vp = 114, vp2 = 4614, q = 270, q2 = 73)

## That is why this gives the same results as the value before

params <- rxDerived(CL = 29.4, V1 = 23.4, V2 = 114, V3 = 4614, Q2 = 270, Q3 = 73)

## You may also use micro-constants alpha/beta etc.

params <- rxDerived(k12 = 0.1, k21 = 0.2, k13 = 0.3, k31 = 0.4, kel = 10, v = 10)

## or you can mix vectors and scalars

params <- rxDerived(CL = 29.4, V = 1:3)

## If you want, you can round to a number of significant digits
## with the `digits` argument:

params <- rxDerived(CL = 29.4, V = 1:3, digits = 2)
}
\references{
Shafer S. L. \code{CONVERT.XLS}

Rowland M, Tozer TN. Clinical Pharmacokinetics and Pharmacodynamics: Concepts and Applications (4th). Clipping Williams & Wilkins, Philadelphia, 2010.
}
\author{
Matthew Fidler and documentation from Justin Wilkins, \email{justin.wilkins@occams.com}
}
