Torsten

Version 0.89.0

A pharmacokinetics/pharmacodynamics library for Stan

Two Compartment Model

Table of Contents

1 Description

Function pmx_solve_twocpt solves a two-compartment PK model (Figure /Torsten/function/one-cpt/). The model obtains the mass \((y_1, y_2, y_3)\) in each compartment by solving the ODEs

\begin{align} \label{eq:twocpt} y_1' &= -k_a y_1 \\\
y_2' &= k_a y_1 - \left(\frac{CL}{V_2} + \frac{Q}{V_2}\right) y_2 + \frac{Q}{V_3} y_3 \\\
y_3' &= \frac{Q}{V_2} y_2 - \frac{Q}{V_3} y_3 \end{align}

The plasma concentrations of parent drug in the central compartment can then be calculated as \(c=y_2/V_2\).

2 Usage

matrix = pmx_solve_twocpt(time, amt, rate, ii, evid, cmt, addl, ss, theta [, biovar, tlag ] )

3 Arguments

See Tables in Section Events specification.

4 Return value

An ncmt-by-nt matrix, where nt is the number of time steps and ncmt=3 is the number of compartments.

5 Note

  • ODE Parameters theta consists of \(CL\), \(Q\), \(V_2\), \(V_3\), \(k_a\).
  • biovar and tlag are optional, so that the following are allowed:
pmx_solve_twocpt(..., theta);
pmx_solve_twocpt(..., theta, biovar);
pmx_solve_twocpt(..., theta, biovar, tlag);
  • Setting \(k_a = 0\) eliminates the first-order absorption.
Last updated on 30 Jun 2021
Published on 25 Jun 2021
 Edit on GitHub