From a1567638a3ba9f4d62fa199525097a94ddfd7912 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 21 Jul 2014 08:20:44 +0200 Subject: Bugfix, model shorthand, state.ini[[1]] from observed data - The bug occurred when using transform_rates=FALSE for FOMC, DFOP or HS - Make it possible to use mkinfit("SFO", ...) - Take initial mean value at time zero for the variable with the highest value in the observed data - Update of vignette/FOCUS_L - Improve the Makefile to build single vignettes --- DESCRIPTION | 2 +- GNUmakefile | 15 ++- NEWS.md | 6 + R/mkinfit.R | 27 +++- R/transform_odeparms.R | 22 +++- README.md | 5 + man/mkinfit.Rd | 22 +++- man/transform_odeparms.Rd | 2 +- vignettes/FOCUS_L.Rmd | 81 ++++++------ vignettes/FOCUS_L.html | 328 +++++++++++++++++++++++----------------------- vignettes/mkin.pdf | Bin 160326 -> 160326 bytes 11 files changed, 279 insertions(+), 231 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index fb32b807..bad72501 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Type: Package Title: Routines for fitting kinetic models with one or more state variables to chemical degradation data Version: 0.9-32 -Date: 2014-07-17 +Date: 2014-07-21 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de"), person("Katrin", "Lindenberger", role = "ctb"), diff --git a/GNUmakefile b/GNUmakefile index b8cc5d82..aebc20dd 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -70,10 +70,17 @@ test: install-no-vignettes cd tests;\ "$(RBIN)/Rscript" doRUnit.R -.PHONY: vignettes -vignettes: - "$(RBIN)/Rscript" -e "tools::buildVignettes(dir = '.')" - +vignettes/mkin.pdf: vignettes/mkin.Rnw + "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/mkin.Rnw', dir = 'vignettes')" + +vignettes/FOCUS_L.html: vignettes/FOCUS_L.Rmd + "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/FOCUS_L.Rmd', dir = 'vignettes')" + +vignettes/FOCUS_Z.pdf: vignettes/FOCUS_Z.Rnw + "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/FOCUS_Z.Rnw', dir = 'vignettes')" + +vignettes: vignettes/mkin.pdf vignettes/FOCUS_L.html vignettes/FOCUS_Z.pdf + sd: "$(RBIN)/Rscript" -e "library(staticdocs); build_site()" diff --git a/NEWS.md b/NEWS.md index 031ae954..c10a25b0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,10 @@ ## NEW FEATURES +- The default for the initial value for the first state value is now taken from the mean of the observations at time zero, if available. + +- The kinetic model can alternatively be specified with a shorthand name for parent only degradation models, e.g. `SFO`, or `DFOP`. + - Optimisation method, number of model evaluations and time elapsed during optimisation are given in the summary of mkinfit objects. - The maximum number of iterations in the optimisation algorithm can be specified using the argument `maxit.modFit` to the mkinfit function. @@ -10,6 +14,8 @@ ## BUG FIXES +- `transform_rates=FALSE` in `mkinfit` now also works for FOMC and HS models. + - Initial values for formation fractions were not set in all cases. - No warning was given when the fit did not converge when a method other than the default Levenberg-Marquardt method `Marq` was used. diff --git a/R/mkinfit.R b/R/mkinfit.R index a8fbfc78..39d084cb 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -23,7 +23,7 @@ if(getRversion() >= '2.15.1') utils::globalVariables(c("name", "value")) mkinfit <- function(mkinmod, observed, parms.ini = "auto", - state.ini = c(100, rep(0, length(mkinmod$diffs) - 1)), + state.ini = "auto", fixed_parms = NULL, fixed_initials = names(mkinmod$diffs)[-1], solution_type = "auto", @@ -41,6 +41,21 @@ mkinfit <- function(mkinmod, observed, trace_parms = FALSE, ...) { + # Check mkinmod and generate a model for the variable whithe the highest value + # if a suitable string is given + parent_models_available = c("SFO", "FOMC", "DFOP", "HS", "SFORB") + presumed_parent_name = observed[which.max(observed$value), "name"] + if (class(mkinmod) != "mkinmod") { + if (mkinmod[[1]] %in% parent_models_available) { + speclist <- list(list(type = mkinmod, sink = TRUE)) + names(speclist) <- presumed_parent_name + mkinmod <- mkinmod(speclist = speclist) + } else { + stop("Argument mkinmod must be of class mkinmod or a string containing one of\n ", + paste(parent_models_available, collapse = ", ")) + } + } + # Check optimisation method and set maximum number of iterations if specified method.modFit = match.arg(method.modFit) if (maxit.modFit != "auto") { @@ -55,7 +70,7 @@ mkinfit <- function(mkinmod, observed, mod_vars <- names(mkinmod$diffs) # Get the names of observed variables - obs_vars = names(mkinmod$spec) + obs_vars <- names(mkinmod$spec) # Subset observed data with names of observed data in the model observed <- subset(observed, name %in% obs_vars) @@ -137,6 +152,12 @@ mkinfit <- function(mkinmod, observed, } } + # Set default for state.ini if appropriate + if (state.ini[1] == "auto") { + state.ini = c(mean(subset(observed, time == 0 & name == presumed_parent_name)$value), + rep(0, length(mkinmod$diffs) - 1)) + } + # Name the inital state variable values if they are not named yet if(is.null(names(state.ini))) names(state.ini) <- mod_vars @@ -279,7 +300,7 @@ mkinfit <- function(mkinmod, observed, if (!transform_rates) { index_k <- grep("^k_", names(lower)) lower[index_k] <- 0 - other_rate_parms <- intersect(c("alpha", "beta", "k1", "k2"), names(lower)) + other_rate_parms <- intersect(c("alpha", "beta", "k1", "k2", "tb"), names(lower)) lower[other_rate_parms] <- 0 } diff --git a/R/transform_odeparms.R b/R/transform_odeparms.R index 912a5c0a..f518ae32 100644 --- a/R/transform_odeparms.R +++ b/R/transform_odeparms.R @@ -69,7 +69,11 @@ transform_odeparms <- function(parms, mkinmod, # and HS parameter tb if transformation of rates is requested for (pname in c("alpha", "beta", "k1", "k2", "tb")) { if (!is.na(parms[pname])) { - transparms[paste0("log_", pname)] <- ifelse(transform_rates, log(parms[pname]), parms[pname]) + if (transform_rates) { + transparms[paste0("log_", pname)] <- log(parms[pname]) + } else { + transparms[pname] <- parms[pname] + } } } if (!is.na(parms["g"])) { @@ -130,12 +134,16 @@ backtransform_odeparms <- function(transparms, mkinmod, # Transform parameters also for FOMC, DFOP and HS models for (pname in c("alpha", "beta", "k1", "k2", "tb")) { - pname_trans = paste0("log_", pname) - if (!is.na(transparms[pname_trans])) { - parms[pname] <- ifelse(transform_rates, - exp(transparms[pname_trans]), - transparms[pname]) - } + if (transform_rates) { + pname_trans = paste0("log_", pname) + if (!is.na(transparms[pname_trans])) { + parms[pname] <- exp(transparms[pname_trans]) + } + } else { + if (!is.na(transparms[pname])) { + parms[pname] <- transparms[pname] + } + } } if (!is.na(transparms["g_ilr"])) { g_ilr <- transparms["g_ilr"] diff --git a/README.md b/README.md index e171180f..48c667bf 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,11 @@ A very simple usage example would be plot(SFO.fit, show_residuals = TRUE) summary(SFO.fit) +If you have parent only degradation data, you can use a shorthand notation +like `SFO` or `FOMC` for the model without the need to use `mkinmod` + + FOMC.fit <- mkinfit("FOMC", example_data) + A fairly complex usage example using a built-in dataset: data <- mkin_wide_to_long(schaefer07_complex_case, time = "time") diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd index c99e146c..581d63f4 100644 --- a/man/mkinfit.Rd +++ b/man/mkinfit.Rd @@ -17,7 +17,7 @@ \usage{ mkinfit(mkinmod, observed, parms.ini = "auto", - state.ini = c(100, rep(0, length(mkinmod$diffs) - 1)), + state.ini = "auto", fixed_parms = NULL, fixed_initials = names(mkinmod$diffs)[-1], solution_type = "auto", method.ode = "lsoda", @@ -35,7 +35,11 @@ mkinfit(mkinmod, observed, } \arguments{ \item{mkinmod}{ - A list of class \code{\link{mkinmod}}, containing the kinetic model to be fitted to the data. + A list of class \code{\link{mkinmod}}, containing the kinetic model to be + fitted to the data, or one of the shorthand names ("SFO", "FOMC", "DFOP", + "HS", "SFORB"). If a shorthand name is given, a parent only degradation + model is generated for the observation with the highest value in + \code{observed}. } \item{observed}{ The observed data. It has to be in the long format as described in @@ -65,7 +69,8 @@ mkinfit(mkinmod, observed, case the observed variables are represented by more than one model variable, the names will differ from the names of the observed variables (see \code{map} component of \code{\link{mkinmod}}). The default is to set - the initial value of the first model variable to 100 and all others to 0. + the initial value of the first model variable to the mean of the time zero + values for the variable with the maximum observed value, and all others to 0. } \item{fixed_parms}{ The names of parameters that should not be optimised but rather kept at the @@ -124,8 +129,9 @@ mkinfit(mkinmod, observed, model specification used in the fitting for better compliance with the assumption of normal distribution of the estimator. If TRUE, also alpha and beta parameters of the FOMC model are log-transformed, as well - as k1 and k2 rate constants for the DFOP and HS models. - If TRUE, zero is used as a lower bound for the rates in the optimisation. + as k1 and k2 rate constants for the DFOP and HS models and the break point + tb of the HS model. + If FALSE, zero is used as a lower bound for the rates in the optimisation. } \item{transform_fractions}{ Boolean specifying if formation fractions constants should be transformed in the @@ -204,9 +210,13 @@ mkinfit(mkinmod, observed, other GUI derivative of mkin, sponsored by Syngenta. } \author{ - Johannes Ranke + Johannes Ranke } \examples{ +# Use shorthand notation for parent only degradation +fit <- mkinfit("FOMC", FOCUS_2006_C) +summary(fit) + # One parent compound, one metabolite, both single first order. SFO_SFO <- mkinmod( parent = list(type = "SFO", to = "m1", sink = TRUE), diff --git a/man/transform_odeparms.Rd b/man/transform_odeparms.Rd index ea0b5024..ba93af7d 100644 --- a/man/transform_odeparms.Rd +++ b/man/transform_odeparms.Rd @@ -41,7 +41,7 @@ backtransform_odeparms(transparms, mkinmod, assumption of normal distribution of the estimator. If TRUE, also alpha and beta parameters of the FOMC model are log-transformed, as well as k1 and k2 rate constants for the DFOP and HS models and the break point tb - of the HS model + of the HS model. } \item{transform_fractions}{ Boolean specifying if formation fractions constants should be transformed in the diff --git a/vignettes/FOCUS_L.Rmd b/vignettes/FOCUS_L.Rmd index 04d5f831..cd7711f6 100644 --- a/vignettes/FOCUS_L.Rmd +++ b/vignettes/FOCUS_L.Rmd @@ -13,7 +13,7 @@ opts_chunk$set(tidy = FALSE, cache = TRUE) ## Laboratory Data L1 The following code defines example dataset L1 from the FOCUS kinetics -report, p. 284 +report, p. 284: ```{r} library("mkin") @@ -25,27 +25,18 @@ FOCUS_2006_L1 = data.frame( FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1) ``` -The next step is to set up the models used for the kinetic analysis. Note that -the model definitions contain the names of the observed variables in the data. -In this case, there is only one variable called `parent`. +Here we use the assumptions of simple first order (SFO), the case of declining +rate constant over time (FOMC) and the case of two different phases of the +kinetics (DFOP). For a more detailed discussion of the models, please see the +FOCUS kinetics report. -```{r} -SFO <- mkinmod(parent = list(type = "SFO")) -FOMC <- mkinmod(parent = list(type = "FOMC")) -DFOP <- mkinmod(parent = list(type = "DFOP")) -``` - -The three models cover the first assumption of simple first order (SFO), -the case of declining rate constant over time (FOMC) and the case of two -different phases of the kinetics (DFOP). For a more detailed discussion -of the models, please see the FOCUS kinetics report. - -The following two lines fit the model and produce the summary report -of the model fit. This covers the numerical analysis given in the -FOCUS report. +Since mkin version 0.9-32 (July 2014), we can use shorthand notation like `SFO` +for parent only degradation models. The following two lines fit the model and +produce the summary report of the model fit. This covers the numerical analysis +given in the FOCUS report. ```{r} -m.L1.SFO <- mkinfit(SFO, FOCUS_2006_L1_mkin, quiet=TRUE) +m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet=TRUE) summary(m.L1.SFO) ``` @@ -64,32 +55,30 @@ For comparison, the FOMC model is fitted as well, and the chi^2 error level is checked. ```{r} -m.L1.FOMC <- mkinfit(FOMC, FOCUS_2006_L1_mkin, quiet=TRUE) +m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE) summary(m.L1.FOMC, data = FALSE) ``` Due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the chi^2 error level is actually higher for the FOMC -model (3.6%) than for the SFO model (3.4%). Additionally, the covariance -matrix can not be obtained, indicating overparameterisation of the model. -As a consequence, no standard errors for transformed parameters nor -confidence intervals for backtransformed parameters are available. +model (3.6%) than for the SFO model (3.4%). Additionally, the parameters +`log_alpha` and `log_beta` internally fitted in the model have p-values for the two +sided t-test of 0.18 and 0.125, and their correlation is 1.000, indicating that +the model is overparameterised. The chi^2 error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same chi^2 error levels -as the kinfit package. - -Furthermore, the calculation routines of the kinfit package have been extensively -compared to the results obtained by the KinGUI software, as documented in the -kinfit package vignette. KinGUI is a widely used standard package in this field. -Therefore, the reason for the difference was not investigated further. +as the kinfit package. Furthermore, the calculation routines of the kinfit +package have been extensively compared to the results obtained by the KinGUI +software, as documented in the kinfit package vignette. KinGUI is a widely used +standard package in this field. ## Laboratory Data L2 The following code defines example dataset L2 from the FOCUS kinetics -report, p. 287 +report, p. 287: ```{r} FOCUS_2006_L2 = data.frame( @@ -100,10 +89,10 @@ FOCUS_2006_L2 = data.frame( FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2) ``` -Again, the SFO model is fitted and a summary is obtained. +Again, the SFO model is fitted and a summary is obtained: ```{r} -m.L2.SFO <- mkinfit(SFO, FOCUS_2006_L2_mkin, quiet=TRUE) +m.L2.SFO <- mkinfit("SFO", FOCUS_2006_L2_mkin, quiet=TRUE) summary(m.L2.SFO) ``` @@ -130,7 +119,7 @@ For comparison, the FOMC model is fitted as well, and the chi^2 error level is checked. ```{r fig.height = 8} -m.L2.FOMC <- mkinfit(FOMC, FOCUS_2006_L2_mkin, quiet = TRUE) +m.L2.FOMC <- mkinfit("FOMC", FOCUS_2006_L2_mkin, quiet = TRUE) par(mfrow = c(2, 1)) plot(m.L2.FOMC) mkinresplot(m.L2.FOMC) @@ -144,7 +133,7 @@ experimental error has to be assumed in order to explain the data. Fitting the four parameter DFOP model further reduces the chi^2 error level. ```{r fig.height = 5} -m.L2.DFOP <- mkinfit(DFOP, FOCUS_2006_L2_mkin, quiet = TRUE) +m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, quiet = TRUE) plot(m.L2.DFOP) ``` @@ -153,7 +142,7 @@ to a reasonable solution. Therefore the fit is repeated with different starting parameters. ```{r fig.height = 5} -m.L2.DFOP <- mkinfit(DFOP, FOCUS_2006_L2_mkin, +m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, parms.ini = c(k1 = 1, k2 = 0.01, g = 0.8), quiet=TRUE) plot(m.L2.DFOP) @@ -180,7 +169,7 @@ FOCUS_2006_L3_mkin <- mkin_wide_to_long(FOCUS_2006_L3) SFO model, summary and plot: ```{r fig.height = 5} -m.L3.SFO <- mkinfit(SFO, FOCUS_2006_L3_mkin, quiet = TRUE) +m.L3.SFO <- mkinfit("SFO", FOCUS_2006_L3_mkin, quiet = TRUE) plot(m.L3.SFO) summary(m.L3.SFO) ``` @@ -191,7 +180,7 @@ does not fit very well. The FOMC model performs better: ```{r fig.height = 5} -m.L3.FOMC <- mkinfit(FOMC, FOCUS_2006_L3_mkin, quiet = TRUE) +m.L3.FOMC <- mkinfit("FOMC", FOCUS_2006_L3_mkin, quiet = TRUE) plot(m.L3.FOMC) summary(m.L3.FOMC, data = FALSE) ``` @@ -202,7 +191,7 @@ Fitting the four parameter DFOP model further reduces the chi^2 error level considerably: ```{r fig.height = 5} -m.L3.DFOP <- mkinfit(DFOP, FOCUS_2006_L3_mkin, quiet = TRUE) +m.L3.DFOP <- mkinfit("DFOP", FOCUS_2006_L3_mkin, quiet = TRUE) plot(m.L3.DFOP) summary(m.L3.DFOP, data = FALSE) ``` @@ -212,10 +201,15 @@ and the correlation matrix suggest that the parameter estimates are reliable, an the DFOP model can be used as the best-fit model based on the chi^2 error level criterion for laboratory data L3. +This is also an example where the standard t-test for the parameter `g_ilr` is +misleading, as it tests for a significant difference from zero. In this case, +zero appears to be the correct value for this parameter, and the confidence +interval for the backtransformed parameter `g` is quite narrow. + ## Laboratory Data L4 The following code defines example dataset L4 from the FOCUS kinetics -report, p. 293 +report, p. 293: ```{r} FOCUS_2006_L4 = data.frame( @@ -227,7 +221,7 @@ FOCUS_2006_L4_mkin <- mkin_wide_to_long(FOCUS_2006_L4) SFO model, summary and plot: ```{r fig.height = 5} -m.L4.SFO <- mkinfit(SFO, FOCUS_2006_L4_mkin, quiet = TRUE) +m.L4.SFO <- mkinfit("SFO", FOCUS_2006_L4_mkin, quiet = TRUE) plot(m.L4.SFO) summary(m.L4.SFO, data = FALSE) ``` @@ -235,14 +229,13 @@ summary(m.L4.SFO, data = FALSE) The chi^2 error level of 3.3% as well as the plot suggest that the model fits very well. -The FOMC model for comparison +The FOMC model for comparison: ```{r fig.height = 5} -m.L4.FOMC <- mkinfit(FOMC, FOCUS_2006_L4_mkin, quiet = TRUE) +m.L4.FOMC <- mkinfit("FOMC", FOCUS_2006_L4_mkin, quiet = TRUE) plot(m.L4.FOMC) summary(m.L4.FOMC, data = FALSE) ``` The error level at which the chi^2 test passes is slightly lower for the FOMC model. However, the difference appears negligible. - diff --git a/vignettes/FOCUS_L.html b/vignettes/FOCUS_L.html index 85fadbfe..614fcf32 100644 --- a/vignettes/FOCUS_L.html +++ b/vignettes/FOCUS_L.html @@ -190,7 +190,7 @@ hr {

