Torsten

Version 0.89.0

A pharmacokinetics/pharmacodynamics library for Stan

General Linear ODE Model Function

Table of Contents

1 Description

Function pmx_solve_linode solves a (piecewise) linear ODEs model with coefficients in form of matrix \(K\)

\begin{equation} y^\prime\left(t\right) = Ky\left(t\right) \end{equation}

For example, in a two-compartment model with first order absorption, \(K\) is

\begin{equation} K = \left[\begin{array}{ccc} -k_a & 0 & 0 \\\
k_a & -\left(k_{10} + k_{12}\right) & k_{21} \\\
0 & k_{12} & -k_{21} \end{array}\right] \end{equation}

where \(k_{10}=CL/V_2\), \(k_{12}=Q/V_2\), and \(k_{21}=Q/V_3\).

2 Usage

matrix = pmx_solve_linode(time, amt, rate, ii, evid, cmt, addl, ss, K, biovar, tlag )

3 Arguments

  • K System parameters. K can be either
    • a matrix for constant parameters in all events, or
    • an array of matrices matrix K[nt] so that the \(i\)th entry of the array describes the model parameters for time interval \((t_{i-1}, t_i)\), and the number of the rows equals to the number of event time nt.
  • See Tables in Section Events specification for the rest of arguments.

4 Return value

An n-by-nt matrix, where nt is the number of time steps and n is the number of rows(columns) of square matrix K.

Last updated on 30 Jun 2021
Published on 25 Jun 2021
 Edit on GitHub