<CRANTaskView>

<name>Pharmacokinetics</name>
<topic>Analysis of Pharmacokinetic Data</topic>
<maintainer email="sblanchard@coh.org">Suzette Blanchard</maintainer>
<version>2015-07-03</version>

<info>

<p>
The primary goal of pharmacokinetic (PK) data analysis is to determine the relationship between
the dosing regimen and the body's exposure to the drug as measured by the nonlinear concentration
time curve or related summaries (e.g. the area under the curve).  Base R contains nls
which can be used to calculate nonlinear least-squares estimates of the parameters from a PK 
model. It returns an object of the class <code>"nls"</code> having methods <code>coef()</code>, <code>formula()</code>, 
<code>resid()</code>, <code>print()</code>, <code>summary()</code>, <code>AIC()</code>, <code>fitted()</code> and 
<code>vcov()</code>.  Four packages are available in CRAN that directly aid in PK data analysis, including; 
the packages <pkg>PK</pkg>, <pkg>nlmeODE</pkg> which incorporates <pkg>nlme</pkg>, and 
<pkg>deSolve</pkg>. While <pkg>PK</pkg> provides basic pharmacokinetics 
functions which implement non-compartmental analysis methods, the latter three packages focus on modeling 
methods. In addition, this task view includes a discussion of a few related packages including the package 
<pkg>lattice</pkg> for trellis graphics, and the package <pkg>MASS</pkg> 
and the package <pkg>drc</pkg> that aid in the analysis of dose response curves.  
</p>

<p>
<pkg>PK</pkg> is a basic pharmacokinetics package providing functions to aid in non-compartmental analysis 
(Gibaldi and Perrier,1982) of PK data. This package includes a function, <code>AUC()</code>, to calculate area 
under the curve, and the area under the first moment curve and two new functions <code>auc.ssd()</code> and <code>eqv.sdd()</code> for 
estimating and comparing AUCs in the case of serial sampling. It also includes functions for half-life estimation 
for a biexponential model, <code>biexp()</code>, and a two phase linear regression, <code>lee()</code> 
as well as an associated plot function, <code>plot.halflife()</code>.
</p>

<p>
When analyzing PK data once the primary goal of estimating exposure is achieved, the interest shifts 
to determining if exposure differs among subpopulations based on subject specific covariates (age, size, 
concomitant medications, kidney function) requiring a change in dose. Within the field of pharmacokinetics,
analyses combining data from multiple individuals to estimate the population parameters are termed
population PK. The non-linear mixed models framework provides a natural tool for analyzing population 
PK data, using either frequentist or Bayesian estimation methods.
</p>

<p>
The package <pkg>nlme</pkg> fits a nonlinear mixed-effects model using the frequentist
approach (Lindstrom and Bates, 1990) which allows for nested random effects. An object of 
class <code>"nlme"</code> representing the nonlinear mixed-effects model fit is returned.
The results can be output using the methods <code>print()</code>, <code>plot()</code>, 
and <code>summary()</code>. The nlmeObject gives further details regarding the components of the 
<code>"nlme"</code> object and how to extract them. The package <pkg>nlmeODE</pkg> incorporates the <pkg>deSolve</pkg>
and <pkg>nlme</pkg> along with the library of PK/PD models, <pkg>PKPDmodels</pkg>. A discussion of the 
analysis methods for population PK using <pkg>nlme</pkg> is provided in Pinheiro and Bates (2000). 
</p>

<p>
Bayesian estimation methods for panel data are also available. These methods have been described 
in the CRAN task view for <view>Bayesian</view> Inference.  Bayesian analysis methods for 
population PK data are described in Lunn et al.(2002). 
</p>

<p>
Graphic display is important in the analysis of pharmacokinetic data. The panel structure
of the data is often well displayed using the <pkg>lattice</pkg> library of trellis plots.
The <code>identify()</code> function reads the position of the pointer on the graph and can be 
used to identify outlying data points in diagnostic plots.
</p>

<p> 
The package <pkg>drc</pkg> deals with the related issue of fitting a dose response curve. 
In this package the authors provide self starting functions for a number of model families
including, the logisitic, Weibull and Cedergreen-Ritz-Streibig. Functions for estimation 
<code>multdrc()</code>, and model comparison including, <code>compParm()</code>, <code>ED()</code>, 
which respectively compare parameters, and effective dosage as well as, plot functions for the raw data, 
<code>plotraw()</code>, and the fitted values,<code>plot()</code>, are provided. This package is discussed in 
Ritz and Streibig (2005). Further, base R contains <code>glm()</code> which can be used to analyze
logit and probit models and the <pkg>MASS</pkg> package contains some additional 
related functions. The methodology is briefly discussed in Venables and Ripley (2002).
</p>

<p>
This is a early draft of this task view. Please let me know if I have omitted any
important information by sending email to the
<a href="mailto:sblanchard@coh.org?subject=Pharmacokinetics%20Task%20View">task view maintainer</a>.
</p>

<p><big><b>References:</b></big></p>
<ul>
<li>
Beal, S.L.  and Sheiner, L.B. (1989). <i>NONMEM Users Guide - Part I</i>. NONMEM Project Group. UCSF. 
</li>
<li>
Gibaldi, M. and Perrier, D. (1982). <i>Pharmacokinetics</i>, 2nd edition. Marcel Dekker, New York.
</li>
<li>
Lindstrom, M.J. and Bates, D.M. (1990). Nonlinear Mixed Effects Models for Repeated Measures Data.
<i>Biometrics,</i> 46,673-687.
</li>
<li>
Lunn, D.J. and Best, N. and Thomas, A. and Wakefield, J. and Spiegelhalter, D. (2002). 
Bayesian Analysis of Population PK/PD Models: General Concepts and Software.
<i>Journal of Pharmacokinetics and Pharmacodynamics,</i> 29(3), 271-307.
</li>
<li>
Pinheiro, J.C. and Bates, D.M. (2000). <i> Mixed-Effects Models in S and S-PLUS.</i> Springer-Verlag, New York.
</li>
<li>
Ritz, C. and Streibig, J.C. (2005). Bioassay Analysis Using R. <i> Journal of Statistical Software </i> 12(5).
URL <a href="http://www.jstatsoft.org/v12/i05/">http://www.jstatsoft.org/v12/i05/</a>.
</li>
<li>
Spiegelhalter, D. and Thomas, A. and Best, N. and Lunn, D. (2001).
<i> WinBUGS Version 1.4 User Manual. </i> Imperial College School of Medicine, London,
</li>
<li>
Venables, W.N. and Ripley, B.D. (2002, 4th Edition). 
<i> Modern Applied Statistics with S.</i> Springer-Verlag, New York.
</li>
</ul>

</info>

<packagelist>
  <pkg>deSolve</pkg>
  <pkg>drc</pkg>
  <pkg priority="core">lattice</pkg>
  <pkg>MASS</pkg>
  <pkg>nlme</pkg>
  <pkg priority="core">nlmeODE</pkg>
  <pkg priority="core">PK</pkg>
  <pkg>PKPDmodels</pkg>
</packagelist>

<links>
<a href="http://winbugs-development.mrc-bsu.cam.ac.uk/pkbugs/home.html">PKBUGS</a>
<a href="http://www.mrc-bsu.cam.ac.uk/bugs/">WinBUGS</a>
<a href="http://www.iconplc.com/jp/technology/products/nonmem/">NONMEM</a>
</links>

</CRANTaskView>