Laboratory Data L1

The following code defines example dataset L1 from the FOCUS kinetics -report, p. 284

+report, p. 284:

library("mkin")
 
@@ -207,51 +207,43 @@ report, p. 284

FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1) -

The next step is to set up the models used for the kinetic analysis. Note that -the model definitions contain the names of the observed variables in the data. -In this case, there is only one variable called parent.

+

Here we use the assumptions of simple first order (SFO), the case of declining +rate constant over time (FOMC) and the case of two different phases of the +kinetics (DFOP). For a more detailed discussion of the models, please see the +FOCUS kinetics report.

-
SFO <- mkinmod(parent = list(type = "SFO"))
-FOMC <- mkinmod(parent = list(type = "FOMC"))
-DFOP <- mkinmod(parent = list(type = "DFOP"))
-
- -

The three models cover the first assumption of simple first order (SFO), -the case of declining rate constant over time (FOMC) and the case of two -different phases of the kinetics (DFOP). For a more detailed discussion -of the models, please see the FOCUS kinetics report.

+

Since mkin version 0.9-32 (July 2014), we can use shorthand notation like SFO +for parent only degradation models. The following two lines fit the model and +produce the summary report of the model fit. This covers the numerical analysis +given in the FOCUS report.

-

The following two lines fit the model and produce the summary report -of the model fit. This covers the numerical analysis given in the -FOCUS report.

