aboutsummaryrefslogtreecommitdiff
path: root/vignettes/twa.rmd
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-13 16:20:23 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-13 16:20:23 +0200
commit218a9c55bd80fb708b15fa7196422f759bfe4b27 (patch)
treead4b2aa4b561b3118d1ca8ee5e6b34fbd2dfcfe8 /vignettes/twa.rmd
parent36bc31c52cbe4b686f5562e21ee110380481dff8 (diff)
Further formatting improvement of benchmark vignette
Also, use .rmd extension instead of .Rmd for vignettes.
Diffstat (limited to 'vignettes/twa.rmd')
-rw-r--r--vignettes/twa.rmd79
1 files changed, 79 insertions, 0 deletions
diff --git a/vignettes/twa.rmd b/vignettes/twa.rmd
new file mode 100644
index 00000000..6f283eb2
--- /dev/null
+++ b/vignettes/twa.rmd
@@ -0,0 +1,79 @@
+---
+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 a model fitted by 'mkinfit' or from parent decline model
+parameters is included in the `max_twa_parent()` function. If the same is
+needed for metabolites, the function `pfm::max_twa()` from the 'pfm' package
+can be used.

Contact - Imprint