aboutsummaryrefslogtreecommitdiff
path: root/vignettes/twa.Rmd
blob: 92a0cd4bac3b33d19c30f6606d04fe1556b37621 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: Calculation of time weighted average concentrations with mkin
author: Johannes Ranke
date: "`r Sys.Date()`"
bibliography: references.bib
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Calculation of time weighted average concentrations with mkin}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

Since version 0.9.45.1 of the 'mkin' package, a function for calculating
time weighted average concentrations for decline kinetics (*i.e.* only
for the compound applied in the experiment) is included. Strictly
speaking, they are maximum moving window time weighted average concentrations,
*i.e.* the maximum time weighted average concentration that can be found
when moving a time window of a specified width over the decline curve.

Time weighted average concentrations for the SFO, FOMC and the DFOP model are
calculated using the formulas given in the FOCUS kinetics guidance
[@FOCUSkinetics2014, p. 251]:

SFO:

$$c_\textrm{twa} = c_0 \frac{\left( 1 - e^{- k t} \right)}{ k t} $$

FOMC:

$$c_\textrm{twa} = c_0 \frac{\beta}{t (1 - \alpha)}
                   \left( \left(\frac{t}{\beta} + 1 \right)^{1 - \alpha} - 1 \right) $$

DFOP:

$$c_\textrm{twa} = \frac{c_0}{t} \left(
  \frac{g}{k_1} \left( 1 - e^{- k_1 t} \right) +
  \frac{1-g}{k_2} \left( 1 - e^{- k_2 t} \right)  \right) $$

HS for $t > t_b$:

$$c_\textrm{twa} = \frac{c_0}{t} \left(
  \frac{1}{k_1} \left( 1 - e^{- k_1 t_b} \right) +
  \frac{e^{- k_1 t_b}}{k_2} \left( 1 - e^{- k_2 (t - t_b)} \right)  \right) $$

Often, the ratio between the time weighted average concentration $c_\textrm{twa}$
and the initial concentration $c_0$

$$f_\textrm{twa} = \frac{c_\textrm{twa}}{c_0}$$

is needed. This can be calculated from the fitted initial concentration $c_0$ and
the time weighted average concentration $c_\textrm{twa}$, or directly from
the model parameters using the following formulas:

SFO:

$$f_\textrm{twa} = \frac{\left( 1 - e^{- k t} \right)}{k t} $$

FOMC:

$$f_\textrm{twa} = \frac{\beta}{t (1 - \alpha)}
                   \left( \left(\frac{t}{\beta} + 1 \right)^{1 - \alpha} - 1 \right) $$

DFOP:

$$f_\textrm{twa} = \frac{1}{t} \left(
  \frac{g}{k_1} \left( 1 - e^{- k_1 t} \right) +
  \frac{1-g}{k_2} \left( 1 - e^{- k_2 t} \right)  \right) $$

HS for $t > t_b$:

$$f_\textrm{twa} = \frac{1}{t} \left(
  \frac{1}{k_1} \left( 1 - e^{- k_1 t_b} \right) +
  \frac{e^{- k_1 t_b}}{k_2} \left( 1 - e^{- k_2 (t - t_b)} \right)  \right) $$

Note that a method for calculating maximum moving window time weighted average
concentrations for any model fitted by 'mkinfit', and also for metabolites in
such models, is integrated in the 'mkin' package, see the
[documentation](https://pkgdown.jrwb.de/pfm/reference/max_twa_parent.html) at my website.

Contact - Imprint