- -
m.L1.SFO <- mkinfit(SFO, FOCUS_2006_L1_mkin, quiet=TRUE)
+
m.L1.SFO <- mkinfit("SFO", FOCUS_2006_L1_mkin, quiet=TRUE)
 summary(m.L1.SFO)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:41 2014 
-## Date of summary: Thu Jul 17 12:37:41 2014 
+## Date of fit:     Mon Jul 21 09:14:29 2014 
+## Date of summary: Mon Jul 21 09:14:29 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 14 model solutions performed in 0.087 s
+## Fitted with method Marq using 14 model solutions performed in 0.081 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##               value   type
-## parent_0      100.0  state
-## k_parent_sink   0.1 deparm
+## parent_0      89.85  state
+## k_parent_sink  0.10 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##                     value lower upper
-## parent_0          100.000  -Inf   Inf
-## log_k_parent_sink  -2.303  -Inf   Inf
+##                    value lower upper
+## parent_0          89.850  -Inf   Inf
+## log_k_parent_sink -2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -259,7 +251,7 @@ summary(m.L1.SFO)
 ## Optimised, transformed parameters:
 ##                   Estimate Std. Error Lower Upper t value Pr(>|t|)
 ## parent_0             92.50     1.3700 89.60 95.40    67.6 4.34e-21
-## log_k_parent_sink    -2.35     0.0406 -2.43 -2.26   -57.9 5.15e-20
+## log_k_parent_sink    -2.35     0.0406 -2.43 -2.26   -57.9 5.16e-20
 ##                     Pr(>t)
 ## parent_0          2.17e-21
 ## log_k_parent_sink 2.58e-20
@@ -316,67 +308,70 @@ summary(m.L1.SFO)
 
plot(m.L1.SFO)
 
-

plot of chunk unnamed-chunk-5

+

plot of chunk unnamed-chunk-4

The residual plot can be easily obtained by

mkinresplot(m.L1.SFO, ylab = "Observed", xlab = "Time")
 
-

plot of chunk unnamed-chunk-6

+

plot of chunk unnamed-chunk-5

For comparison, the FOMC model is fitted as well, and the chi2 error level is checked.

-
m.L1.FOMC <- mkinfit(FOMC, FOCUS_2006_L1_mkin, quiet=TRUE)
+
m.L1.FOMC <- mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet=TRUE)
 summary(m.L1.FOMC, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:42 2014 
-## Date of summary: Thu Jul 17 12:37:42 2014 
+## Date of fit:     Mon Jul 21 09:14:30 2014 
+## Date of summary: Mon Jul 21 09:14:30 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 45 model solutions performed in 0.266 s
+## Fitted with method Marq using 53 model solutions performed in 0.32 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##          value   type
-## parent_0   100  state
-## alpha        1 deparm
-## beta        10 deparm
+## parent_0 89.85  state
+## alpha     1.00 deparm
+## beta     10.00 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##             value lower upper
-## parent_0  100.000  -Inf   Inf
-## log_alpha   0.000  -Inf   Inf
-## log_beta    2.303  -Inf   Inf
+##            value lower upper
+## parent_0  89.850  -Inf   Inf
+## log_alpha  0.000  -Inf   Inf
+## log_beta   2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
 ## 
 ## Optimised, transformed parameters:
-##           Estimate Std. Error Lower Upper t value Pr(>|t|) Pr(>t)
-## parent_0      92.5         NA    NA    NA      NA       NA     NA
-## log_alpha     25.6         NA    NA    NA      NA       NA     NA
-## log_beta      28.0         NA    NA    NA      NA       NA     NA
+##           Estimate Std. Error Lower Upper t value Pr(>|t|)   Pr(>t)
+## parent_0      92.5       1.45 89.40  95.6   63.60 1.17e-19 5.85e-20
+## log_alpha     14.9      10.60 -7.75  37.5    1.40 1.82e-01 9.08e-02
+## log_beta      17.2      10.60 -5.38  39.8    1.62 1.25e-01 6.26e-02
 ## 
 ## Parameter correlation:
-## Could not estimate covariance matrix; singular system:
+##           parent_0 log_alpha log_beta
+## parent_0     1.000      0.24    0.238
+## log_alpha    0.240      1.00    1.000
+## log_beta     0.238      1.00    1.000
 ## 
 ## Residual standard error: 3.05 on 15 degrees of freedom
 ## 
 ## Backtransformed parameters:
-##          Estimate Lower Upper
-## parent_0 9.25e+01    NA    NA
-## alpha    1.35e+11    NA    NA
-## beta     1.41e+12    NA    NA
+##          Estimate    Lower    Upper
+## parent_0 9.25e+01 8.94e+01 9.56e+01
+## alpha    2.85e+06 4.32e-04 1.88e+16
+## beta     2.98e+07 4.59e-03 1.93e+17
 ## 
 ## Chi2 error levels in percent:
 ##          err.min n.optim df
@@ -390,26 +385,24 @@ summary(m.L1.FOMC, data = FALSE)
 
 

Due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the chi2 error level is actually higher for the FOMC -model (3.6%) than for the SFO model (3.4%). Additionally, the covariance -matrix can not be obtained, indicating overparameterisation of the model. -As a consequence, no standard errors for transformed parameters nor -confidence intervals for backtransformed parameters are available.

+model (3.6%) than for the SFO model (3.4%). Additionally, the parameters +log_alpha and log_beta internally fitted in the model have p-values for the two +sided t-test of 0.18 and 0.125, and their correlation is 1.000, indicating that +the model is overparameterised.

The chi2 error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same chi2 error levels -as the kinfit package.

- -

Furthermore, the calculation routines of the kinfit package have been extensively -compared to the results obtained by the KinGUI software, as documented in the -kinfit package vignette. KinGUI is a widely used standard package in this field. -Therefore, the reason for the difference was not investigated further.

+as the kinfit package. Furthermore, the calculation routines of the kinfit +package have been extensively compared to the results obtained by the KinGUI +software, as documented in the kinfit package vignette. KinGUI is a widely used +standard package in this field.

Laboratory Data L2

The following code defines example dataset L2 from the FOCUS kinetics -report, p. 287

+report, p. 287:

FOCUS_2006_L2 = data.frame(
   t = rep(c(0, 1, 3, 7, 14, 28), each = 2),
@@ -419,35 +412,35 @@ report, p. 287

FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2)
-

Again, the SFO model is fitted and a summary is obtained.

+

Again, the SFO model is fitted and a summary is obtained:

-
m.L2.SFO <- mkinfit(SFO, FOCUS_2006_L2_mkin, quiet=TRUE)
+
m.L2.SFO <- mkinfit("SFO", FOCUS_2006_L2_mkin, quiet=TRUE)
 summary(m.L2.SFO)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:42 2014 
-## Date of summary: Thu Jul 17 12:37:42 2014 
+## Date of fit:     Mon Jul 21 09:14:30 2014 
+## Date of summary: Mon Jul 21 09:14:30 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 32 model solutions performed in 0.357 s
+## Fitted with method Marq using 29 model solutions performed in 0.155 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##               value   type
-## parent_0      100.0  state
-## k_parent_sink   0.1 deparm
+## parent_0      93.95  state
+## k_parent_sink  0.10 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##                     value lower upper
-## parent_0          100.000  -Inf   Inf
-## log_k_parent_sink  -2.303  -Inf   Inf
+##                    value lower upper
+## parent_0          93.950  -Inf   Inf
+## log_k_parent_sink -2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -487,8 +480,8 @@ summary(m.L2.SFO)
 ## 
 ## Data:
 ##  time variable observed predicted residual
-##     0   parent     96.1  9.15e+01    4.634
-##     0   parent     91.8  9.15e+01    0.334
+##     0   parent     96.1  9.15e+01    4.635
+##     0   parent     91.8  9.15e+01    0.335
 ##     1   parent     41.4  4.71e+01   -5.740
 ##     1   parent     38.7  4.71e+01   -8.440
 ##     3   parent     19.3  1.25e+01    6.779
@@ -509,7 +502,7 @@ plot(m.L2.SFO)
 mkinresplot(m.L2.SFO)
 
-

plot of chunk unnamed-chunk-10

+

plot of chunk unnamed-chunk-9

In the FOCUS kinetics report, it is stated that there is no apparent systematic error observed from the residual plot up to the measured DT90 (approximately at @@ -524,42 +517,42 @@ models generally only implement SFO kinetics.

For comparison, the FOMC model is fitted as well, and the chi2 error level is checked.

-
m.L2.FOMC <- mkinfit(FOMC, FOCUS_2006_L2_mkin, quiet = TRUE)
+
m.L2.FOMC <- mkinfit("FOMC", FOCUS_2006_L2_mkin, quiet = TRUE)
 par(mfrow = c(2, 1))
 plot(m.L2.FOMC)
 mkinresplot(m.L2.FOMC)
 
-

plot of chunk unnamed-chunk-11

+

plot of chunk unnamed-chunk-10

summary(m.L2.FOMC, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:43 2014 
-## Date of summary: Thu Jul 17 12:37:43 2014 
+## Date of fit:     Mon Jul 21 09:14:31 2014 
+## Date of summary: Mon Jul 21 09:14:31 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 39 model solutions performed in 0.235 s
+## Fitted with method Marq using 35 model solutions performed in 0.199 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##          value   type
-## parent_0   100  state
-## alpha        1 deparm
-## beta        10 deparm
+## parent_0 93.95  state
+## alpha     1.00 deparm
+## beta     10.00 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##             value lower upper
-## parent_0  100.000  -Inf   Inf
-## log_alpha   0.000  -Inf   Inf
-## log_beta    2.303  -Inf   Inf
+##            value lower upper
+## parent_0  93.950  -Inf   Inf
+## log_alpha  0.000  -Inf   Inf
+## log_beta   2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -600,62 +593,62 @@ experimental error has to be assumed in order to explain the data.

Fitting the four parameter DFOP model further reduces the chi2 error level.

-
m.L2.DFOP <- mkinfit(DFOP, FOCUS_2006_L2_mkin, quiet = TRUE)
+
m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, quiet = TRUE)
 plot(m.L2.DFOP)
 
-

plot of chunk unnamed-chunk-12

+

plot of chunk unnamed-chunk-11

Here, the default starting parameters for the DFOP model obviously do not lead to a reasonable solution. Therefore the fit is repeated with different starting parameters.

-
m.L2.DFOP <- mkinfit(DFOP, FOCUS_2006_L2_mkin, 
+
m.L2.DFOP <- mkinfit("DFOP", FOCUS_2006_L2_mkin, 
   parms.ini = c(k1 = 1, k2 = 0.01, g = 0.8),
   quiet=TRUE)
 plot(m.L2.DFOP)
 
-

plot of chunk unnamed-chunk-13

+

plot of chunk unnamed-chunk-12

summary(m.L2.DFOP, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:44 2014 
-## Date of summary: Thu Jul 17 12:37:44 2014 
+## Date of fit:     Mon Jul 21 09:14:31 2014 
+## Date of summary: Mon Jul 21 09:14:31 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 54 model solutions performed in 0.423 s
+## Fitted with method Marq using 43 model solutions performed in 0.241 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##          value   type
-## parent_0 1e+02  state
-## k1       1e+00 deparm
-## k2       1e-02 deparm
-## g        8e-01 deparm
+## parent_0 93.95  state
+## k1        1.00 deparm
+## k2        0.01 deparm
+## g         0.80 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##             value lower upper
-## parent_0 100.0000  -Inf   Inf
-## log_k1     0.0000  -Inf   Inf
-## log_k2    -4.6052  -Inf   Inf
-## g_ilr      0.9803  -Inf   Inf
+##            value lower upper
+## parent_0 93.9500  -Inf   Inf
+## log_k1    0.0000  -Inf   Inf
+## log_k2   -4.6052  -Inf   Inf
+## g_ilr     0.9803  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
 ## 
 ## Optimised, transformed parameters:
 ##          Estimate Std. Error Lower Upper t value Pr(>|t|) Pr(>t)
-## parent_0   93.900         NA    NA    NA      NA       NA     NA
-## log_k1      4.960         NA    NA    NA      NA       NA     NA
+## parent_0   94.000         NA    NA    NA      NA       NA     NA
+## log_k1      6.160         NA    NA    NA      NA       NA     NA
 ## log_k2     -1.090         NA    NA    NA      NA       NA     NA
 ## g_ilr      -0.282         NA    NA    NA      NA       NA     NA
 ## 
@@ -666,8 +659,8 @@ plot(m.L2.DFOP)
 ## 
 ## Backtransformed parameters:
 ##          Estimate Lower Upper
-## parent_0   93.900    NA    NA
-## k1        142.000    NA    NA
+## parent_0   94.000    NA    NA
+## k1        476.000    NA    NA
 ## k2          0.337    NA    NA
 ## g           0.402    NA    NA
 ## 
@@ -678,7 +671,7 @@ plot(m.L2.DFOP)
 ## 
 ## Estimated disappearance times:
 ##        DT50 DT90 DT50_k1 DT50_k2
-## parent   NA   NA 0.00487    2.06
+## parent   NA   NA 0.00146    2.06
 

Here, the DFOP model is clearly the best-fit model for dataset L2 based on the @@ -699,38 +692,38 @@ FOCUS_2006_L3_mkin <- mkin_wide_to_long(FOCUS_2006_L3)

SFO model, summary and plot:

-
m.L3.SFO <- mkinfit(SFO, FOCUS_2006_L3_mkin, quiet = TRUE)
+
m.L3.SFO <- mkinfit("SFO", FOCUS_2006_L3_mkin, quiet = TRUE)
 plot(m.L3.SFO)
 
-

plot of chunk unnamed-chunk-15

+

plot of chunk unnamed-chunk-14

summary(m.L3.SFO)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:45 2014 
-## Date of summary: Thu Jul 17 12:37:45 2014 
+## Date of fit:     Mon Jul 21 09:14:32 2014 
+## Date of summary: Mon Jul 21 09:14:32 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 44 model solutions performed in 0.241 s
+## Fitted with method Marq using 44 model solutions performed in 0.242 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##               value   type
-## parent_0      100.0  state
+## parent_0       97.8  state
 ## k_parent_sink   0.1 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##                     value lower upper
-## parent_0          100.000  -Inf   Inf
-## log_k_parent_sink  -2.303  -Inf   Inf
+##                    value lower upper
+## parent_0          97.800  -Inf   Inf
+## log_k_parent_sink -2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -770,7 +763,7 @@ plot(m.L3.SFO)
 ## 
 ## Data:
 ##  time variable observed predicted residual
-##     0   parent     97.8     74.87  22.9273
+##     0   parent     97.8     74.87  22.9274
 ##     3   parent     60.0     69.41  -9.4065
 ##     7   parent     51.0     62.73 -11.7340
 ##    14   parent     43.0     52.56  -9.5634
@@ -785,40 +778,40 @@ does not fit very well. 

The FOMC model performs better:

-
m.L3.FOMC <- mkinfit(FOMC, FOCUS_2006_L3_mkin, quiet = TRUE)
+
m.L3.FOMC <- mkinfit("FOMC", FOCUS_2006_L3_mkin, quiet = TRUE)
 plot(m.L3.FOMC)
 
-

plot of chunk unnamed-chunk-16

+

plot of chunk unnamed-chunk-15

summary(m.L3.FOMC, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:45 2014 
-## Date of summary: Thu Jul 17 12:37:45 2014 
+## Date of fit:     Mon Jul 21 09:14:32 2014 
+## Date of summary: Mon Jul 21 09:14:32 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 26 model solutions performed in 0.208 s
+## Fitted with method Marq using 26 model solutions performed in 0.143 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##          value   type
-## parent_0   100  state
-## alpha        1 deparm
-## beta        10 deparm
+## parent_0  97.8  state
+## alpha      1.0 deparm
+## beta      10.0 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##             value lower upper
-## parent_0  100.000  -Inf   Inf
-## log_alpha   0.000  -Inf   Inf
-## log_beta    2.303  -Inf   Inf
+##            value lower upper
+## parent_0  97.800  -Inf   Inf
+## log_alpha  0.000  -Inf   Inf
+## log_beta   2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -858,42 +851,42 @@ plot(m.L3.FOMC)
 

Fitting the four parameter DFOP model further reduces the chi2 error level considerably:

-
m.L3.DFOP <- mkinfit(DFOP, FOCUS_2006_L3_mkin, quiet = TRUE)
+
m.L3.DFOP <- mkinfit("DFOP", FOCUS_2006_L3_mkin, quiet = TRUE)
 plot(m.L3.DFOP)
 
-

plot of chunk unnamed-chunk-17

+

plot of chunk unnamed-chunk-16

summary(m.L3.DFOP, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:46 2014 
-## Date of summary: Thu Jul 17 12:37:46 2014 
+## Date of fit:     Mon Jul 21 09:14:32 2014 
+## Date of summary: Mon Jul 21 09:14:32 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 37 model solutions performed in 0.338 s
+## Fitted with method Marq using 37 model solutions performed in 0.21 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##          value   type
-## parent_0 1e+02  state
-## k1       1e-01 deparm
-## k2       1e-02 deparm
-## g        5e-01 deparm
+## parent_0 97.80  state
+## k1        0.10 deparm
+## k2        0.01 deparm
+## g         0.50 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##            value lower upper
-## parent_0 100.000  -Inf   Inf
-## log_k1    -2.303  -Inf   Inf
-## log_k2    -4.605  -Inf   Inf
-## g_ilr      0.000  -Inf   Inf
+##           value lower upper
+## parent_0 97.800  -Inf   Inf
+## log_k1   -2.303  -Inf   Inf
+## log_k2   -4.605  -Inf   Inf
+## g_ilr     0.000  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -936,10 +929,15 @@ and the correlation matrix suggest that the parameter estimates are reliable, an
 the DFOP model can be used as the best-fit model based on the chi2 error
 level criterion for laboratory data L3.

+

This is also an example where the standard t-test for the parameter g_ilr is +misleading, as it tests for a significant difference from zero. In this case, +zero appears to be the correct value for this parameter, and the confidence +interval for the backtransformed parameter g is quite narrow.

+

Laboratory Data L4

The following code defines example dataset L4 from the FOCUS kinetics -report, p. 293

+report, p. 293:

FOCUS_2006_L4 = data.frame(
   t = c(0, 3, 7, 14, 30, 60, 91, 120),
@@ -949,38 +947,38 @@ FOCUS_2006_L4_mkin <- mkin_wide_to_long(FOCUS_2006_L4)
 
 

SFO model, summary and plot:

-
m.L4.SFO <- mkinfit(SFO, FOCUS_2006_L4_mkin, quiet = TRUE)
+
m.L4.SFO <- mkinfit("SFO", FOCUS_2006_L4_mkin, quiet = TRUE)
 plot(m.L4.SFO)
 
-

plot of chunk unnamed-chunk-19

+

plot of chunk unnamed-chunk-18

summary(m.L4.SFO, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:46 2014 
-## Date of summary: Thu Jul 17 12:37:46 2014 
+## Date of fit:     Mon Jul 21 09:14:33 2014 
+## Date of summary: Mon Jul 21 09:14:33 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 20 model solutions performed in 0.127 s
+## Fitted with method Marq using 20 model solutions performed in 0.109 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##               value   type
-## parent_0      100.0  state
+## parent_0       96.6  state
 ## k_parent_sink   0.1 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##                     value lower upper
-## parent_0          100.000  -Inf   Inf
-## log_k_parent_sink  -2.303  -Inf   Inf
+##                    value lower upper
+## parent_0          96.600  -Inf   Inf
+## log_k_parent_sink -2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
@@ -1022,42 +1020,42 @@ plot(m.L4.SFO)
 

The chi2 error level of 3.3% as well as the plot suggest that the model fits very well.

-

The FOMC model for comparison

+

The FOMC model for comparison:

-
m.L4.FOMC <- mkinfit(FOMC, FOCUS_2006_L4_mkin, quiet = TRUE)
+
m.L4.FOMC <- mkinfit("FOMC", FOCUS_2006_L4_mkin, quiet = TRUE)
 plot(m.L4.FOMC)
 
-

plot of chunk unnamed-chunk-20

+

plot of chunk unnamed-chunk-19

summary(m.L4.FOMC, data = FALSE)
 
## mkin version:    0.9.32 
 ## R version:       3.1.1 
-## Date of fit:     Thu Jul 17 12:37:46 2014 
-## Date of summary: Thu Jul 17 12:37:46 2014 
+## Date of fit:     Mon Jul 21 09:14:33 2014 
+## Date of summary: Mon Jul 21 09:14:33 2014 
 ## 
 ## Equations:
 ## [1] d_parent = - (alpha/beta) * ((time/beta) + 1)^-1 * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Marq using 53 model solutions performed in 0.355 s
+## Fitted with method Marq using 48 model solutions performed in 0.26 s
 ## 
 ## Weighting: none
 ## 
 ## Starting values for parameters to be optimised:
 ##          value   type
-## parent_0   100  state
-## alpha        1 deparm
-## beta        10 deparm
+## parent_0  96.6  state
+## alpha      1.0 deparm
+## beta      10.0 deparm
 ## 
 ## Starting values for the transformed parameters actually optimised:
-##             value lower upper
-## parent_0  100.000  -Inf   Inf
-## log_alpha   0.000  -Inf   Inf
-## log_beta    2.303  -Inf   Inf
+##            value lower upper
+## parent_0  96.600  -Inf   Inf
+## log_alpha  0.000  -Inf   Inf
+## log_beta   2.303  -Inf   Inf
 ## 
 ## Fixed parameter values:
 ## None
diff --git a/vignettes/mkin.pdf b/vignettes/mkin.pdf
index 9cf1b3e5..b69ddddc 100644
Binary files a/vignettes/mkin.pdf and b/vignettes/mkin.pdf differ
-- 
cgit v1.2.1