From 48c463680b51fa767b4cd7bd62865f192d0354ac Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 6 Feb 2021 18:30:32 +0100 Subject: Reintroduce interface to saemix Also after the upgrade from buster to bullseye of my local system, some test results for saemix have changed. --- .travis.yml | 2 - DESCRIPTION | 5 +- NAMESPACE | 8 + NEWS.md | 10 + R/endpoints.R | 8 +- R/plot.mixed.mmkin.R | 23 +- R/saem.R | 512 +++ R/summary.saem.mmkin.R | 268 ++ _pkgdown.yml | 7 +- build.log | 2 +- check.log | 15 +- docs/dev/404.html | 2 +- docs/dev/articles/index.html | 2 +- docs/dev/authors.html | 8 +- docs/dev/index.html | 4 +- docs/dev/news/index.html | 211 +- docs/dev/pkgdown.yml | 4 +- docs/dev/reference/Rplot001.png | Bin 19395 -> 1011 bytes docs/dev/reference/Rplot003.png | Bin 28735 -> 28745 bytes docs/dev/reference/Rplot005.png | Bin 57095 -> 59143 bytes docs/dev/reference/Rplot006.png | Bin 24624 -> 22103 bytes docs/dev/reference/confint.mkinfit.html | 127 +- docs/dev/reference/endpoints.html | 4 +- docs/dev/reference/index.html | 10 +- docs/dev/reference/logLik.mkinfit.html | 12 +- docs/dev/reference/mkinresplot.html | 6 +- docs/dev/reference/mmkin-1.png | Bin 114048 -> 110459 bytes docs/dev/reference/mmkin-2.png | Bin 110392 -> 107057 bytes docs/dev/reference/mmkin-3.png | Bin 97556 -> 96062 bytes docs/dev/reference/mmkin-4.png | Bin 70005 -> 67191 bytes docs/dev/reference/mmkin-5.png | Bin 66093 -> 64880 bytes docs/dev/reference/mmkin.html | 31 +- docs/dev/reference/nlme.mmkin-1.png | Bin 119655 -> 124677 bytes docs/dev/reference/nlme.mmkin-2.png | Bin 159253 -> 169523 bytes docs/dev/reference/nlme.mmkin-3.png | Bin 161800 -> 172692 bytes docs/dev/reference/nlme.mmkin.html | 76 +- docs/dev/reference/plot.mixed.mmkin-1.png | Bin 86076 -> 84734 bytes docs/dev/reference/plot.mixed.mmkin-2.png | Bin 164488 -> 173916 bytes docs/dev/reference/plot.mixed.mmkin-3.png | Bin 163536 -> 172396 bytes docs/dev/reference/plot.mixed.mmkin-4.png | Bin 166687 -> 175502 bytes docs/dev/reference/plot.mixed.mmkin.html | 8 +- docs/dev/reference/saem-3.png | Bin 82102 -> 82107 bytes docs/dev/reference/saem-5.png | Bin 164443 -> 173288 bytes docs/dev/reference/saem.html | 56 +- docs/dev/reference/summary.saem.mmkin.html | 426 +- docs/dev/reference/transform_odeparms.html | 80 +- docs/dev/sitemap.xml | 3 - man/endpoints.Rd | 8 +- man/plot.mixed.mmkin.Rd | 11 +- man/saem.Rd | 155 + man/summary.saem.mmkin.Rd | 100 + test.log | 27 +- ...t-for-saem-object-with-mkin-transformations.svg | 4782 ++++++++++---------- ...for-saem-object-with-saemix-transformations.svg | 1234 ++--- tests/testthat/setup_script.R | 18 + tests/testthat/summary_saem_biphasic_s.txt | 77 + tests/testthat/test_mixed.R | 135 +- tests/testthat/test_plot.R | 11 + 58 files changed, 4938 insertions(+), 3550 deletions(-) create mode 100644 R/saem.R create mode 100644 R/summary.saem.mmkin.R create mode 100644 man/saem.Rd create mode 100644 man/summary.saem.mmkin.Rd create mode 100644 tests/testthat/summary_saem_biphasic_s.txt diff --git a/.travis.yml b/.travis.yml index 282f1302..6c03b451 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,6 @@ addons: cache: packages repos: CRAN: https://cloud.r-project.org -r_github_packages: - - saemixdevelopment/saemixextension@master script: - R CMD build . - R CMD check --no-tests mkin_*.tar.gz diff --git a/DESCRIPTION b/DESCRIPTION index dd57aefa..15871070 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data -Version: 1.0.1 +Version: 1.0.1.9000 Date: 2021-02-06 Authors@R: c( person("Johannes", "Ranke", role = c("aut", "cre", "cph"), @@ -19,9 +19,10 @@ Description: Calculation routines based on the FOCUS Kinetics Report (2006, particular purpose. Depends: R (>= 2.15.1), parallel Imports: stats, graphics, methods, deSolve, R6, inline (>= 0.3.17), numDeriv, - lmtest, pkgbuild, nlme (>= 3.1-151), purrr + lmtest, pkgbuild, nlme (>= 3.1-151), purrr, saemix (>= 3.1.9000) Suggests: knitr, rbenchmark, tikzDevice, testthat, rmarkdown, covr, vdiffr, benchmarkme, tibble, stats4 +Remotes: github::saemixdevelopment/saemixextension License: GPL LazyLoad: yes LazyData: yes diff --git a/NAMESPACE b/NAMESPACE index 9776d2f3..f2497283 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -30,11 +30,15 @@ S3method(print,mkinmod) S3method(print,mmkin) S3method(print,nafta) S3method(print,nlme.mmkin) +S3method(print,saem.mmkin) S3method(print,summary.mkinfit) S3method(print,summary.nlme.mmkin) +S3method(print,summary.saem.mmkin) S3method(residuals,mkinfit) +S3method(saem,mmkin) S3method(summary,mkinfit) S3method(summary,nlme.mmkin) +S3method(summary,saem.mmkin) S3method(update,mkinfit) S3method(update,mmkin) S3method(update,nlme.mmkin) @@ -86,6 +90,9 @@ export(parms) export(plot_err) export(plot_res) export(plot_sep) +export(saem) +export(saemix_data) +export(saemix_model) export(sigma_twocomp) export(transform_odeparms) import(deSolve) @@ -126,5 +133,6 @@ importFrom(stats,residuals) importFrom(stats,rnorm) importFrom(stats,shapiro.test) importFrom(stats,update) +importFrom(stats,vcov) importFrom(utils,getFromNamespace) importFrom(utils,write.table) diff --git a/NEWS.md b/NEWS.md index 124111d6..08745e9f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,13 @@ +# mkin 1.0.1.9000 + +- Switch to a versioning scheme where the fourth version component indicates development versions + +- Reintroduce the interface to the current development version of saemix, in particular: + +- 'saemix_model' and 'saemix_data': Helper functions to set up nonlinear mixed-effects models for mmkin row objects + +- 'saem': generic function to fit saemix models using 'saemix_model' and 'saemix_data', with a generator 'saem.mmkin', summary and plot methods + # mkin 1.0.1 - 'confint.mmkin', 'nlme.mmkin', 'transform_odeparms': Fix example code in dontrun sections that failed with current defaults diff --git a/R/endpoints.R b/R/endpoints.R index b5872e68..f1f47581 100644 --- a/R/endpoints.R +++ b/R/endpoints.R @@ -10,8 +10,8 @@ #' Additional DT50 values are calculated from the FOMC DT90 and k1 and k2 from #' HS and DFOP, as well as from Eigenvalues b1 and b2 of any SFORB models #' -#' @param fit An object of class [mkinfit] or [nlme.mmkin] -#' or another object that has list components +#' @param fit An object of class [mkinfit], [nlme.mmkin] or +#' [saem.mmkin]. Or another object that has list components #' mkinmod containing an [mkinmod] degradation model, and two numeric vectors, #' bparms.optim and bparms.fixed, that contain parameter values #' for that model. @@ -20,8 +20,8 @@ #' and, if applicable, a vector of formation fractions named ff #' and, if the SFORB model was in use, a vector of eigenvalues #' of these SFORB models, equivalent to DFOP rate constants -#' @note The function is used internally by [summary.mkinfit] -#' and [summary.nlme.mmkin] +#' @note The function is used internally by [summary.mkinfit], +#' [summary.nlme.mmkin] and [summary.saem.mmkin]. #' @author Johannes Ranke #' @examples #' diff --git a/R/plot.mixed.mmkin.R b/R/plot.mixed.mmkin.R index 5a0b7412..1674d855 100644 --- a/R/plot.mixed.mmkin.R +++ b/R/plot.mixed.mmkin.R @@ -2,7 +2,7 @@ utils::globalVariables("ds") #' Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object #' -#' @param x An object of class [mixed.mmkin], [nlme.mmkin] +#' @param x An object of class [mixed.mmkin], [saem.mmkin] or [nlme.mmkin] #' @param i A numeric index to select datasets for which to plot the individual predictions, #' in case plots get too large #' @inheritParams plot.mkinfit @@ -39,6 +39,15 @@ utils::globalVariables("ds") #' f_nlme <- nlme(f, control = list(pnlsMaxIter = 120, tolerance = 1e-3)) #' plot(f_nlme) #' +#' f_saem <- saem(f, transformations = "saemix") +#' plot(f_saem) +#' +#' # We can overlay the two variants if we generate predictions +#' pred_nlme <- mkinpredict(dfop_sfo, +#' f_nlme$bparms.optim[-1], +#' c(parent = f_nlme$bparms.optim[[1]], A1 = 0), +#' seq(0, 180, by = 0.2)) +#' plot(f_saem, pred_over = list(nlme = pred_nlme)) #' } #' @export plot.mixed.mmkin <- function(x, @@ -82,6 +91,18 @@ plot.mixed.mmkin <- function(x, type = ifelse(standardized, "pearson", "response")) } + if (inherits(x, "saem.mmkin")) { + if (x$transformations == "saemix") backtransform = FALSE + degparms_i <- saemix::psi(x$so) + rownames(degparms_i) <- ds_names + degparms_i_names <- setdiff(x$so@results@name.fixed, names(fit_1$errparms)) + colnames(degparms_i) <- degparms_i_names + residual_type = ifelse(standardized, "standardized", "residual") + residuals <- x$data[[residual_type]] + degparms_pop <- x$so@results@fixed.effects + names(degparms_pop) <- degparms_i_names + } + degparms_fixed <- fit_1$fixed$value names(degparms_fixed) <- rownames(fit_1$fixed) degparms_all <- cbind(as.matrix(degparms_i), diff --git a/R/saem.R b/R/saem.R new file mode 100644 index 00000000..fd2a77b4 --- /dev/null +++ b/R/saem.R @@ -0,0 +1,512 @@ +utils::globalVariables(c("predicted", "std")) + +#' Fit nonlinear mixed models with SAEM +#' +#' This function uses [saemix::saemix()] as a backend for fitting nonlinear mixed +#' effects models created from [mmkin] row objects using the Stochastic Approximation +#' Expectation Maximisation algorithm (SAEM). +#' +#' An mmkin row object is essentially a list of mkinfit objects that have been +#' obtained by fitting the same model to a list of datasets using [mkinfit]. +#' +#' Starting values for the fixed effects (population mean parameters, argument +#' psi0 of [saemix::saemixModel()] are the mean values of the parameters found +#' using [mmkin]. +#' +#' @param object An [mmkin] row object containing several fits of the same +#' [mkinmod] model to different datasets +#' @param verbose Should we print information about created objects of +#' type [saemix::SaemixModel] and [saemix::SaemixData]? +#' @param transformations Per default, all parameter transformations are done +#' in mkin. If this argument is set to 'saemix', parameter transformations +#' are done in 'saemix' for the supported cases. Currently this is only +#' supported in cases where the initial concentration of the parent is not fixed, +#' SFO or DFOP is used for the parent and there is either no metabolite or one. +#' @param degparms_start Parameter values given as a named numeric vector will +#' be used to override the starting values obtained from the 'mmkin' object. +#' @param solution_type Possibility to specify the solution type in case the +#' automatic choice is not desired +#' @param quiet Should we suppress the messages saemix prints at the beginning +#' and the end of the optimisation process? +#' @param control Passed to [saemix::saemix] +#' @param \dots Further parameters passed to [saemix::saemixModel]. +#' @return An S3 object of class 'saem.mmkin', containing the fitted +#' [saemix::SaemixObject] as a list component named 'so'. The +#' object also inherits from 'mixed.mmkin'. +#' @seealso [summary.saem.mmkin] [plot.mixed.mmkin] +#' @examples +#' \dontrun{ +#' ds <- lapply(experimental_data_for_UBA_2019[6:10], +#' function(x) subset(x$data[c("name", "time", "value")])) +#' names(ds) <- paste("Dataset", 6:10) +#' f_mmkin_parent_p0_fixed <- mmkin("FOMC", ds, +#' state.ini = c(parent = 100), fixed_initials = "parent", quiet = TRUE) +#' f_saem_p0_fixed <- saem(f_mmkin_parent_p0_fixed) +#' +#' f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) +#' f_saem_sfo <- saem(f_mmkin_parent["SFO", ]) +#' f_saem_fomc <- saem(f_mmkin_parent["FOMC", ]) +#' f_saem_dfop <- saem(f_mmkin_parent["DFOP", ]) +#' +#' # The returned saem.mmkin object contains an SaemixObject, therefore we can use +#' # functions from saemix +#' library(saemix) +#' compare.saemix(list(f_saem_sfo$so, f_saem_fomc$so, f_saem_dfop$so)) +#' plot(f_saem_fomc$so, plot.type = "convergence") +#' plot(f_saem_fomc$so, plot.type = "individual.fit") +#' plot(f_saem_fomc$so, plot.type = "npde") +#' plot(f_saem_fomc$so, plot.type = "vpc") +#' +#' f_mmkin_parent_tc <- update(f_mmkin_parent, error_model = "tc") +#' f_saem_fomc_tc <- saem(f_mmkin_parent_tc["FOMC", ]) +#' compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)) +#' +#' sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), +#' A1 = mkinsub("SFO")) +#' fomc_sfo <- mkinmod(parent = mkinsub("FOMC", "A1"), +#' A1 = mkinsub("SFO")) +#' dfop_sfo <- mkinmod(parent = mkinsub("DFOP", "A1"), +#' A1 = mkinsub("SFO")) +#' # The following fit uses analytical solutions for SFO-SFO and DFOP-SFO, +#' # and compiled ODEs for FOMC that are much slower +#' f_mmkin <- mmkin(list( +#' "SFO-SFO" = sfo_sfo, "FOMC-SFO" = fomc_sfo, "DFOP-SFO" = dfop_sfo), +#' ds, quiet = TRUE) +#' # saem fits of SFO-SFO and DFOP-SFO to these data take about five seconds +#' # each on this system, as we use analytical solutions written for saemix. +#' # When using the analytical solutions written for mkin this took around +#' # four minutes +#' f_saem_sfo_sfo <- saem(f_mmkin["SFO-SFO", ]) +#' f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ]) +#' # We can use print, plot and summary methods to check the results +#' print(f_saem_dfop_sfo) +#' plot(f_saem_dfop_sfo) +#' summary(f_saem_dfop_sfo, data = TRUE) +#' +#' # The following takes about 6 minutes +#' #f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve", +#' # control = list(nbiter.saemix = c(200, 80), nbdisplay = 10)) +#' +#' #saemix::compare.saemix(list( +#' # f_saem_dfop_sfo$so, +#' # f_saem_dfop_sfo_deSolve$so)) +#' +#' # If the model supports it, we can also use eigenvalue based solutions, which +#' # take a similar amount of time +#' #f_saem_sfo_sfo_eigen <- saem(f_mmkin["SFO-SFO", ], solution_type = "eigen", +#' # control = list(nbiter.saemix = c(200, 80), nbdisplay = 10)) +#' } +#' @export +saem <- function(object, ...) UseMethod("saem") + +#' @rdname saem +#' @export +saem.mmkin <- function(object, + transformations = c("mkin", "saemix"), + degparms_start = numeric(), + solution_type = "auto", + control = list(displayProgress = FALSE, print = FALSE, + save = FALSE, save.graphs = FALSE), + verbose = FALSE, quiet = FALSE, ...) +{ + transformations <- match.arg(transformations) + m_saemix <- saemix_model(object, verbose = verbose, + degparms_start = degparms_start, solution_type = solution_type, + transformations = transformations, ...) + d_saemix <- saemix_data(object, verbose = verbose) + + fit_time <- system.time({ + utils::capture.output(f_saemix <- saemix::saemix(m_saemix, d_saemix, control), split = !quiet) + }) + + transparms_optim <- f_saemix@results@fixed.effects + names(transparms_optim) <- f_saemix@results@name.fixed + + if (transformations == "mkin") { + bparms_optim <- backtransform_odeparms(transparms_optim, + object[[1]]$mkinmod, + object[[1]]$transform_rates, + object[[1]]$transform_fractions) + } else { + bparms_optim <- transparms_optim + } + + return_data <- nlme_data(object) + + return_data$predicted <- f_saemix@model@model( + psi = saemix::psi(f_saemix), + id = as.numeric(return_data$ds), + xidep = return_data[c("time", "name")]) + + return_data <- transform(return_data, + residual = predicted - value, + std = sigma_twocomp(predicted, + f_saemix@results@respar[1], f_saemix@results@respar[2])) + return_data <- transform(return_data, + standardized = residual / std) + + result <- list( + mkinmod = object[[1]]$mkinmod, + mmkin = object, + solution_type = object[[1]]$solution_type, + transformations = transformations, + transform_rates = object[[1]]$transform_rates, + transform_fractions = object[[1]]$transform_fractions, + so = f_saemix, + time = fit_time, + mean_dp_start = attr(m_saemix, "mean_dp_start"), + bparms.optim = bparms_optim, + bparms.fixed = object[[1]]$bparms.fixed, + data = return_data, + err_mod = object[[1]]$err_mod, + date.fit = date(), + saemixversion = as.character(utils::packageVersion("saemix")), + mkinversion = as.character(utils::packageVersion("mkin")), + Rversion = paste(R.version$major, R.version$minor, sep=".") + ) + + class(result) <- c("saem.mmkin", "mixed.mmkin") + return(result) +} + +#' @export +#' @rdname saem +#' @param x An saem.mmkin object to print +#' @param digits Number of digits to use for printing +print.saem.mmkin <- function(x, digits = max(3, getOption("digits") - 3), ...) { + cat( "Kinetic nonlinear mixed-effects model fit by SAEM" ) + cat("\nStructural model:\n") + diffs <- x$mmkin[[1]]$mkinmod$diffs + nice_diffs <- gsub("^(d.*) =", "\\1/dt =", diffs) + writeLines(strwrap(nice_diffs, exdent = 11)) + cat("\nData:\n") + cat(nrow(x$data), "observations of", + length(unique(x$data$name)), "variable(s) grouped in", + length(unique(x$data$ds)), "datasets\n") + + cat("\nLikelihood computed by importance sampling\n") + print(data.frame( + AIC = AIC(x$so, type = "is"), + BIC = BIC(x$so, type = "is"), + logLik = logLik(x$so, type = "is"), + row.names = " "), digits = digits) + + cat("\nFitted parameters:\n") + conf.int <- x$so@results@conf.int[c("estimate", "lower", "upper")] + rownames(conf.int) <- x$so@results@conf.int[["name"]] + print(conf.int, digits = digits) + + invisible(x) +} + +#' @rdname saem +#' @return An [saemix::SaemixModel] object. +#' @export +saemix_model <- function(object, solution_type = "auto", transformations = c("mkin", "saemix"), + degparms_start = numeric(), verbose = FALSE, ...) +{ + if (nrow(object) > 1) stop("Only row objects allowed") + + mkin_model <- object[[1]]$mkinmod + + degparms_optim <- mean_degparms(object) + if (transformations == "saemix") { + degparms_optim <- backtransform_odeparms(degparms_optim, + object[[1]]$mkinmod, + object[[1]]$transform_rates, + object[[1]]$transform_fractions) + } + degparms_fixed <- object[[1]]$bparms.fixed + + # Transformations are done in the degradation function + transform.par = rep(0, length(degparms_optim)) + + odeini_optim_parm_names <- grep('_0$', names(degparms_optim), value = TRUE) + odeini_fixed_parm_names <- grep('_0$', names(degparms_fixed), value = TRUE) + + odeparms_fixed_names <- setdiff(names(degparms_fixed), odeini_fixed_parm_names) + odeparms_fixed <- degparms_fixed[odeparms_fixed_names] + + odeini_fixed <- degparms_fixed[odeini_fixed_parm_names] + names(odeini_fixed) <- gsub('_0$', '', odeini_fixed_parm_names) + + model_function <- FALSE + + # Model functions with analytical solutions + # Fixed parameters, use_of_ff = "min" and turning off sinks currently not supported here + # In general, we need to consider exactly how the parameters in mkinfit were specified, + # as the parameters are currently mapped by position in these solutions + sinks <- sapply(mkin_model$spec, function(x) x$sink) + if (length(odeparms_fixed) == 0 & mkin_model$use_of_ff == "max" & all(sinks)) { + # Parent only + if (length(mkin_model$spec) == 1) { + parent_type <- mkin_model$spec[[1]]$type + if (length(odeini_fixed) == 1) { + if (parent_type == "SFO") { + stop("saemix needs at least two parameters to work on.") + } + if (parent_type == "FOMC") { + model_function <- function(psi, id, xidep) { + odeini_fixed / (xidep[, "time"]/exp(psi[id, 2]) + 1)^exp(psi[id, 1]) + } + } + if (parent_type == "DFOP") { + model_function <- function(psi, id, xidep) { + g <- plogis(psi[id, 3]) + t <- xidep[, "time"] + odeini_fixed * (g * exp(- exp(psi[id, 1]) * t) + + (1 - g) * exp(- exp(psi[id, 2]) * t)) + } + } + if (parent_type == "HS") { + model_function <- function(psi, id, xidep) { + tb <- exp(psi[id, 3]) + t <- xidep[, "time"] + k1 = exp(psi[id, 1]) + odeini_fixed * ifelse(t <= tb, + exp(- k1 * t), + exp(- k1 * tb) * exp(- exp(psi[id, 2]) * (t - tb))) + } + } + } else { + if (parent_type == "SFO") { + if (transformations == "mkin") { + model_function <- function(psi, id, xidep) { + psi[id, 1] * exp( - exp(psi[id, 2]) * xidep[, "time"]) + } + } else { + model_function <- function(psi, id, xidep) { + psi[id, 1] * exp( - psi[id, 2] * xidep[, "time"]) + } + transform.par = c(0, 1) + } + } + if (parent_type == "FOMC") { + model_function <- function(psi, id, xidep) { + psi[id, 1] / (xidep[, "time"]/exp(psi[id, 3]) + 1)^exp(psi[id, 2]) + } + } + if (parent_type == "DFOP") { + if (transformations == "mkin") { + model_function <- function(psi, id, xidep) { + g <- plogis(psi[id, 4]) + t <- xidep[, "time"] + psi[id, 1] * (g * exp(- exp(psi[id, 2]) * t) + + (1 - g) * exp(- exp(psi[id, 3]) * t)) + } + } else { + model_function <- function(psi, id, xidep) { + g <- psi[id, 4] + t <- xidep[, "time"] + psi[id, 1] * (g * exp(- psi[id, 2] * t) + + (1 - g) * exp(- psi[id, 3] * t)) + } + transform.par = c(0, 1, 1, 3) + } + } + if (parent_type == "HS") { + model_function <- function(psi, id, xidep) { + tb <- exp(psi[id, 4]) + t <- xidep[, "time"] + k1 = exp(psi[id, 2]) + psi[id, 1] * ifelse(t <= tb, + exp(- k1 * t), + exp(- k1 * tb) * exp(- exp(psi[id, 3]) * (t - tb))) + } + } + } + } + + # Parent with one metabolite + # Parameter names used in the model functions are as in + # https://nbviewer.jupyter.org/urls/jrwb.de/nb/Symbolic%20ODE%20solutions%20for%20mkin.ipynb + types <- unname(sapply(mkin_model$spec, function(x) x$type)) + if (length(mkin_model$spec) == 2 &! "SFORB" %in% types ) { + # Initial value for the metabolite (n20) must be fixed + if (names(odeini_fixed) == names(mkin_model$spec)[2]) { + n20 <- odeini_fixed + parent_name <- names(mkin_model$spec)[1] + if (identical(types, c("SFO", "SFO"))) { + if (transformations == "mkin") { + model_function <- function(psi, id, xidep) { + t <- xidep[, "time"] + n10 <- psi[id, 1] + k1 <- exp(psi[id, 2]) + k2 <- exp(psi[id, 3]) + f12 <- plogis(psi[id, 4]) + ifelse(xidep[, "name"] == parent_name, + n10 * exp(- k1 * t), + (((k2 - k1) * n20 - f12 * k1 * n10) * exp(- k2 * t)) / (k2 - k1) + + (f12 * k1 * n10 * exp(- k1 * t)) / (k2 - k1) + ) + } + } else { + model_function <- function(psi, id, xidep) { + t <- xidep[, "time"] + n10 <- psi[id, 1] + k1 <- psi[id, 2] + k2 <- psi[id, 3] + f12 <- psi[id, 4] + ifelse(xidep[, "name"] == parent_name, + n10 * exp(- k1 * t), + (((k2 - k1) * n20 - f12 * k1 * n10) * exp(- k2 * t)) / (k2 - k1) + + (f12 * k1 * n10 * exp(- k1 * t)) / (k2 - k1) + ) + } + transform.par = c(0, 1, 1, 3) + } + } + if (identical(types, c("DFOP", "SFO"))) { + if (transformations == "mkin") { + model_function <- function(psi, id, xidep) { + t <- xidep[, "time"] + n10 <- psi[id, 1] + k2 <- exp(psi[id, 2]) + f12 <- plogis(psi[id, 3]) + l1 <- exp(psi[id, 4]) + l2 <- exp(psi[id, 5]) + g <- plogis(psi[id, 6]) + ifelse(xidep[, "name"] == parent_name, + n10 * (g * exp(- l1 * t) + (1 - g) * exp(- l2 * t)), + ((f12 * g - f12) * l2 * n10 * exp(- l2 * t)) / (l2 - k2) - + (f12 * g * l1 * n10 * exp(- l1 * t)) / (l1 - k2) + + ((((l1 - k2) * l2 - k2 * l1 + k2^2) * n20 + + ((f12 * l1 + (f12 * g - f12) * k2) * l2 - + f12 * g * k2 * l1) * n10) * exp( - k2 * t)) / + ((l1 - k2) * l2 - k2 * l1 + k2^2) + ) + } + } else { + model_function <- function(psi, id, xidep) { + t <- xidep[, "time"] + n10 <- psi[id, 1] + k2 <- psi[id, 2] + f12 <- psi[id, 3] + l1 <- psi[id, 4] + l2 <- psi[id, 5] + g <- psi[id, 6] + ifelse(xidep[, "name"] == parent_name, + n10 * (g * exp(- l1 * t) + (1 - g) * exp(- l2 * t)), + ((f12 * g - f12) * l2 * n10 * exp(- l2 * t)) / (l2 - k2) - + (f12 * g * l1 * n10 * exp(- l1 * t)) / (l1 - k2) + + ((((l1 - k2) * l2 - k2 * l1 + k2^2) * n20 + + ((f12 * l1 + (f12 * g - f12) * k2) * l2 - + f12 * g * k2 * l1) * n10) * exp( - k2 * t)) / + ((l1 - k2) * l2 - k2 * l1 + k2^2) + ) + } + transform.par = c(0, 1, 3, 1, 1, 3) + } + } + } + } + } + + if (is.function(model_function) & solution_type == "auto") { + solution_type = "analytical saemix" + } else { + + if (solution_type == "auto") + solution_type <- object[[1]]$solution_type + + model_function <- function(psi, id, xidep) { + + uid <- unique(id) + + res_list <- lapply(uid, function(i) { + + transparms_optim <- as.numeric(psi[i, ]) # psi[i, ] is a dataframe when called in saemix.predict + names(transparms_optim) <- names(degparms_optim) + + odeini_optim <- transparms_optim[odeini_optim_parm_names] + names(odeini_optim) <- gsub('_0$', '', odeini_optim_parm_names) + + odeini <- c(odeini_optim, odeini_fixed)[names(mkin_model$diffs)] + + ode_transparms_optim_names <- setdiff(names(transparms_optim), odeini_optim_parm_names) + odeparms_optim <- backtransform_odeparms(transparms_optim[ode_transparms_optim_names], mkin_model, + transform_rates = object[[1]]$transform_rates, + transform_fractions = object[[1]]$transform_fractions) + odeparms <- c(odeparms_optim, odeparms_fixed) + + xidep_i <- subset(xidep, id == i) + + if (solution_type == "analytical") { + out_values <- mkin_model$deg_func(xidep_i, odeini, odeparms) + } else { + + i_time <- xidep_i$time + i_name <- xidep_i$name + + out_wide <- mkinpredict(mkin_model, + odeparms = odeparms, odeini = odeini, + solution_type = solution_type, + outtimes = sort(unique(i_time)), + na_stop = FALSE + ) + + out_index <- cbind(as.character(i_time), as.character(i_name)) + out_values <- out_wide[out_index] + } + return(out_values) + }) + res <- unlist(res_list) + return(res) + } + } + + error.model <- switch(object[[1]]$err_mod, + const = "constant", + tc = "combined", + obs = "constant") + + if (object[[1]]$err_mod == "obs") { + warning("The error model 'obs' (variance by variable) can currently not be transferred to an saemix model") + } + + error.init <- switch(object[[1]]$err_mod, + const = c(a = mean(sapply(object, function(x) x$errparms)), b = 1), + tc = c(a = mean(sapply(object, function(x) x$errparms[1])), + b = mean(sapply(object, function(x) x$errparms[2]))), + obs = c(a = mean(sapply(object, function(x) x$errparms)), b = 1)) + + degparms_psi0 <- degparms_optim + degparms_psi0[names(degparms_start)] <- degparms_start + psi0_matrix <- matrix(degparms_psi0, nrow = 1) + colnames(psi0_matrix) <- names(degparms_psi0) + + res <- saemix::saemixModel(model_function, + psi0 = psi0_matrix, + "Mixed model generated from mmkin object", + transform.par = transform.par, + error.model = error.model, + verbose = verbose + ) + attr(res, "mean_dp_start") <- degparms_optim + return(res) +} + +#' @rdname saem +#' @return An [saemix::SaemixData] object. +#' @export +saemix_data <- function(object, verbose = FALSE, ...) { + if (nrow(object) > 1) stop("Only row objects allowed") + ds_names <- colnames(object) + + ds_list <- lapply(object, function(x) x$data[c("time", "variable", "observed")]) + names(ds_list) <- ds_names + ds_saemix_all <- purrr::map_dfr(ds_list, function(x) x, .id = "ds") + ds_saemix <- data.frame(ds = ds_saemix_all$ds, + name = as.character(ds_saemix_all$variable), + time = ds_saemix_all$time, + value = ds_saemix_all$observed, + stringsAsFactors = FALSE) + + res <- saemix::saemixData(ds_saemix, + name.group = "ds", + name.predictors = c("time", "name"), + name.response = "value", + verbose = verbose, + ...) + return(res) +} diff --git a/R/summary.saem.mmkin.R b/R/summary.saem.mmkin.R new file mode 100644 index 00000000..e92c561c --- /dev/null +++ b/R/summary.saem.mmkin.R @@ -0,0 +1,268 @@ +#' Summary method for class "saem.mmkin" +#' +#' Lists model equations, initial parameter values, optimised parameters +#' for fixed effects (population), random effects (deviations from the +#' population mean) and residual error model, as well as the resulting +#' endpoints such as formation fractions and DT50 values. Optionally +#' (default is FALSE), the data are listed in full. +#' +#' @param object an object of class [saem.mmkin] +#' @param x an object of class [summary.saem.mmkin] +#' @param data logical, indicating whether the full data should be included in +#' the summary. +#' @param verbose Should the summary be verbose? +#' @param distimes logical, indicating whether DT50 and DT90 values should be +#' included. +#' @param digits Number of digits to use for printing +#' @param \dots optional arguments passed to methods like \code{print}. +#' @return The summary function returns a list based on the [saemix::SaemixObject] +#' obtained in the fit, with at least the following additional components +#' \item{saemixversion, mkinversion, Rversion}{The saemix, mkin and R versions used} +#' \item{date.fit, date.summary}{The dates where the fit and the summary were +#' produced} +#' \item{diffs}{The differential equations used in the degradation model} +#' \item{use_of_ff}{Was maximum or minimum use made of formation fractions} +#' \item{data}{The data} +#' \item{confint_trans}{Transformed parameters as used in the optimisation, with confidence intervals} +#' \item{confint_back}{Backtransformed parameters, with confidence intervals if available} +#' \item{confint_errmod}{Error model parameters with confidence intervals} +#' \item{ff}{The estimated formation fractions derived from the fitted +#' model.} +#' \item{distimes}{The DT50 and DT90 values for each observed variable.} +#' \item{SFORB}{If applicable, eigenvalues of SFORB components of the model.} +#' The print method is called for its side effect, i.e. printing the summary. +#' @importFrom stats predict vcov +#' @author Johannes Ranke for the mkin specific parts +#' saemix authors for the parts inherited from saemix. +#' @examples +#' # Generate five datasets following DFOP-SFO kinetics +#' sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) +#' dfop_sfo <- mkinmod(parent = mkinsub("DFOP", "m1"), +#' m1 = mkinsub("SFO"), quiet = TRUE) +#' set.seed(1234) +#' k1_in <- rlnorm(5, log(0.1), 0.3) +#' k2_in <- rlnorm(5, log(0.02), 0.3) +#' g_in <- plogis(rnorm(5, qlogis(0.5), 0.3)) +#' f_parent_to_m1_in <- plogis(rnorm(5, qlogis(0.3), 0.3)) +#' k_m1_in <- rlnorm(5, log(0.02), 0.3) +#' +#' pred_dfop_sfo <- function(k1, k2, g, f_parent_to_m1, k_m1) { +#' mkinpredict(dfop_sfo, +#' c(k1 = k1, k2 = k2, g = g, f_parent_to_m1 = f_parent_to_m1, k_m1 = k_m1), +#' c(parent = 100, m1 = 0), +#' sampling_times) +#' } +#' +#' ds_mean_dfop_sfo <- lapply(1:5, function(i) { +#' mkinpredict(dfop_sfo, +#' c(k1 = k1_in[i], k2 = k2_in[i], g = g_in[i], +#' f_parent_to_m1 = f_parent_to_m1_in[i], k_m1 = k_m1_in[i]), +#' c(parent = 100, m1 = 0), +#' sampling_times) +#' }) +#' names(ds_mean_dfop_sfo) <- paste("ds", 1:5) +#' +#' ds_syn_dfop_sfo <- lapply(ds_mean_dfop_sfo, function(ds) { +#' add_err(ds, +#' sdfunc = function(value) sqrt(1^2 + value^2 * 0.07^2), +#' n = 1)[[1]] +#' }) +#' +#' \dontrun{ +#' # Evaluate using mmkin and saem +#' f_mmkin_dfop_sfo <- mmkin(list(dfop_sfo), ds_syn_dfop_sfo, +#' quiet = TRUE, error_model = "tc", cores = 5) +#' f_saem_dfop_sfo <- saem(f_mmkin_dfop_sfo) +#' summary(f_saem_dfop_sfo, data = TRUE) +#' } +#' +#' @export +summary.saem.mmkin <- function(object, data = FALSE, verbose = FALSE, distimes = TRUE, ...) { + + mod_vars <- names(object$mkinmod$diffs) + + pnames <- names(object$mean_dp_start) + np <- length(pnames) + + conf.int <- object$so@results@conf.int + rownames(conf.int) <- conf.int$name + confint_trans <- as.matrix(conf.int[pnames, c("estimate", "lower", "upper")]) + colnames(confint_trans)[1] <- "est." + + # In case objects were produced by earlier versions of saem + if (is.null(object$transformations)) object$transformations <- "mkin" + + if (object$transformations == "mkin") { + bp <- backtransform_odeparms(confint_trans[, "est."], object$mkinmod, + object$transform_rates, object$transform_fractions) + bpnames <- names(bp) + + # Transform boundaries of CI for one parameter at a time, + # with the exception of sets of formation fractions (single fractions are OK). + f_names_skip <- character(0) + for (box in mod_vars) { # Figure out sets of fractions to skip + f_names <- grep(paste("^f", box, sep = "_"), pnames, value = TRUE) + n_paths <- length(f_names) + if (n_paths > 1) f_names_skip <- c(f_names_skip, f_names) + } + + confint_back <- matrix(NA, nrow = length(bp), ncol = 3, + dimnames = list(bpnames, colnames(confint_trans))) + confint_back[, "est."] <- bp + + for (pname in pnames) { + if (!pname %in% f_names_skip) { + par.lower <- confint_trans[pname, "lower"] + par.upper <- confint_trans[pname, "upper"] + names(par.lower) <- names(par.upper) <- pname + bpl <- backtransform_odeparms(par.lower, object$mkinmod, + object$transform_rates, + object$transform_fractions) + bpu <- backtransform_odeparms(par.upper, object$mkinmod, + object$transform_rates, + object$transform_fractions) + confint_back[names(bpl), "lower"] <- bpl + confint_back[names(bpu), "upper"] <- bpu + } + } + } else { + confint_back <- confint_trans + } + + # Correlation of fixed effects (inspired by summary.nlme) + varFix <- vcov(object$so)[1:np, 1:np] + stdFix <- sqrt(diag(varFix)) + object$corFixed <- array( + t(varFix/stdFix)/stdFix, + dim(varFix), + list(pnames, pnames)) + + # Random effects + rnames <- paste0("SD.", pnames) + confint_ranef <- as.matrix(conf.int[rnames, c("estimate", "lower", "upper")]) + colnames(confint_ranef)[1] <- "est." + + # Error model + enames <- if (object$err_mod == "const") "a.1" else c("a.1", "b.1") + confint_errmod <- as.matrix(conf.int[enames, c("estimate", "lower", "upper")]) + colnames(confint_errmod)[1] <- "est." + + + object$confint_trans <- confint_trans + object$confint_ranef <- confint_ranef + object$confint_errmod <- confint_errmod + object$confint_back <- confint_back + + object$date.summary = date() + object$use_of_ff = object$mkinmod$use_of_ff + object$error_model_algorithm = object$mmkin_orig[[1]]$error_model_algorithm + err_mod = object$mmkin_orig[[1]]$err_mod + + object$diffs <- object$mkinmod$diffs + object$print_data <- data # boolean: Should we print the data? + so_pred <- object$so@results@predictions + + names(object$data)[4] <- "observed" # rename value to observed + + object$verbose <- verbose + + object$fixed <- object$mmkin_orig[[1]]$fixed + object$AIC = AIC(object$so) + object$BIC = BIC(object$so) + object$logLik = logLik(object$so, method = "is") + + ep <- endpoints(object) + if (length(ep$ff) != 0) + object$ff <- ep$ff + if (distimes) object$distimes <- ep$distimes + if (length(ep$SFORB) != 0) object$SFORB <- ep$SFORB + class(object) <- c("summary.saem.mmkin") + return(object) +} + +#' @rdname summary.saem.mmkin +#' @export +print.summary.saem.mmkin <- function(x, digits = max(3, getOption("digits") - 3), verbose = x$verbose, ...) { + cat("saemix version used for fitting: ", x$saemixversion, "\n") + cat("mkin version used for pre-fitting: ", x$mkinversion, "\n") + cat("R version used for fitting: ", x$Rversion, "\n") + + cat("Date of fit: ", x$date.fit, "\n") + cat("Date of summary:", x$date.summary, "\n") + + cat("\nEquations:\n") + nice_diffs <- gsub("^(d.*) =", "\\1/dt =", x[["diffs"]]) + writeLines(strwrap(nice_diffs, exdent = 11)) + + cat("\nData:\n") + cat(nrow(x$data), "observations of", + length(unique(x$data$name)), "variable(s) grouped in", + length(unique(x$data$ds)), "datasets\n") + + cat("\nModel predictions using solution type", x$solution_type, "\n") + + cat("\nFitted in", x$time[["elapsed"]], "s using", paste(x$so@options$nbiter.saemix, collapse = ", "), "iterations\n") + + cat("\nVariance model: ") + cat(switch(x$err_mod, + const = "Constant variance", + obs = "Variance unique to each observed variable", + tc = "Two-component variance function"), "\n") + + cat("\nMean of starting values for individual parameters:\n") + print(x$mean_dp_start, digits = digits) + + cat("\nFixed degradation parameter values:\n") + if(length(x$fixed$value) == 0) cat("None\n") + else print(x$fixed, digits = digits) + + cat("\nResults:\n\n") + cat("Likelihood computed by importance sampling\n") + print(data.frame(AIC = x$AIC, BIC = x$BIC, logLik = x$logLik, + row.names = " "), digits = digits) + + cat("\nOptimised parameters:\n") + print(x$confint_trans, digits = digits) + + if (nrow(x$confint_trans) > 1) { + corr <- x$corFixed + class(corr) <- "correlation" + print(corr, title = "\nCorrelation:", ...) + } + + cat("\nRandom effects:\n") + print(x$confint_ranef, digits = digits) + + cat("\nVariance model:\n") + print(x$confint_errmod, digits = digits) + + if (x$transformations == "mkin") { + cat("\nBacktransformed parameters:\n") + print(x$confint_back, digits = digits) + } + + printSFORB <- !is.null(x$SFORB) + if(printSFORB){ + cat("\nEstimated Eigenvalues of SFORB model(s):\n") + print(x$SFORB, digits = digits,...) + } + + printff <- !is.null(x$ff) + if(printff){ + cat("\nResulting formation fractions:\n") + print(data.frame(ff = x$ff), digits = digits,...) + } + + printdistimes <- !is.null(x$distimes) + if(printdistimes){ + cat("\nEstimated disappearance times:\n") + print(x$distimes, digits = digits,...) + } + + if (x$print_data){ + cat("\nData:\n") + print(format(x$data, digits = digits, ...), row.names = FALSE) + } + + invisible(x) +} diff --git a/_pkgdown.yml b/_pkgdown.yml index f632ddb0..5cfaeedf 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,8 +1,8 @@ url: https://pkgdown.jrwb.de/mkin development: - mode: release - version_label: default + mode: devel + version_label: info template: bootswatch: spacelab @@ -39,10 +39,13 @@ reference: desc: Create and work with nonlinear mixed effects models contents: - nlme.mmkin + - saem.mmkin - plot.mixed.mmkin - summary.nlme.mmkin + - summary.saem.mmkin - nlme_function - get_deg_func + - saemix_model - mixed - title: Datasets and known results contents: diff --git a/build.log b/build.log index 09d94134..7a3b024e 100644 --- a/build.log +++ b/build.log @@ -6,5 +6,5 @@ * creating vignettes ... OK * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories -* building ‘mkin_1.0.1.tar.gz’ +* building ‘mkin_1.0.1.9000.tar.gz’ diff --git a/check.log b/check.log index d0aeb08a..58d4d6c7 100644 --- a/check.log +++ b/check.log @@ -5,10 +5,15 @@ * using options ‘--no-tests --as-cran’ * checking for file ‘mkin/DESCRIPTION’ ... OK * checking extension type ... Package -* this is package ‘mkin’ version ‘1.0.1’ +* this is package ‘mkin’ version ‘1.0.1.9000’ * package encoding: UTF-8 -* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers +* checking CRAN incoming feasibility ... NOTE Maintainer: ‘Johannes Ranke ’ + +Version contains large components (1.0.1.9000) + +Unknown, possibly mis-spelled, fields in DESCRIPTION: + ‘Remotes’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK @@ -67,5 +72,9 @@ Maintainer: ‘Johannes Ranke ’ * checking for detritus in the temp directory ... OK * DONE -Status: OK +Status: 1 NOTE +See + ‘/home/jranke/git/mkin/mkin.Rcheck/00check.log’ +for details. + diff --git a/docs/dev/404.html b/docs/dev/404.html index bea38406..5f29faf2 100644 --- a/docs/dev/404.html +++ b/docs/dev/404.html @@ -71,7 +71,7 @@ mkin - 0.9.50.4 + 1.0.1.9000 diff --git a/docs/dev/articles/index.html b/docs/dev/articles/index.html index 6daa6960..441d49c0 100644 --- a/docs/dev/articles/index.html +++ b/docs/dev/articles/index.html @@ -71,7 +71,7 @@ mkin - 0.9.50.4 + 1.0.1.9000 diff --git a/docs/dev/authors.html b/docs/dev/authors.html index d592b39f..9641eec0 100644 --- a/docs/dev/authors.html +++ b/docs/dev/authors.html @@ -71,7 +71,7 @@ mkin - 0.9.50.4 + 1.0.1.9000 @@ -147,15 +147,15 @@
  • Katrin Lindenberger. Contributor. -

    +
    contributed to mkinresplot()

  • René Lehmann. Contributor. -

    +
    ilr() and invilr()

  • Eurofins Regulatory AG. Copyright holder. -

    +
    copyright for some of the contributions of JR 2012-2014

  • diff --git a/docs/dev/index.html b/docs/dev/index.html index a4399963..8888633d 100644 --- a/docs/dev/index.html +++ b/docs/dev/index.html @@ -38,7 +38,7 @@ mkin - 0.9.50.4 + 1.0.1.9000 @@ -147,7 +147,7 @@
  • Three different error models can be selected using the argument error_model to the mkinfit function.
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as error_model = "obs".
  • A two-component error model similar to the one proposed by Rocke and Lorenzato can be selected using the argument error_model = "tc".
  • -
  • Nonlinear mixed-effects models can be created from fits of the same degradation model to different datasets for the same compound by using the nlme.mmkin method.
  • +
  • Nonlinear mixed-effects models can be created from fits of the same degradation model to different datasets for the same compound by using the nlme.mmkin method. Note that the convergence of the nlme fits depends on the quality of the data. Convergence is better for simple models and data for many groups (e.g. soils).
  • diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index c3597efe..998917f2 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -71,7 +71,7 @@ mkin - 0.9.50.4 + 1.0.1.9000
    @@ -141,13 +141,36 @@ Source: NEWS.md -
    -

    -mkin 0.9.50.4 (unreleased) Unreleased +
    +

    +mkin 1.0.1.9000 Unreleased

    -
    +
      +
    • Switch to a versioning scheme where the fourth version component indicates development versions

    • +
    • Reintroduce the interface to the current development version of saemix, in particular:

    • +
    • ‘saemix_model’ and ‘saemix_data’: Helper functions to set up nonlinear mixed-effects models for mmkin row objects

    • +
    • ‘saem’: generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods

    • +
    +
    +
    +

    +mkin 1.0.1 Unreleased +

    +
      +
    • ‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code in dontrun sections that failed with current defaults

    • +
    • ‘logLik.mkinfit’: Improve example code to avoid warnings and show convenient syntax

    • +
    • ‘mkinresplot’: Re-add Katrin Lindenberger as coauthor who was accidentally removed long ago

    • +
    • Remove tests relying on non-convergence of the FOMC fit to the FOCUS A dataset as this is platform dependent (revealed by the new additional tests on CRAN, thanks!)

    • +
    • Increase test tolerance for some parameter comparisons that also proved to be platform dependent

    • +
    +
    +
    +

    +mkin 1.0.0 2021-02-03 +

    +

    -General new features

    +General

    • ‘mkinmod’ models gain arguments ‘name’ and ‘dll_dir’ which, in conjunction with a current version of the ‘inline’ package, make it possible to still use the DLL used for fast ODE solutions with ‘deSolve’ after saving and restoring the ‘mkinmod’ object.

    • ‘mkindsg’ R6 class for groups of ‘mkinds’ datasets with metadata

    • @@ -156,6 +179,8 @@
    • ‘focus_soil_moisture’ FOCUS default soil moisture data

    • ‘update’ method for ‘mmkin’ objects

    • ‘transform_odeparms’, ‘backtransform_odeparms’: Use logit transformation for solitary fractions like the g parameter of the DFOP model, or formation fractions for a pathway to only one target variable

    • +
    • ‘plot.mmkin’: Add a ylab argument, making it possible to customize the y axis label of the panels on the left without affecting the residual plots. Reduce legend size and vertical distance between panels

    • +
    • ‘plot.mkinfit’: Change default ylab from “Observed” to “Residue”. Pass xlab to residual plot if show_residuals is TRUE.

    @@ -163,18 +188,14 @@ Mixed-effects models
    • ‘mixed.mmkin’ New container for mmkin objects for plotting with the ‘plot.mixed.mmkin’ method

    • -
    • ‘plot.mixed.mmkin’ method used for ‘nlme.mmkin’ and ‘saem.mmkin’, both inheriting from ‘mixed.mmkin’ (currently virtual)

    • +
    • ‘plot.mixed.mmkin’ method used for ‘nlme.mmkin’ inheriting from ‘mixed.mmkin’ (currently virtual)

    • ‘plot’, ‘summary’ and ‘print’ methods for ‘nlme.mmkin’ objects

    • -
    • Add the current development version of the saemix package as a second, optional backend for mixed-effects models

    • -
    • DESCRIPTION: Additional_repositories entry pointing to my drat repository on github for a suitable saemix version

    • -
    • ‘saemix_model’, ‘saemix_data’: Helper functions to fit nonlinear mixed-effects models for mmkin row objects.

    • -
    • ‘saem’ generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods

    -
    +

    -mkin 0.9.50.3 (2020-10-08) 2020-10-08 +mkin 0.9.50.3 (2020-10-08) 2020-10-08

    • ‘parms’: Add a method for mmkin objects

    • @@ -188,18 +209,18 @@
    • ‘endpoints’: Back-calculate DT50 value from DT90 also for the biphasic models DFOP, HS and SFORB

    -
    +

    -mkin 0.9.50.2 (2020-05-12) 2020-05-12 +mkin 0.9.50.2 (2020-05-12) 2020-05-12

    • Increase tolerance for a platform specific test results on the Solaris test machine on CRAN

    • Updates and corrections (using the spelling package) to the documentation

    -
    +

    -mkin 0.9.50.1 (2020-05-11) 2020-05-11 +mkin 0.9.50.1 (2020-05-11) 2020-05-11

    • Support SFORB with formation fractions

    • @@ -207,17 +228,17 @@
    • Improve performance by a) avoiding expensive calls in the cost function like merge() and data.frame(), and b) by implementing analytical solutions for SFO-SFO and DFOP-SFO

    -
    +

    -mkin 0.9.49.11 (2020-04-20) 2020-04-20 +mkin 0.9.49.11 (2020-04-20) 2020-04-20

    • Increase a test tolerance to make it pass on all CRAN check machines
    -
    +

    -mkin 0.9.49.10 (2020-04-18) 2020-04-18 +mkin 0.9.49.10 (2020-04-18) 2020-04-18

    • ‘nlme.mmkin’: An nlme method for mmkin row objects and an associated S3 class with print, plot, anova and endpoint methods

    • @@ -228,18 +249,18 @@
    • ‘summary.mkinfit’: Add AIC, BIC and log likelihood to the summary

    -
    +

    -mkin 0.9.49.9 (2020-03-31) 2020-03-31 +mkin 0.9.49.9 (2020-03-31) 2020-03-31

    • ‘mkinmod’: Use pkgbuild::has_compiler instead of Sys.which(‘gcc’), as the latter will often fail even if Rtools are installed

    • ‘mkinds’: Use roxygen for documenting fields and methods of this R6 class

    -
    +

    -mkin 0.9.49.8 (2020-01-09) 2020-01-09 +mkin 0.9.49.8 (2020-01-09) 2020-01-09

    • ‘aw’: Generic function for calculating Akaike weights, methods for mkinfit objects and mmkin columns

    • @@ -249,18 +270,18 @@
    • ‘confint.mkinfit’: Make the quadratic approximation the default, as the likelihood profiling takes a lot of time, especially if the fit has more than three parameters

    -
    +

    -mkin 0.9.49.7 (2019-11-01) 2019-11-02 +mkin 0.9.49.7 (2019-11-01) 2019-11-02

    • Fix a bug introduced in 0.9.49.6 that occurred if the direct optimisation yielded a higher likelihood than the three-step optimisation in the d_3 algorithm, which caused the fitted parameters of the three-step optimisation to be returned instead of the parameters of the direct optimisation

    • Add a ‘nobs’ method for mkinfit objects, enabling the default ‘BIC’ method from the stats package. Also, add a ‘BIC’ method for mmkin column objects.

    -
    +

    -mkin 0.9.49.6 (2019-10-31) 2019-10-31 +mkin 0.9.49.6 (2019-10-31) 2019-10-31

    • Implement a likelihood ratio test as a method for ‘lrtest’ from the lmtest package

    • @@ -278,9 +299,9 @@
    • Support summarizing ‘mkinfit’ objects generated with versions < 0.9.49.5

    -
    +

    -mkin 0.9.49.5 (2019-07-04) 2019-07-04 +mkin 0.9.49.5 (2019-07-04) 2019-07-04

    • Several algorithms for minimization of the negative log-likelihood for non-constant error models (two-component and variance by variable). In the case the error model is constant variance, least squares is used as this is more stable. The default algorithm ‘d_3’ tries direct minimization and a three-step procedure, and returns the model with the highest likelihood.

    • @@ -297,9 +318,9 @@
    • Add example datasets obtained from risk assessment reports published by the European Food Safety Agency.

    -
    +

    -mkin 0.9.48.1 (2019-03-04) 2019-03-04 +mkin 0.9.48.1 (2019-03-04) 2019-03-04

    • Add the function ‘logLik.mkinfit’ which makes it possible to calculate an AIC for mkinfit objects

    • @@ -314,9 +335,9 @@
    • ‘nafta’: Add evaluations according to the NAFTA guidance

    -
    +

    -mkin 0.9.47.5 (2018-09-14) 2018-09-14 +mkin 0.9.47.5 (2018-09-14) 2018-09-14

    • Make the two-component error model stop in cases where it is inadequate to avoid nls crashes on windows

    • @@ -324,27 +345,27 @@
    • Exclude more example code from testing on CRAN to avoid NOTES from long execution times

    -
    +

    -mkin 0.9.47.3 Unreleased +mkin 0.9.47.3 Unreleased

    • ‘mkinfit’: Improve fitting the error model for reweight.method = ‘tc’. Add ‘manual’ to possible arguments for ‘weight’

    • Test that FOCUS_2006_C can be evaluated with DFOP and reweight.method = ‘tc’

    -
    +

    -mkin 0.9.47.2 (2018-07-19) 2018-07-19 +mkin 0.9.47.2 (2018-07-19) 2018-07-19

    • ‘sigma_twocomp’: Rename ‘sigma_rl’ to ‘sigma_twocomp’ as the Rocke and Lorenzato model assumes lognormal distribution for large y. Correct references to the Rocke and Lorenzato model accordingly.

    • ‘mkinfit’: Use 1.1 as starting value for N parameter of IORE models to obtain convergence in more difficult cases. Show parameter names when ‘trace_parms’ is ‘TRUE’.

    -
    +

    -mkin 0.9.47.1 (2018-02-06) 2018-02-06 +mkin 0.9.47.1 (2018-02-06) 2018-02-06

    • Skip some tests on CRAN and winbuilder to avoid timeouts

    • @@ -355,27 +376,27 @@
    • ‘summary.mkinfit’: Show versions of mkin and R used for fitting (not the ones used for the summary) if the fit was generated with mkin >= 0.9.47.1

    -
    +

    -mkin 0.9.46.3 (2017-11-16) 2017-11-16 +mkin 0.9.46.3 (2017-11-16) 2017-11-16

    • README.md, vignettes/mkin.Rmd: URLs were updated

    • synthetic_data_for_UBA: Add the code used to generate the data in the interest of reproducibility

    -
    +

    -mkin 0.9.46.2 (2017-10-10) 2017-10-10 +mkin 0.9.46.2 (2017-10-10) 2017-10-10

    • Converted the vignette FOCUS_Z from tex/pdf to markdown/html

    • DESCRIPTION: Add ORCID

    -
    +

    -mkin 0.9.46.1 (2017-09-14) 2017-09-14 +mkin 0.9.46.1 (2017-09-14) 2017-09-14

    • plot.mkinfit: Fix scaling of residual plots for the case of separate plots for each observed variable

    • @@ -383,17 +404,17 @@
    • Documentation updates

    -
    +

    -mkin 0.9.46 (2017-07-24) 2017-07-29 +mkin 0.9.46 (2017-07-24) 2017-07-29

    • Remove test_FOMC_ill-defined.R as it is too platform dependent
    -
    +

    -mkin 0.9.45.2 (2017-07-24) 2017-07-22 +mkin 0.9.45.2 (2017-07-24) 2017-07-22

    • Rename twa to max_twa_parent to avoid conflict with twa from my pfm package

    • @@ -402,9 +423,9 @@
    • Switch from microbenchmark to rbenchmark as the former is not supported on all platforms

    -
    +

    -mkin 0.9.45.1 (2016-12-20) Unreleased +mkin 0.9.45.1 (2016-12-20) Unreleased

    @@ -414,9 +435,9 @@

    -
    +

    -mkin 0.9.45 (2016-12-08) 2016-12-08 +mkin 0.9.45 (2016-12-08) 2016-12-08

    @@ -428,9 +449,9 @@

    -
    +

    -mkin 0.9.44 (2016-06-29) 2016-06-29 +mkin 0.9.44 (2016-06-29) 2016-06-29

    @@ -440,9 +461,9 @@

    -
    +

    -mkin 0.9.43 (2016-06-28) 2016-06-28 +mkin 0.9.43 (2016-06-28) 2016-06-28

    @@ -479,9 +500,9 @@

    -
    +

    -mkin 0.9.42 (2016-03-25) 2016-03-25 +mkin 0.9.42 (2016-03-25) 2016-03-25

    @@ -500,9 +521,9 @@

    -
    +

    -mkin 0.9-41 (2015-11-09) 2015-11-09 +mkin 0.9-41 (2015-11-09) 2015-11-09

    @@ -523,9 +544,9 @@

    -
    +

    -mkin 0.9-40 (2015-07-21) 2015-07-21 +mkin 0.9-40 (2015-07-21) 2015-07-21

    @@ -544,9 +565,9 @@

    -
    +

    -mkin 0.9-39 (2015-06-26) 2015-06-26 +mkin 0.9-39 (2015-06-26) 2015-06-26

    @@ -565,9 +586,9 @@

    -
    +

    -mkin 0.9-38 (2015-06-24) 2015-06-23 +mkin 0.9-38 (2015-06-24) 2015-06-23

    @@ -586,9 +607,9 @@

    -
    +

    -mkin 0.9-36 (2015-06-21) 2015-06-21 +mkin 0.9-36 (2015-06-21) 2015-06-21

    @@ -608,9 +629,9 @@

    -
    +

    -mkin 0.9-35 (2015-05-15) 2015-05-15 +mkin 0.9-35 (2015-05-15) 2015-05-15

    @@ -640,9 +661,9 @@

    -
    +

    -mkin 0.9-34 (2014-11-22) 2014-11-22 +mkin 0.9-34 (2014-11-22) 2014-11-22

    @@ -662,9 +683,9 @@

    -
    +

    -mkin 0.9-33 (2014-10-22) 2014-10-12 +mkin 0.9-33 (2014-10-22) 2014-10-12

    @@ -695,9 +716,9 @@

    -
    +

    -mkin 0.9-32 (2014-07-24) 2014-07-24 +mkin 0.9-32 (2014-07-24) 2014-07-24

    @@ -705,7 +726,7 @@
    • The number of degrees of freedom is difficult to define in the case of ilr transformation of formation fractions. Now for each source compartment the number of ilr parameters (=number of optimised parameters) is divided by the number of pathways to metabolites (=number of affected data series) which leads to fractional degrees of freedom in some cases.

    • 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.

    • +
    • 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.

    • mkinfit gives a warning when the fit does not converge (does not apply to SANN method). This warning is included in the summary.

    • @@ -732,9 +753,9 @@

    -
    +

    -mkin 0.9-31 (2014-07-14) 2014-07-14 +mkin 0.9-31 (2014-07-14) 2014-07-14

    @@ -744,9 +765,9 @@

    -
    +

    -mkin 0.9-30 (2014-07-11) 2014-07-11 +mkin 0.9-30 (2014-07-11) 2014-07-11

    @@ -759,7 +780,7 @@

    Major changes

      -
    • The original and the transformed parameters now have different names (e.g. k_parent and log_k_parent. They also differ in how many they are when we have formation fractions but no pathway to sink.

    • +
    • The original and the transformed parameters now have different names (e.g. k_parent and log_k_parent. They also differ in how many they are when we have formation fractions but no pathway to sink.

    • The order of some of the information blocks in print.summary.mkinfit.R() has been ordered in a more logical way.

    @@ -776,9 +797,9 @@
    -
    +

    -mkin 0.9-29 (2014-06-27) 2014-06-27 +mkin 0.9-29 (2014-06-27) 2014-06-27

    • R/mkinresplot.R: Make it possible to specify xlim

    • @@ -786,9 +807,9 @@
    • R/endpoints.R, man/endpoints.Rd: Calculate additional (pseudo)-DT50 values for FOMC, DFOP, HS and SFORB. Avoid calculation of formation fractions from rate constants when they are directly fitted

    -
    +

    -mkin 0.9-28 (2014-05-20) 2014-05-20 +mkin 0.9-28 (2014-05-20) 2014-05-20

    • Do not backtransform confidence intervals for formation fractions if more than one compound is formed, as such parameters only define the pathways as a set

    • @@ -796,9 +817,9 @@
    • Correct ‘isotropic’ into ‘isometric’ for the ilr transformation

    -
    +

    -mkin 0.9-27 (2014-05-10) 2014-05-10 +mkin 0.9-27 (2014-05-10) 2014-05-10

    • Fork the GUI into a separate package gmkin

    • @@ -820,9 +841,9 @@
    • Add gmkin workspace datasets FOCUS_2006_gmkin and FOCUS_2006_Z_gmkin

    -
    +

    -mkin 0.9-24 (2013-11-06) 2013-11-06 +mkin 0.9-24 (2013-11-06) 2013-11-06

    • Bugfix re-enabling the fixing of any combination of initial values for state variables

    • @@ -830,9 +851,9 @@
    • Backtransform fixed ODE parameters for the summary

    -
    +

    -mkin 0.9-22 (2013-10-26) 2013-10-26 +mkin 0.9-22 (2013-10-26) 2013-10-26

    • Get rid of the optimisation step in mkinerrmin - this was unnecessary. Thanks to KinGUII for the inspiration - actually this is equation 6-2 in FOCUS kinetics p. 91 that I had overlooked originally

    • diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 2963e810..f9b16e29 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 2.2.1 +pandoc: 2.9.2.1 pkgdown: 1.6.1 pkgdown_sha: ~ articles: @@ -10,7 +10,7 @@ articles: web_only/NAFTA_examples: NAFTA_examples.html web_only/benchmarks: benchmarks.html web_only/compiled_models: compiled_models.html -last_built: 2021-01-25T13:41Z +last_built: 2021-02-06T17:26Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/Rplot001.png b/docs/dev/reference/Rplot001.png index bca41e2c..17a35806 100644 Binary files a/docs/dev/reference/Rplot001.png and b/docs/dev/reference/Rplot001.png differ diff --git a/docs/dev/reference/Rplot003.png b/docs/dev/reference/Rplot003.png index ff6bc722..2b011ec1 100644 Binary files a/docs/dev/reference/Rplot003.png and b/docs/dev/reference/Rplot003.png differ diff --git a/docs/dev/reference/Rplot005.png b/docs/dev/reference/Rplot005.png index 5e675828..8c91d61e 100644 Binary files a/docs/dev/reference/Rplot005.png and b/docs/dev/reference/Rplot005.png differ diff --git a/docs/dev/reference/Rplot006.png b/docs/dev/reference/Rplot006.png index da52f580..730a7481 100644 Binary files a/docs/dev/reference/Rplot006.png and b/docs/dev/reference/Rplot006.png differ diff --git a/docs/dev/reference/confint.mkinfit.html b/docs/dev/reference/confint.mkinfit.html index 515a7c9e..89bb3d89 100644 --- a/docs/dev/reference/confint.mkinfit.html +++ b/docs/dev/reference/confint.mkinfit.html @@ -79,7 +79,7 @@ method of Venzon and Moolgavkar (1988)." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -128,7 +128,7 @@ method of Venzon and Moolgavkar (1988)." />
    #> user system elapsed -#> 3.900 0.929 3.548
    # Using more cores does not save much time here, as parent_0 takes up most of the time +#> 4.258 0.916 3.889
    # Using more cores does not save much time here, as parent_0 takes up most of the time # If we additionally exclude parent_0 (the confidence of which is often of -# minor interest), we get a nice performance improvement from about 50 -# seconds to about 12 seconds if we use at least four cores +# minor interest), we get a nice performance improvement if we use at least 4 cores system.time(ci_profile_no_parent_0 <- confint(f_d_1, method = "profile", c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = n_cores)) -
    #> Profiling the likelihood
    #> Warning: scheduled cores 3, 2, 1 encountered errors in user code, all values of the jobs will be affected
    #> Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent
    #> Timing stopped at: 0.009 0.034 0.257
    ci_profile -
    #> 2.5% 97.5% -#> parent_0 96.456003640 1.027703e+02 -#> k_parent 0.090911032 1.071578e-01 -#> k_m1 0.003892606 6.702775e-03 -#> f_parent_to_m1 0.471328495 5.611550e-01 -#> sigma 2.535612399 3.985263e+00
    ci_quadratic_transformed <- confint(f_d_1, method = "quadratic") +
    #> Profiling the likelihood
    #> user system elapsed +#> 1.459 0.088 0.907
    ci_profile +
    #> 2.5% 97.5% +#> parent_0 96.456003640 1.027703e+02 +#> k_parent_sink 0.040762501 5.549764e-02 +#> k_parent_m1 0.046786482 5.500879e-02 +#> k_m1_sink 0.003892605 6.702778e-03 +#> sigma 2.535612399 3.985263e+00
    ci_quadratic_transformed <- confint(f_d_1, method = "quadratic") ci_quadratic_transformed -
    #> 2.5% 97.5% -#> parent_0 96.403833585 102.79311650 -#> k_parent 0.090823771 0.10725430 -#> k_m1 0.004012219 0.00689755 -#> f_parent_to_m1 0.469118824 0.55959615 -#> sigma 2.396089689 3.85491806
    ci_quadratic_untransformed <- confint(f_d_1, method = "quadratic", transformed = FALSE) +
    #> 2.5% 97.5% +#> parent_0 96.403841640 1.027931e+02 +#> k_parent_sink 0.041033378 5.596269e-02 +#> k_parent_m1 0.046777902 5.511931e-02 +#> k_m1_sink 0.004012217 6.897547e-03 +#> sigma 2.396089689 3.854918e+00
    ci_quadratic_untransformed <- confint(f_d_1, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed -
    #> 2.5% 97.5% -#> parent_0 96.403833589 1.027931e+02 -#> k_parent 0.090491913 1.069035e-01 -#> k_m1 0.003835485 6.685823e-03 -#> f_parent_to_m1 0.469113477 5.598387e-01 -#> sigma 2.396089689 3.854918e+00
    # Against the expectation based on Bates and Watts (1988), the confidence +
    #> 2.5% 97.5% +#> parent_0 96.403841645 102.79312449 +#> k_parent_sink 0.040485331 0.05535491 +#> k_parent_m1 0.046611582 0.05494364 +#> k_m1_sink 0.003835483 0.00668582 +#> sigma 2.396089689 3.85491806
    # Against the expectation based on Bates and Watts (1988), the confidence # intervals based on the internal parameter transformation are less # congruent with the likelihood based intervals. Note the superiority of the # interval based on the untransformed fit for k_m1_sink rel_diffs_transformed <- abs((ci_quadratic_transformed - ci_profile)/ci_profile) rel_diffs_untransformed <- abs((ci_quadratic_untransformed - ci_profile)/ci_profile) rel_diffs_transformed < rel_diffs_untransformed -
    #> 2.5% 97.5% -#> parent_0 FALSE FALSE -#> k_parent TRUE TRUE -#> k_m1 FALSE FALSE -#> f_parent_to_m1 TRUE FALSE -#> sigma TRUE FALSE
    signif(rel_diffs_transformed, 3) -
    #> 2.5% 97.5% -#> parent_0 0.000541 0.000222 -#> k_parent 0.000960 0.000900 -#> k_m1 0.030700 0.029100 -#> f_parent_to_m1 0.004690 0.002780 -#> sigma 0.055000 0.032700
    signif(rel_diffs_untransformed, 3) -
    #> 2.5% 97.5% -#> parent_0 0.000541 0.000222 -#> k_parent 0.004610 0.002370 -#> k_m1 0.014700 0.002530 -#> f_parent_to_m1 0.004700 0.002350 -#> sigma 0.055000 0.032700
    +
    #> 2.5% 97.5% +#> parent_0 FALSE FALSE +#> k_parent_sink TRUE FALSE +#> k_parent_m1 TRUE FALSE +#> k_m1_sink FALSE FALSE +#> sigma FALSE FALSE
    signif(rel_diffs_transformed, 3) +
    #> 2.5% 97.5% +#> parent_0 0.000541 0.000222 +#> k_parent_sink 0.006650 0.008380 +#> k_parent_m1 0.000183 0.002010 +#> k_m1_sink 0.030700 0.029100 +#> sigma 0.055000 0.032700
    signif(rel_diffs_untransformed, 3) +
    #> 2.5% 97.5% +#> parent_0 0.000541 0.000222 +#> k_parent_sink 0.006800 0.002570 +#> k_parent_m1 0.003740 0.001180 +#> k_m1_sink 0.014700 0.002530 +#> sigma 0.055000 0.032700
    # Investigate a case with formation fractions f_d_2 <- mkinfit(SFO_SFO.ff, subset(FOCUS_2006_D, value != 0), quiet = TRUE) @@ -348,14 +349,14 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> sigma 2.535612399 3.985263e+00
    ci_quadratic_transformed_ff <- confint(f_d_2, method = "quadratic") ci_quadratic_transformed_ff
    #> 2.5% 97.5% -#> parent_0 96.403833585 102.79311650 +#> parent_0 96.403833578 102.79311649 #> k_parent 0.090823771 0.10725430 #> k_m1 0.004012219 0.00689755 #> f_parent_to_m1 0.469118824 0.55959615 #> sigma 2.396089689 3.85491806
    ci_quadratic_untransformed_ff <- confint(f_d_2, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed_ff
    #> 2.5% 97.5% -#> parent_0 96.403833589 1.027931e+02 +#> parent_0 96.403833583 1.027931e+02 #> k_parent 0.090491913 1.069035e-01 #> k_m1 0.003835485 6.685823e-03 #> f_parent_to_m1 0.469113477 5.598387e-01 @@ -373,15 +374,15 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> f_parent_to_m1 TRUE FALSE #> sigma TRUE FALSE
    rel_diffs_transformed_ff
    #> 2.5% 97.5% -#> parent_0 0.0005408689 0.0002217234 +#> parent_0 0.0005408690 0.0002217233 #> k_parent 0.0009598532 0.0009001864 -#> k_m1 0.0307283044 0.0290588365 -#> f_parent_to_m1 0.0046881768 0.0027780063 +#> k_m1 0.0307283041 0.0290588361 +#> f_parent_to_m1 0.0046881769 0.0027780063 #> sigma 0.0550252516 0.0327066836
    rel_diffs_untransformed_ff
    #> 2.5% 97.5% -#> parent_0 0.0005408689 0.0002217233 -#> k_parent 0.0046102155 0.0023732281 -#> k_m1 0.0146740688 0.0025291817 +#> parent_0 0.0005408689 0.0002217232 +#> k_parent 0.0046102156 0.0023732281 +#> k_m1 0.0146740690 0.0025291820 #> f_parent_to_m1 0.0046995211 0.0023457712 #> sigma 0.0550252516 0.0327066836
    # The profiling for the following fit does not finish in a reasonable time, @@ -395,18 +396,18 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, error_model_algorithm = "direct", quiet = TRUE) confint(f_tc_2, method = "quadratic")
    #> 2.5% 97.5% -#> parent_0 94.596126334 106.19944007 -#> k_M1 0.037605408 0.04490759 -#> k_M2 0.008568739 0.01087675 -#> f_parent_to_M1 0.021463787 0.62023881 -#> f_parent_to_M2 0.015166531 0.37975349 -#> k1 0.273897467 0.33388084 -#> k2 0.018614555 0.02250379 -#> g 0.671943606 0.73583278 -#> sigma_low 0.251283766 0.83992113 -#> rsd_high 0.040411014 0.07662005
    confint(f_tc_2, "parent_0", method = "quadratic") +#> parent_0 94.596039609 106.19954892 +#> k_M1 0.037605368 0.04490762 +#> k_M2 0.008568731 0.01087676 +#> f_parent_to_M1 0.021462489 0.62023882 +#> f_parent_to_M2 0.015165617 0.37975348 +#> k1 0.273897348 0.33388101 +#> k2 0.018614554 0.02250378 +#> g 0.671943411 0.73583305 +#> sigma_low 0.251283495 0.83992077 +#> rsd_high 0.040411024 0.07662008
    confint(f_tc_2, "parent_0", method = "quadratic")
    #> 2.5% 97.5% -#> parent_0 94.59613 106.1994
    # } +#> parent_0 94.59604 106.1995
    # }
    @@ -127,7 +127,7 @@ advantage that the SFORB model can also be used for metabolites." />
    @@ -175,7 +175,7 @@ -

    mmkin()

    +

    mmkin() print(<mmkin>)

    Fit one or more kinetic models with one or more state variables to one or more datasets

    @@ -297,12 +297,6 @@ of an mmkin object

    AIC(<mmkin>) BIC(<mmkin>)

    Calculate the AIC for a column of an mmkin object

    - - - -

    print(<mmkin>)

    - -

    Print method for mmkin objects

    diff --git a/docs/dev/reference/logLik.mkinfit.html b/docs/dev/reference/logLik.mkinfit.html index 66539dbd..82c0654f 100644 --- a/docs/dev/reference/logLik.mkinfit.html +++ b/docs/dev/reference/logLik.mkinfit.html @@ -76,7 +76,7 @@ the error model." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -125,7 +125,7 @@ the error model." />
    #> Temporary DLL for differentials generated and loaded
    d_t <- FOCUS_2006_D +
    #> Temporary DLL for differentials generated and loaded
    d_t <- subset(FOCUS_2006_D, value != 0) f_nw <- mkinfit(sfo_sfo, d_t, quiet = TRUE) # no weighting (weights are unity) -
    #> Warning: Observations with value of zero were removed from the data
    f_obs <- mkinfit(sfo_sfo, d_t, error_model = "obs", quiet = TRUE) -
    #> Warning: Observations with value of zero were removed from the data
    f_tc <- mkinfit(sfo_sfo, d_t, error_model = "tc", quiet = TRUE) -
    #> Warning: Observations with value of zero were removed from the data
    AIC(f_nw, f_obs, f_tc) + f_obs <- update(f_nw, error_model = "obs") + f_tc <- update(f_nw, error_model = "tc") + AIC(f_nw, f_obs, f_tc)
    #> df AIC #> f_nw 5 204.4486 #> f_obs 6 205.8727 diff --git a/docs/dev/reference/mkinresplot.html b/docs/dev/reference/mkinresplot.html index 4b2f6bea..2e10d5f6 100644 --- a/docs/dev/reference/mkinresplot.html +++ b/docs/dev/reference/mkinresplot.html @@ -75,7 +75,7 @@ argument show_residuals = TRUE." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -124,7 +124,7 @@ argument show_residuals = TRUE." />

    Author

    -

    Johannes Ranke

    +

    Johannes Ranke and Katrin Lindenberger

    Examples

    diff --git a/docs/dev/reference/mmkin-1.png b/docs/dev/reference/mmkin-1.png index 7b7da90a..0db3379f 100644 Binary files a/docs/dev/reference/mmkin-1.png and b/docs/dev/reference/mmkin-1.png differ diff --git a/docs/dev/reference/mmkin-2.png b/docs/dev/reference/mmkin-2.png index ce2b2af4..024a9892 100644 Binary files a/docs/dev/reference/mmkin-2.png and b/docs/dev/reference/mmkin-2.png differ diff --git a/docs/dev/reference/mmkin-3.png b/docs/dev/reference/mmkin-3.png index bb96f1b2..a23d7cb9 100644 Binary files a/docs/dev/reference/mmkin-3.png and b/docs/dev/reference/mmkin-3.png differ diff --git a/docs/dev/reference/mmkin-4.png b/docs/dev/reference/mmkin-4.png index 351b21aa..89975db5 100644 Binary files a/docs/dev/reference/mmkin-4.png and b/docs/dev/reference/mmkin-4.png differ diff --git a/docs/dev/reference/mmkin-5.png b/docs/dev/reference/mmkin-5.png index c1c05eea..a2f34983 100644 Binary files a/docs/dev/reference/mmkin-5.png and b/docs/dev/reference/mmkin-5.png differ diff --git a/docs/dev/reference/mmkin.html b/docs/dev/reference/mmkin.html index 651eb9a6..65c91adf 100644 --- a/docs/dev/reference/mmkin.html +++ b/docs/dev/reference/mmkin.html @@ -75,7 +75,7 @@ datasets specified in its first two arguments." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -124,7 +124,7 @@ datasets specified in its first two arguments." />
    +) + +# S3 method for mmkin +print(x, ...)

    Arguments

    @@ -189,7 +192,11 @@ for parallel execution.

    - + + + + +
    ...

    Further arguments that will be passed to mkinfit.

    Not used.

    x

    An mmkin object.

    @@ -227,19 +234,19 @@ plotting.

    time_default
    #> user system elapsed -#> 4.968 0.427 1.342
    time_1 +#> 4.438 0.334 1.640
    time_1
    #> user system elapsed -#> 5.365 0.000 5.368
    +#> 5.535 0.004 5.539
    endpoints(fits.0[["SFO_lin", 2]])
    #> $ff #> parent_M1 parent_sink M1_M2 M1_sink -#> 0.7340478 0.2659522 0.7505687 0.2494313 +#> 0.7340481 0.2659519 0.7505683 0.2494317 #> #> $distimes #> DT50 DT90 #> parent 0.877769 2.915885 -#> M1 2.325746 7.725960 -#> M2 33.720083 112.015691 +#> M1 2.325744 7.725956 +#> M2 33.720100 112.015749 #>
    # plot.mkinfit handles rows or columns of mmkin result objects plot(fits.0[1, ]) @@ -266,12 +273,10 @@ plotting.

    #> dataset #> model A B C D #> SFO OK OK OK OK -#> FOMC C OK OK OK +#> FOMC OK OK OK OK #> DFOP OK OK OK OK #> -#> OK: No warnings -#> C: Optimisation did not converge: -#> false convergence (8)
    # We get false convergence for the FOMC fit to FOCUS_2006_A because this +#> OK: No warnings
    # We get false convergence for the FOMC fit to FOCUS_2006_A because this # dataset is really SFO, and the FOMC fit is overparameterised stopCluster(cl) # } diff --git a/docs/dev/reference/nlme.mmkin-1.png b/docs/dev/reference/nlme.mmkin-1.png index 25bebeca..9186c135 100644 Binary files a/docs/dev/reference/nlme.mmkin-1.png and b/docs/dev/reference/nlme.mmkin-1.png differ diff --git a/docs/dev/reference/nlme.mmkin-2.png b/docs/dev/reference/nlme.mmkin-2.png index c314c149..d395fe02 100644 Binary files a/docs/dev/reference/nlme.mmkin-2.png and b/docs/dev/reference/nlme.mmkin-2.png differ diff --git a/docs/dev/reference/nlme.mmkin-3.png b/docs/dev/reference/nlme.mmkin-3.png index a40b7cad..40518a59 100644 Binary files a/docs/dev/reference/nlme.mmkin-3.png and b/docs/dev/reference/nlme.mmkin-3.png differ diff --git a/docs/dev/reference/nlme.mmkin.html b/docs/dev/reference/nlme.mmkin.html index a4d7070a..2649c111 100644 --- a/docs/dev/reference/nlme.mmkin.html +++ b/docs/dev/reference/nlme.mmkin.html @@ -74,7 +74,7 @@ have been obtained by fitting the same model to a list of datasets." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -123,7 +123,7 @@ have been obtained by fitting the same model to a list of datasets." />
    #> Model df AIC BIC logLik Test L.Ratio p-value #> f_nlme_sfo 1 5 625.0539 637.5529 -307.5269 -#> f_nlme_dfop 2 9 495.1270 517.6253 -238.5635 1 vs 2 137.9268 <.0001
    print(f_nlme_dfop) +#> f_nlme_dfop 2 9 495.1270 517.6253 -238.5635 1 vs 2 137.9269 <.0001
    print(f_nlme_dfop)
    #> Kinetic nonlinear mixed-effects model fit by maximum likelihood #> #> Structural model: @@ -312,7 +318,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as
    endpoints(f_nlme_dfop)
    #> $distimes #> DT50 DT90 DT50back DT50_k1 DT50_k2 -#> parent 10.79857 100.7937 30.34192 4.193937 43.85442 +#> parent 10.79857 100.7937 30.34193 4.193938 43.85443 #>
    ds_2 <- lapply(experimental_data_for_UBA_2019[6:10], function(x) x$data[c("name", "time", "value")]) @@ -335,16 +341,17 @@ methods that will automatically work on 'nlme.mmkin' objects, such as # f_nlme_sfo_sfo_ff <- nlme(f_2["SFO-SFO-ff", ]) #plot(f_nlme_sfo_sfo_ff) - # With the log-Cholesky parameterization, this converges in 11 - # iterations and around 100 seconds, but without tweaking control - # parameters (with pdDiag, increasing the tolerance and pnlsMaxIter was - # necessary) - f_nlme_dfop_sfo <- nlme(f_2["DFOP-SFO", ]) -
    #> Error in nlme.formula(model = value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_A1, f_parent_qlogis, log_k1, log_k2, g_qlogis), data = structure(list(ds = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L ), .Label = c("1", "2", "3", "4", "5"), class = c("ordered", "factor")), name = c("parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1"), time = c(0, 0, 3, 3, 6, 6, 10, 10, 20, 20, 34, 34, 55, 55, 90, 90, 112, 112, 132, 132, 3, 3, 6, 6, 10, 10, 20, 20, 34, 34, 55, 55, 90, 90, 112, 112, 132, 132, 0, 0, 3, 3, 7, 7, 14, 14, 30, 30, 60, 60, 90, 90, 120, 120, 180, 180, 3, 3, 7, 7, 14, 14, 30, 30, 60, 60, 90, 90, 120, 120, 180, 180, 0, 0, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 0, 0, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 91, 91, 120, 120, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 91, 91, 120, 120, 0, 0, 8, 8, 14, 14, 21, 21, 41, 41, 63, 63, 91, 91, 120, 120, 8, 8, 14, 14, 21, 21, 41, 41, 63, 63, 91, 91, 120, 120), value = c(97.2, 96.4, 71.1, 69.2, 58.1, 56.6, 44.4, 43.4, 33.3, 29.2, 17.6, 18, 10.5, 9.3, 4.5, 4.7, 3, 3.4, 2.3, 2.7, 4.3, 4.6, 7, 7.2, 8.2, 8, 11, 13.7, 11.5, 12.7, 14.9, 14.5, 12.1, 12.3, 9.9, 10.2, 8.8, 7.8, 93.6, 92.3, 87, 82.2, 74, 73.9, 64.2, 69.5, 54, 54.6, 41.1, 38.4, 32.5, 35.5, 28.1, 29, 26.5, 27.6, 3.9, 3.1, 6.9, 6.6, 10.4, 8.3, 14.4, 13.7, 22.1, 22.3, 27.5, 25.4, 28, 26.6, 25.8, 25.3, 91.9, 90.8, 64.9, 66.2, 43.5, 44.1, 18.3, 18.1, 10.2, 10.8, 4.9, 3.3, 1.6, 1.5, 1.1, 0.9, 9.6, 7.7, 15, 15.1, 21.2, 21.1, 19.7, 18.9, 17.5, 15.9, 9.5, 9.8, 6.2, 6.1, 99.8, 98.3, 77.1, 77.2, 59, 58.1, 27.4, 29.2, 19.1, 29.6, 10.1, 18.2, 4.5, 9.1, 2.3, 2.9, 2, 1.8, 2, 2.2, 4.2, 3.9, 7.4, 7.9, 14.5, 13.7, 14.2, 12.2, 13.7, 13.2, 13.6, 15.4, 10.4, 11.6, 10, 9.5, 9.1, 9, 96.1, 94.3, 73.9, 73.9, 69.4, 73.1, 65.6, 65.3, 55.9, 54.4, 47, 49.3, 44.7, 46.7, 42.1, 41.3, 3.3, 3.4, 3.9, 2.9, 6.4, 7.2, 9.1, 8.5, 11.7, 12, 13.3, 13.2, 14.3, 12.1)), row.names = c(NA, -170L), class = c("nfnGroupedData", "nfGroupedData", "groupedData", "data.frame"), formula = value ~ time | ds, FUN = function (x) max(x, na.rm = TRUE), order.groups = FALSE), start = list( fixed = c(parent_0 = 93.8101519326534, log_k_A1 = -9.76474551635931, f_parent_qlogis = -0.971114801595408, log_k1 = -1.87993711571859, log_k2 = -4.27081421366622, g_qlogis = 0.135644115277507 ), random = list(ds = structure(c(2.56569977430371, -3.49441920289139, -3.32614443321494, 4.35347873814922, -0.0986148763466161, 4.65850590018027, 1.8618544764481, 6.12693257601545, 4.91792724701579, -17.5652201996596, -0.466203822618637, 0.746660653597927, 0.282193987271096, -0.42053488943072, -0.142115928819667, 0.369240076779088, -1.38985563501659, 1.02592753494098, 0.73090914081534, -0.736221117518819, 0.768170629350299, -1.89347658079869, 1.72168783460352, 0.844607177798114, -1.44098906095325, -0.377731855445672, 0.168180098477565, 0.469683412912104, 0.500717664434525, -0.760849320378522), .Dim = 5:6, .Dimnames = list(c("1", "2", "3", "4", "5"), c("parent_0", "log_k_A1", "f_parent_qlogis", "log_k1", "log_k2", "g_qlogis"))))), fixed = list(parent_0 ~ 1, log_k_A1 ~ 1, f_parent_qlogis ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1), random = structure(numeric(0), class = c("pdDiag", "pdMat"), formula = structure(list(parent_0 ~ 1, log_k_A1 ~ 1, f_parent_qlogis ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1), class = "listForm"), Dimnames = list(NULL, NULL))): maximum number of iterations (maxIter = 50) reached without convergence
    #> Timing stopped at: 49.95 16.5 44.08
    + # For the following, we need to increase pnlsMaxIter and the tolerance + # to get convergence + f_nlme_dfop_sfo <- nlme(f_2["DFOP-SFO", ], + control = list(pnlsMaxIter = 120, tolerance = 5e-4)) + plot(f_nlme_dfop_sfo) -
    #> Error in plot(f_nlme_dfop_sfo): object 'f_nlme_dfop_sfo' not found
    +
    anova(f_nlme_dfop_sfo, f_nlme_sfo_sfo) -
    #> Error in anova(f_nlme_dfop_sfo, f_nlme_sfo_sfo): object 'f_nlme_dfop_sfo' not found
    +
    #> Model df AIC BIC logLik Test L.Ratio p-value +#> f_nlme_dfop_sfo 1 13 843.8548 884.6201 -408.9274 +#> f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3273 <.0001
    endpoints(f_nlme_sfo_sfo)
    #> $ff #> parent_sink parent_A1 A1_sink @@ -355,7 +362,15 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> parent 19.13518 63.5657 #> A1 66.02155 219.3189 #>
    endpoints(f_nlme_dfop_sfo) -
    #> Error in endpoints(f_nlme_dfop_sfo): object 'f_nlme_dfop_sfo' not found
    +
    #> $ff +#> parent_A1 parent_sink +#> 0.2768575 0.7231425 +#> +#> $distimes +#> DT50 DT90 DT50back DT50_k1 DT50_k2 +#> parent 11.07091 104.6320 31.49737 4.462384 46.20825 +#> A1 162.30492 539.1653 NA NA NA +#>
    if (length(findFunction("varConstProp")) > 0) { # tc error model for nlme available # Attempts to fit metabolite kinetics with the tc error model are possible, # but need tweeking of control values and sometimes do not converge @@ -381,7 +396,7 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> Fixed effects: #> list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) #> parent_0 log_k1 log_k2 g_qlogis -#> 94.04775 -1.82340 -4.16715 0.05685 +#> 94.04774 -1.82340 -4.16716 0.05686 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) @@ -395,10 +410,8 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> Formula: ~fitted(.) #> Parameter estimates: #> const prop -#> 2.23224114 0.01262341
    - f_2_obs <- mmkin(list("SFO-SFO" = m_sfo_sfo, - "DFOP-SFO" = m_dfop_sfo), - ds_2, quiet = TRUE, error_model = "obs") +#> 2.23223147 0.01262395
    + f_2_obs <- update(f_2, error_model = "obs") f_nlme_sfo_sfo_obs <- nlme(f_2_obs["SFO-SFO", ]) print(f_nlme_sfo_sfo_obs)
    #> Kinetic nonlinear mixed-effects model fit by maximum likelihood @@ -429,18 +442,21 @@ methods that will automatically work on 'nlme.mmkin' objects, such as #> Formula: ~1 | name #> Parameter estimates: #> parent A1 -#> 1.0000000 0.2050003
    f_nlme_dfop_sfo_obs <- nlme(f_2_obs["DFOP-SFO", ]) -
    #> Error in nlme.formula(model = value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_A1, f_parent_qlogis, log_k1, log_k2, g_qlogis), data = structure(list(ds = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L ), .Label = c("1", "2", "3", "4", "5"), class = c("ordered", "factor")), name = c("parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "parent", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1", "A1"), time = c(0, 0, 3, 3, 6, 6, 10, 10, 20, 20, 34, 34, 55, 55, 90, 90, 112, 112, 132, 132, 3, 3, 6, 6, 10, 10, 20, 20, 34, 34, 55, 55, 90, 90, 112, 112, 132, 132, 0, 0, 3, 3, 7, 7, 14, 14, 30, 30, 60, 60, 90, 90, 120, 120, 180, 180, 3, 3, 7, 7, 14, 14, 30, 30, 60, 60, 90, 90, 120, 120, 180, 180, 0, 0, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 0, 0, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 91, 91, 120, 120, 1, 1, 3, 3, 8, 8, 14, 14, 27, 27, 48, 48, 70, 70, 91, 91, 120, 120, 0, 0, 8, 8, 14, 14, 21, 21, 41, 41, 63, 63, 91, 91, 120, 120, 8, 8, 14, 14, 21, 21, 41, 41, 63, 63, 91, 91, 120, 120), value = c(97.2, 96.4, 71.1, 69.2, 58.1, 56.6, 44.4, 43.4, 33.3, 29.2, 17.6, 18, 10.5, 9.3, 4.5, 4.7, 3, 3.4, 2.3, 2.7, 4.3, 4.6, 7, 7.2, 8.2, 8, 11, 13.7, 11.5, 12.7, 14.9, 14.5, 12.1, 12.3, 9.9, 10.2, 8.8, 7.8, 93.6, 92.3, 87, 82.2, 74, 73.9, 64.2, 69.5, 54, 54.6, 41.1, 38.4, 32.5, 35.5, 28.1, 29, 26.5, 27.6, 3.9, 3.1, 6.9, 6.6, 10.4, 8.3, 14.4, 13.7, 22.1, 22.3, 27.5, 25.4, 28, 26.6, 25.8, 25.3, 91.9, 90.8, 64.9, 66.2, 43.5, 44.1, 18.3, 18.1, 10.2, 10.8, 4.9, 3.3, 1.6, 1.5, 1.1, 0.9, 9.6, 7.7, 15, 15.1, 21.2, 21.1, 19.7, 18.9, 17.5, 15.9, 9.5, 9.8, 6.2, 6.1, 99.8, 98.3, 77.1, 77.2, 59, 58.1, 27.4, 29.2, 19.1, 29.6, 10.1, 18.2, 4.5, 9.1, 2.3, 2.9, 2, 1.8, 2, 2.2, 4.2, 3.9, 7.4, 7.9, 14.5, 13.7, 14.2, 12.2, 13.7, 13.2, 13.6, 15.4, 10.4, 11.6, 10, 9.5, 9.1, 9, 96.1, 94.3, 73.9, 73.9, 69.4, 73.1, 65.6, 65.3, 55.9, 54.4, 47, 49.3, 44.7, 46.7, 42.1, 41.3, 3.3, 3.4, 3.9, 2.9, 6.4, 7.2, 9.1, 8.5, 11.7, 12, 13.3, 13.2, 14.3, 12.1)), row.names = c(NA, -170L), class = c("nfnGroupedData", "nfGroupedData", "groupedData", "data.frame"), formula = value ~ time | ds, FUN = function (x) max(x, na.rm = TRUE), order.groups = FALSE), start = list( fixed = c(parent_0 = 93.4272167134207, log_k_A1 = -9.71590717106959, f_parent_qlogis = -0.953712099744438, log_k1 = -1.95256957646888, log_k2 = -4.42919226610318, g_qlogis = 0.193023137298073 ), random = list(ds = structure(c(2.85557330683041, -3.87630303729395, -2.78062140212751, 4.82042042600536, -1.01906929341432, 4.613992019697, 2.05871276943309, 6.0766404049189, 4.86471337131288, -17.6140585653619, -0.480721175257541, 0.773079218835614, 0.260464433006093, -0.440615012802434, -0.112207463781733, 0.445812953745225, -1.49588630006094, 1.13602040717272, 0.801850880762046, -0.887797941619048, 0.936480292463262, -2.43093808171905, 1.91256225793793, 0.984827519864443, -1.40293198854659, -0.455176326336681, 0.376355651864385, 0.343919720700401, 0.46329187713133, -0.728390923359434 ), .Dim = 5:6, .Dimnames = list(c("1", "2", "3", "4", "5"), c("parent_0", "log_k_A1", "f_parent_qlogis", "log_k1", "log_k2", "g_qlogis"))))), fixed = list(parent_0 ~ 1, log_k_A1 ~ 1, f_parent_qlogis ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1), random = structure(numeric(0), class = c("pdDiag", "pdMat"), formula = structure(list(parent_0 ~ 1, log_k_A1 ~ 1, f_parent_qlogis ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1), class = "listForm"), Dimnames = list(NULL, NULL)), weights = structure(numeric(0), formula = ~1 | name, class = c("varIdent", "varFunc"))): maximum number of iterations (maxIter = 50) reached without convergence
    #> Timing stopped at: 59.38 16.5 53.5
    - f_2_tc <- mmkin(list("SFO-SFO" = m_sfo_sfo, - "DFOP-SFO" = m_dfop_sfo), - ds_2, quiet = TRUE, error_model = "tc") - # f_nlme_sfo_sfo_tc <- nlme(f_2_tc["SFO-SFO", ]) # stops with error message - f_nlme_dfop_sfo_tc <- nlme(f_2_tc["DFOP-SFO", ]) -
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Warning: longer object length is not a multiple of shorter object length
    #> Error in X[, fmap[[nm]]] <- gradnm: number of items to replace is not a multiple of replacement length
    #> Timing stopped at: 6.363 2.688 5.469
    # We get warnings about false convergence in the LME step in several iterations - # but as the last such warning occurs in iteration 25 and we have 28 iterations - # we can ignore these - anova(f_nlme_dfop_sfo, f_nlme_dfop_sfo_obs, f_nlme_dfop_sfo_tc) -
    #> Error in anova(f_nlme_dfop_sfo, f_nlme_dfop_sfo_obs, f_nlme_dfop_sfo_tc): object 'f_nlme_dfop_sfo' not found
    +#> 1.0000000 0.2049995
    f_nlme_dfop_sfo_obs <- nlme(f_2_obs["DFOP-SFO", ], + control = list(pnlsMaxIter = 120, tolerance = 5e-4)) + + f_2_tc <- update(f_2, error_model = "tc") + # f_nlme_sfo_sfo_tc <- nlme(f_2_tc["SFO-SFO", ]) # No convergence with 50 iterations + # f_nlme_dfop_sfo_tc <- nlme(f_2_tc["DFOP-SFO", ], + # control = list(pnlsMaxIter = 120, tolerance = 5e-4)) # Error in X[, fmap[[nm]]] <- gradnm + + anova(f_nlme_dfop_sfo, f_nlme_dfop_sfo_obs) +
    #> Model df AIC BIC logLik Test L.Ratio +#> f_nlme_dfop_sfo 1 13 843.8548 884.6201 -408.9274 +#> f_nlme_dfop_sfo_obs 2 14 817.5338 861.4350 -394.7669 1 vs 2 28.32093 +#> p-value +#> f_nlme_dfop_sfo +#> f_nlme_dfop_sfo_obs <.0001
    # }
    diff --git a/docs/dev/reference/plot.mixed.mmkin-1.png b/docs/dev/reference/plot.mixed.mmkin-1.png index 5cb33214..9c9a2211 100644 Binary files a/docs/dev/reference/plot.mixed.mmkin-1.png and b/docs/dev/reference/plot.mixed.mmkin-1.png differ diff --git a/docs/dev/reference/plot.mixed.mmkin-2.png b/docs/dev/reference/plot.mixed.mmkin-2.png index c0d67204..0f66ff0f 100644 Binary files a/docs/dev/reference/plot.mixed.mmkin-2.png and b/docs/dev/reference/plot.mixed.mmkin-2.png differ diff --git a/docs/dev/reference/plot.mixed.mmkin-3.png b/docs/dev/reference/plot.mixed.mmkin-3.png index 5e00afe6..34212f1c 100644 Binary files a/docs/dev/reference/plot.mixed.mmkin-3.png and b/docs/dev/reference/plot.mixed.mmkin-3.png differ diff --git a/docs/dev/reference/plot.mixed.mmkin-4.png b/docs/dev/reference/plot.mixed.mmkin-4.png index 6a5f3b9c..c1450d24 100644 Binary files a/docs/dev/reference/plot.mixed.mmkin-4.png and b/docs/dev/reference/plot.mixed.mmkin-4.png differ diff --git a/docs/dev/reference/plot.mixed.mmkin.html b/docs/dev/reference/plot.mixed.mmkin.html index 55c411e7..601e1554 100644 --- a/docs/dev/reference/plot.mixed.mmkin.html +++ b/docs/dev/reference/plot.mixed.mmkin.html @@ -72,7 +72,7 @@ mkin - 0.9.50.4 + 1.0.1.9000
    @@ -161,7 +161,7 @@ maxabs = "auto", ncol.legend = ifelse(length(i) <= 3, length(i) + 1, ifelse(length(i) <= 8, 3, 4)), nrow.legend = ceiling((length(i) + 1)/ncol.legend), - rel.height.legend = 0.03 + 0.08 * nrow.legend, + rel.height.legend = 0.02 + 0.07 * nrow.legend, rel.height.bottom = 1.1, pch_ds = 1:length(i), col_ds = pch_ds + 1, @@ -283,10 +283,10 @@ corresponding model prediction lines for the different datasets.

    f_saem <- saem(f, transformations = "saemix")
    #> Running main SAEM algorithm -#> [1] "Mon Dec 21 05:58:23 2020" +#> [1] "Sat Feb 6 18:29:17 2021" #> .... #> Minimisation finished -#> [1] "Mon Dec 21 05:58:30 2020"
    plot(f_saem) +#> [1] "Sat Feb 6 18:29:23 2021"
    plot(f_saem)
    # We can overlay the two variants if we generate predictions pred_nlme <- mkinpredict(dfop_sfo, diff --git a/docs/dev/reference/saem-3.png b/docs/dev/reference/saem-3.png index 6a32cda1..4474b1f1 100644 Binary files a/docs/dev/reference/saem-3.png and b/docs/dev/reference/saem-3.png differ diff --git a/docs/dev/reference/saem-5.png b/docs/dev/reference/saem-5.png index 6e6e0f91..27ed3f8f 100644 Binary files a/docs/dev/reference/saem-5.png and b/docs/dev/reference/saem-5.png differ diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html index 59589378..4578db2a 100644 --- a/docs/dev/reference/saem.html +++ b/docs/dev/reference/saem.html @@ -74,7 +74,7 @@ Expectation Maximisation algorithm (SAEM)." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -261,27 +261,27 @@ using mmkin.

    state.ini = c(parent = 100), fixed_initials = "parent", quiet = TRUE) f_saem_p0_fixed <- saem(f_mmkin_parent_p0_fixed)
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:41:42 2021" +#> [1] "Sat Feb 6 18:29:26 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:41:43 2021"
    +#> [1] "Sat Feb 6 18:29:27 2021"
    f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) f_saem_sfo <- saem(f_mmkin_parent["SFO", ])
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:41:45 2021" +#> [1] "Sat Feb 6 18:29:28 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:41:46 2021"
    f_saem_fomc <- saem(f_mmkin_parent["FOMC", ]) +#> [1] "Sat Feb 6 18:29:30 2021"
    f_saem_fomc <- saem(f_mmkin_parent["FOMC", ])
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:41:47 2021" +#> [1] "Sat Feb 6 18:29:30 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:41:49 2021"
    f_saem_dfop <- saem(f_mmkin_parent["DFOP", ]) +#> [1] "Sat Feb 6 18:29:32 2021"
    f_saem_dfop <- saem(f_mmkin_parent["DFOP", ])
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:41:49 2021" +#> [1] "Sat Feb 6 18:29:32 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:41:52 2021"
    +#> [1] "Sat Feb 6 18:29:35 2021"
    # The returned saem.mmkin object contains an SaemixObject, therefore we can use # functions from saemix library(saemix) @@ -324,10 +324,10 @@ using mmkin.

    f_mmkin_parent_tc <- update(f_mmkin_parent, error_model = "tc") f_saem_fomc_tc <- saem(f_mmkin_parent_tc["FOMC", ])
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:41:55 2021" +#> [1] "Sat Feb 6 18:29:37 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:42:00 2021"
    compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)) +#> [1] "Sat Feb 6 18:29:42 2021"
    compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so))
    #> Error in compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)): 'compare.saemix' requires at least two models.
    sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) @@ -346,15 +346,15 @@ using mmkin.

    # four minutes f_saem_sfo_sfo <- saem(f_mmkin["SFO-SFO", ])
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:42:02 2021" +#> [1] "Sat Feb 6 18:29:44 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:42:07 2021"
    f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ]) +#> [1] "Sat Feb 6 18:29:48 2021"
    f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ])
    #> Running main SAEM algorithm -#> [1] "Mon Jan 25 14:42:08 2021" +#> [1] "Sat Feb 6 18:29:49 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 25 14:42:17 2021"
    # We can use print, plot and summary methods to check the results +#> [1] "Sat Feb 6 18:29:57 2021"
    # We can use print, plot and summary methods to check the results print(f_saem_dfop_sfo)
    #> Kinetic nonlinear mixed-effects model fit by SAEM #> Structural model: @@ -395,10 +395,10 @@ using mmkin.

    #> SD.g_qlogis 0.44771 -0.86417 1.7596
    plot(f_saem_dfop_sfo)
    summary(f_saem_dfop_sfo, data = TRUE)
    #> saemix version used for fitting: 3.1.9000 -#> mkin version used for pre-fitting: 0.9.50.4 +#> mkin version used for pre-fitting: 1.0.1.9000 #> R version used for fitting: 4.0.3 -#> Date of fit: Mon Jan 25 14:42:18 2021 -#> Date of summary: Mon Jan 25 14:42:18 2021 +#> Date of fit: Sat Feb 6 18:29:57 2021 +#> Date of summary: Sat Feb 6 18:29:58 2021 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -413,7 +413,7 @@ using mmkin.

    #> #> Model predictions using solution type analytical #> -#> Fitted in 9.954 s using 300, 100 iterations +#> Fitted in 8.539 s using 300, 100 iterations #> #> Variance model: Constant variance #> @@ -489,12 +489,12 @@ using mmkin.

    #> Dataset 6 parent 3 69.2 71.32042 2.12042 1.883 1.125873 #> Dataset 6 parent 6 58.1 56.45256 -1.64744 1.883 -0.874739 #> Dataset 6 parent 6 56.6 56.45256 -0.14744 1.883 -0.078288 -#> Dataset 6 parent 10 44.4 44.48523 0.08523 1.883 0.045256 +#> Dataset 6 parent 10 44.4 44.48523 0.08523 1.883 0.045257 #> Dataset 6 parent 10 43.4 44.48523 1.08523 1.883 0.576224 #> Dataset 6 parent 20 33.3 29.75774 -3.54226 1.883 -1.880826 #> Dataset 6 parent 20 29.2 29.75774 0.55774 1.883 0.296141 #> Dataset 6 parent 34 17.6 19.35710 1.75710 1.883 0.932966 -#> Dataset 6 parent 34 18.0 19.35710 1.35710 1.883 0.720578 +#> Dataset 6 parent 34 18.0 19.35710 1.35710 1.883 0.720579 #> Dataset 6 parent 55 10.5 10.48443 -0.01557 1.883 -0.008266 #> Dataset 6 parent 55 9.3 10.48443 1.18443 1.883 0.628895 #> Dataset 6 parent 90 4.5 3.78622 -0.71378 1.883 -0.378995 @@ -560,9 +560,9 @@ using mmkin.

    #> Dataset 8 parent 1 64.9 67.73197 2.83197 1.883 1.503686 #> Dataset 8 parent 1 66.2 67.73197 1.53197 1.883 0.813428 #> Dataset 8 parent 3 43.5 41.58448 -1.91552 1.883 -1.017081 -#> Dataset 8 parent 3 44.1 41.58448 -2.51552 1.883 -1.335661 +#> Dataset 8 parent 3 44.1 41.58448 -2.51552 1.883 -1.335662 #> Dataset 8 parent 8 18.3 19.62286 1.32286 1.883 0.702395 -#> Dataset 8 parent 8 18.1 19.62286 1.52286 1.883 0.808589 +#> Dataset 8 parent 8 18.1 19.62286 1.52286 1.883 0.808588 #> Dataset 8 parent 14 10.2 10.77819 0.57819 1.883 0.306999 #> Dataset 8 parent 14 10.8 10.77819 -0.02181 1.883 -0.011582 #> Dataset 8 parent 27 4.9 3.26977 -1.63023 1.883 -0.865599 @@ -575,13 +575,13 @@ using mmkin.

    #> Dataset 8 A1 1 7.7 7.61539 -0.08461 1.883 -0.044923 #> Dataset 8 A1 3 15.0 15.47954 0.47954 1.883 0.254622 #> Dataset 8 A1 3 15.1 15.47954 0.37954 1.883 0.201525 -#> Dataset 8 A1 8 21.2 20.22616 -0.97384 1.883 -0.517076 +#> Dataset 8 A1 8 21.2 20.22616 -0.97384 1.883 -0.517075 #> Dataset 8 A1 8 21.1 20.22616 -0.87384 1.883 -0.463979 #> Dataset 8 A1 14 19.7 20.00067 0.30067 1.883 0.159645 #> Dataset 8 A1 14 18.9 20.00067 1.10067 1.883 0.584419 -#> Dataset 8 A1 27 17.5 16.38142 -1.11858 1.883 -0.593929 -#> Dataset 8 A1 27 15.9 16.38142 0.48142 1.883 0.255619 -#> Dataset 8 A1 48 9.5 10.25357 0.75357 1.883 0.400123 +#> Dataset 8 A1 27 17.5 16.38142 -1.11858 1.883 -0.593928 +#> Dataset 8 A1 27 15.9 16.38142 0.48142 1.883 0.255620 +#> Dataset 8 A1 48 9.5 10.25357 0.75357 1.883 0.400124 #> Dataset 8 A1 48 9.8 10.25357 0.45357 1.883 0.240833 #> Dataset 8 A1 70 6.2 5.95728 -0.24272 1.883 -0.128878 #> Dataset 8 A1 70 6.1 5.95728 -0.14272 1.883 -0.075781 @@ -622,7 +622,7 @@ using mmkin.

    #> Dataset 9 A1 91 10.0 10.09177 0.09177 1.883 0.048727 #> Dataset 9 A1 91 9.5 10.09177 0.59177 1.883 0.314211 #> Dataset 9 A1 120 9.1 7.91379 -1.18621 1.883 -0.629841 -#> Dataset 9 A1 120 9.0 7.91379 -1.08621 1.883 -0.576745 +#> Dataset 9 A1 120 9.0 7.91379 -1.08621 1.883 -0.576744 #> Dataset 10 parent 0 96.1 93.65257 -2.44743 1.883 -1.299505 #> Dataset 10 parent 0 94.3 93.65257 -0.64743 1.883 -0.343763 #> Dataset 10 parent 8 73.9 77.85906 3.95906 1.883 2.102132 diff --git a/docs/dev/reference/summary.saem.mmkin.html b/docs/dev/reference/summary.saem.mmkin.html index 722415fb..93e1365d 100644 --- a/docs/dev/reference/summary.saem.mmkin.html +++ b/docs/dev/reference/summary.saem.mmkin.html @@ -76,7 +76,7 @@ endpoints such as formation fractions and DT50 values. Optionally mkin - 0.9.50.4 + 1.0.1.9000
    @@ -260,15 +260,15 @@ saemix authors for the parts inherited from saemix.

    quiet = TRUE, error_model = "tc", cores = 5) f_saem_dfop_sfo <- saem(f_mmkin_dfop_sfo)
    #> Running main SAEM algorithm -#> [1] "Mon Jan 11 12:42:40 2021" +#> [1] "Sat Feb 6 18:30:00 2021" #> .... #> Minimisation finished -#> [1] "Mon Jan 11 12:42:53 2021"
    summary(f_saem_dfop_sfo, data = TRUE) +#> [1] "Sat Feb 6 18:30:11 2021"
    summary(f_saem_dfop_sfo, data = TRUE)
    #> saemix version used for fitting: 3.1.9000 -#> mkin version used for pre-fitting: 0.9.50.4 +#> mkin version used for pre-fitting: 1.0.1.9000 #> R version used for fitting: 4.0.3 -#> Date of fit: Mon Jan 11 12:42:54 2021 -#> Date of summary: Mon Jan 11 12:42:54 2021 +#> Date of fit: Sat Feb 6 18:30:12 2021 +#> Date of summary: Sat Feb 6 18:30:12 2021 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -283,7 +283,7 @@ saemix authors for the parts inherited from saemix.

    #> #> Model predictions using solution type analytical #> -#> Fitted in 13.298 s using 300, 100 iterations +#> Fitted in 11.769 s using 300, 100 iterations #> #> Variance model: Two-component variance function #> @@ -291,7 +291,7 @@ saemix authors for the parts inherited from saemix.

    #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 #> 101.65645 -4.05368 -0.94311 -2.35943 -4.07006 #> g_qlogis -#> -0.01133 +#> -0.01132 #> #> Fixed degradation parameter values: #> None @@ -299,232 +299,232 @@ saemix authors for the parts inherited from saemix.

    #> Results: #> #> Likelihood computed by importance sampling -#> AIC BIC logLik -#> 830 824.5 -401 +#> AIC BIC logLik +#> 829.3 823.9 -400.7 #> #> Optimised parameters: -#> est. lower upper -#> parent_0 101.4423 97.862 105.0224 -#> log_k_m1 -4.0703 -4.191 -3.9495 -#> f_parent_qlogis -0.9539 -1.313 -0.5949 -#> log_k1 -2.9724 -3.811 -2.1342 -#> log_k2 -3.4977 -4.206 -2.7895 -#> g_qlogis -0.0449 -1.116 1.0262 +#> est. lower upper +#> parent_0 101.29457 97.855 104.7344 +#> log_k_m1 -4.06337 -4.182 -3.9445 +#> f_parent_qlogis -0.94546 -1.307 -0.5841 +#> log_k1 -2.98794 -3.844 -2.1321 +#> log_k2 -3.47891 -4.253 -2.7050 +#> g_qlogis -0.03211 -1.157 1.0931 #> #> Correlation: #> prnt_0 lg_k_1 f_prn_ log_k1 log_k2 -#> log_k_m1 -0.207 -#> f_parent_qlogis -0.148 0.202 -#> log_k1 0.040 -0.038 -0.022 -#> log_k2 0.022 -0.015 -0.009 0.001 -#> g_qlogis -0.012 0.005 0.011 -0.173 -0.130 +#> log_k_m1 -0.202 +#> f_parent_qlogis -0.145 0.195 +#> log_k1 0.094 -0.099 -0.049 +#> log_k2 -0.042 0.056 0.024 -0.097 +#> g_qlogis -0.005 0.000 0.007 -0.160 -0.113 #> #> Random effects: -#> est. lower upper -#> SD.parent_0 2.88564 -0.5163 6.2876 -#> SD.log_k_m1 0.08502 -0.0427 0.2127 -#> SD.f_parent_qlogis 0.38857 0.1350 0.6421 -#> SD.log_k1 0.92338 0.3296 1.5172 -#> SD.log_k2 0.78644 0.2817 1.2912 -#> SD.g_qlogis 0.34614 -0.8727 1.5650 +#> est. lower upper +#> SD.parent_0 2.70085 -0.64980 6.0515 +#> SD.log_k_m1 0.08408 -0.04023 0.2084 +#> SD.f_parent_qlogis 0.39215 0.13695 0.6473 +#> SD.log_k1 0.89280 0.27466 1.5109 +#> SD.log_k2 0.82387 0.26388 1.3838 +#> SD.g_qlogis 0.36468 -0.86978 1.5991 #> #> Variance model: #> est. lower upper -#> a.1 0.65859 0.49250 0.82469 -#> b.1 0.06411 0.05006 0.07817 +#> a.1 0.65724 0.49361 0.82086 +#> b.1 0.06434 0.05034 0.07835 #> #> Backtransformed parameters: #> est. lower upper -#> parent_0 101.44231 97.86220 105.02241 -#> k_m1 0.01707 0.01513 0.01926 -#> f_parent_to_m1 0.27811 0.21201 0.35551 -#> k1 0.05118 0.02213 0.11834 -#> k2 0.03027 0.01491 0.06145 -#> g 0.48878 0.24675 0.73618 +#> parent_0 101.29457 97.85477 104.73437 +#> k_m1 0.01719 0.01526 0.01936 +#> f_parent_to_m1 0.27980 0.21302 0.35798 +#> k1 0.05039 0.02141 0.11859 +#> k2 0.03084 0.01422 0.06687 +#> g 0.49197 0.23916 0.74896 #> #> Resulting formation fractions: #> ff -#> parent_m1 0.2781 -#> parent_sink 0.7219 +#> parent_m1 0.2798 +#> parent_sink 0.7202 #> #> Estimated disappearance times: #> DT50 DT90 DT50back DT50_k1 DT50_k2 -#> parent 17.53 61.64 18.55 13.54 22.9 -#> m1 40.60 134.88 NA NA NA +#> parent 17.49 61.05 18.38 13.76 22.47 +#> m1 40.32 133.94 NA NA NA #> #> Data: -#> ds name time observed predicted residual std standardized -#> ds 1 parent 0 89.8 9.869e+01 8.894553 6.3618 1.398124 -#> ds 1 parent 0 104.1 9.869e+01 -5.405447 6.3618 -0.849676 -#> ds 1 parent 1 88.7 9.413e+01 5.426448 6.0706 0.893897 -#> ds 1 parent 1 95.5 9.413e+01 -1.373552 6.0706 -0.226265 -#> ds 1 parent 3 81.8 8.576e+01 3.961821 5.5377 0.715422 -#> ds 1 parent 3 94.5 8.576e+01 -8.738179 5.5377 -1.577932 -#> ds 1 parent 7 71.5 7.168e+01 0.184828 4.6429 0.039809 -#> ds 1 parent 7 70.3 7.168e+01 1.384828 4.6429 0.298270 -#> ds 1 parent 14 54.2 5.351e+01 -0.688235 3.4934 -0.197008 -#> ds 1 parent 14 49.6 5.351e+01 3.911765 3.4934 1.119747 -#> ds 1 parent 28 31.5 3.209e+01 0.590445 2.1603 0.273322 -#> ds 1 parent 28 28.8 3.209e+01 3.290445 2.1603 1.523177 -#> ds 1 parent 60 12.1 1.272e+01 0.618158 1.0481 0.589761 -#> ds 1 parent 60 13.6 1.272e+01 -0.881842 1.0481 -0.841332 -#> ds 1 parent 90 6.2 6.085e+00 -0.115212 0.7655 -0.150512 -#> ds 1 parent 90 8.3 6.085e+00 -2.215212 0.7655 -2.893953 -#> ds 1 parent 120 2.2 3.009e+00 0.809439 0.6863 1.179470 -#> ds 1 parent 120 2.4 3.009e+00 0.609439 0.6863 0.888041 -#> ds 1 m1 1 0.3 1.129e+00 0.828817 0.6626 1.250938 -#> ds 1 m1 1 0.2 1.129e+00 0.928817 0.6626 1.401869 -#> ds 1 m1 3 2.2 3.141e+00 0.940880 0.6887 1.366187 -#> ds 1 m1 3 3.0 3.141e+00 0.140880 0.6887 0.204562 -#> ds 1 m1 7 6.5 6.326e+00 -0.174162 0.7735 -0.225175 -#> ds 1 m1 7 5.0 6.326e+00 1.325838 0.7735 1.714181 -#> ds 1 m1 14 10.2 9.883e+00 -0.317417 0.9139 -0.347326 -#> ds 1 m1 14 9.5 9.883e+00 0.382583 0.9139 0.418631 -#> ds 1 m1 28 12.2 1.251e+01 0.309856 1.0378 0.298572 -#> ds 1 m1 28 13.4 1.251e+01 -0.890144 1.0378 -0.857726 -#> ds 1 m1 60 11.8 1.086e+01 -0.940009 0.9584 -0.980812 -#> ds 1 m1 60 13.2 1.086e+01 -2.340009 0.9584 -2.441581 -#> ds 1 m1 90 6.6 7.823e+00 1.222977 0.8278 1.477332 -#> ds 1 m1 90 9.3 7.823e+00 -1.477023 0.8278 -1.784214 -#> ds 1 m1 120 3.5 5.315e+00 1.815201 0.7415 2.447906 -#> ds 1 m1 120 5.4 5.315e+00 -0.084799 0.7415 -0.114356 -#> ds 2 parent 0 118.0 1.031e+02 -14.876736 6.6443 -2.239038 -#> ds 2 parent 0 99.8 1.031e+02 3.323264 6.6443 0.500171 -#> ds 2 parent 1 90.2 9.757e+01 7.371379 6.2902 1.171891 -#> ds 2 parent 1 94.6 9.757e+01 2.971379 6.2902 0.472386 -#> ds 2 parent 3 96.1 8.788e+01 -8.222746 5.6724 -1.449599 -#> ds 2 parent 3 78.4 8.788e+01 9.477254 5.6724 1.670758 -#> ds 2 parent 7 77.9 7.293e+01 -4.972272 4.7218 -1.053054 -#> ds 2 parent 7 77.7 7.293e+01 -4.772272 4.7218 -1.010697 -#> ds 2 parent 14 56.0 5.602e+01 0.016773 3.6513 0.004594 -#> ds 2 parent 14 54.7 5.602e+01 1.316773 3.6513 0.360633 -#> ds 2 parent 28 36.6 3.855e+01 1.945779 2.5575 0.760803 -#> ds 2 parent 28 36.8 3.855e+01 1.745779 2.5575 0.682603 -#> ds 2 parent 60 22.1 2.101e+01 -1.086693 1.4996 -0.724663 -#> ds 2 parent 60 24.7 2.101e+01 -3.686693 1.4996 -2.458475 -#> ds 2 parent 90 12.4 1.246e+01 0.058759 1.0353 0.056757 -#> ds 2 parent 90 10.8 1.246e+01 1.658759 1.0353 1.602256 -#> ds 2 parent 120 6.8 7.406e+00 0.606226 0.8119 0.746659 -#> ds 2 parent 120 7.9 7.406e+00 -0.493774 0.8119 -0.608157 -#> ds 2 m1 1 1.3 1.438e+00 0.138236 0.6650 0.207869 -#> ds 2 m1 3 3.7 3.879e+00 0.178617 0.7040 0.253726 -#> ds 2 m1 3 4.7 3.879e+00 -0.821383 0.7040 -1.166780 -#> ds 2 m1 7 8.1 7.389e+00 -0.710951 0.8113 -0.876337 -#> ds 2 m1 7 7.9 7.389e+00 -0.510951 0.8113 -0.629812 -#> ds 2 m1 14 10.1 1.069e+01 0.593533 0.9507 0.624328 -#> ds 2 m1 14 10.3 1.069e+01 0.393533 0.9507 0.413951 -#> ds 2 m1 28 10.7 1.240e+01 1.703647 1.0325 1.649956 -#> ds 2 m1 28 12.2 1.240e+01 0.203647 1.0325 0.197229 -#> ds 2 m1 60 10.7 1.055e+01 -0.147672 0.9442 -0.156405 -#> ds 2 m1 60 12.5 1.055e+01 -1.947672 0.9442 -2.062848 -#> ds 2 m1 90 9.1 8.010e+00 -1.090041 0.8351 -1.305210 -#> ds 2 m1 90 7.4 8.010e+00 0.609959 0.8351 0.730362 -#> ds 2 m1 120 6.1 5.793e+00 -0.306797 0.7561 -0.405759 -#> ds 2 m1 120 4.5 5.793e+00 1.293203 0.7561 1.710347 -#> ds 3 parent 0 106.2 1.035e+02 -2.712344 6.6675 -0.406801 -#> ds 3 parent 0 106.9 1.035e+02 -3.412344 6.6675 -0.511788 -#> ds 3 parent 1 107.4 9.548e+01 -11.924044 6.1566 -1.936801 -#> ds 3 parent 1 96.1 9.548e+01 -0.624044 6.1566 -0.101362 -#> ds 3 parent 3 79.4 8.246e+01 3.056105 5.3274 0.573662 -#> ds 3 parent 3 82.6 8.246e+01 -0.143895 5.3274 -0.027010 -#> ds 3 parent 7 63.9 6.489e+01 0.991141 4.2122 0.235304 -#> ds 3 parent 7 62.4 6.489e+01 2.491141 4.2122 0.591416 -#> ds 3 parent 14 51.0 4.869e+01 -2.306824 3.1906 -0.723013 -#> ds 3 parent 14 47.1 4.869e+01 1.593176 3.1906 0.499338 -#> ds 3 parent 28 36.1 3.480e+01 -1.304261 2.3260 -0.560722 -#> ds 3 parent 28 36.6 3.480e+01 -1.804261 2.3260 -0.775679 -#> ds 3 parent 60 20.1 1.988e+01 -0.221952 1.4346 -0.154719 -#> ds 3 parent 60 19.8 1.988e+01 0.078048 1.4346 0.054406 -#> ds 3 parent 90 11.3 1.194e+01 0.642458 1.0099 0.636132 -#> ds 3 parent 90 10.7 1.194e+01 1.242458 1.0099 1.230224 -#> ds 3 parent 120 8.2 7.176e+00 -1.023847 0.8034 -1.274423 -#> ds 3 parent 120 7.3 7.176e+00 -0.123847 0.8034 -0.154158 -#> ds 3 m1 0 0.8 8.527e-13 -0.800000 0.6586 -1.214712 -#> ds 3 m1 1 1.8 1.856e+00 0.055925 0.6693 0.083562 -#> ds 3 m1 1 2.3 1.856e+00 -0.444075 0.6693 -0.663537 -#> ds 3 m1 3 4.2 4.780e+00 0.580164 0.7264 0.798676 -#> ds 3 m1 3 4.1 4.780e+00 0.680164 0.7264 0.936340 -#> ds 3 m1 7 6.8 8.410e+00 1.609920 0.8512 1.891455 -#> ds 3 m1 7 10.1 8.410e+00 -1.690080 0.8512 -1.985633 -#> ds 3 m1 14 11.4 1.098e+01 -0.424444 0.9638 -0.440389 -#> ds 3 m1 14 12.8 1.098e+01 -1.824444 0.9638 -1.892979 -#> ds 3 m1 28 11.5 1.142e+01 -0.079336 0.9848 -0.080558 -#> ds 3 m1 28 10.6 1.142e+01 0.820664 0.9848 0.833311 -#> ds 3 m1 60 7.5 9.110e+00 1.610231 0.8803 1.829222 -#> ds 3 m1 60 8.6 9.110e+00 0.510231 0.8803 0.579622 -#> ds 3 m1 90 7.3 6.799e+00 -0.501085 0.7898 -0.634463 -#> ds 3 m1 90 8.1 6.799e+00 -1.301085 0.7898 -1.647404 -#> ds 3 m1 120 5.3 4.868e+00 -0.431505 0.7288 -0.592064 -#> ds 3 m1 120 3.8 4.868e+00 1.068495 0.7288 1.466073 -#> ds 4 parent 0 104.7 9.926e+01 -5.444622 6.3975 -0.851049 -#> ds 4 parent 0 88.3 9.926e+01 10.955378 6.3975 1.712436 -#> ds 4 parent 1 94.2 9.618e+01 1.978413 6.2013 0.319030 -#> ds 4 parent 1 94.6 9.618e+01 1.578413 6.2013 0.254527 -#> ds 4 parent 3 78.1 9.037e+01 12.268550 5.8311 2.103985 -#> ds 4 parent 3 96.5 9.037e+01 -6.131450 5.8311 -1.051508 -#> ds 4 parent 7 76.2 7.999e+01 3.794958 5.1708 0.733918 -#> ds 4 parent 7 77.8 7.999e+01 2.194958 5.1708 0.424489 -#> ds 4 parent 14 70.8 6.518e+01 -5.624996 4.2301 -1.329742 -#> ds 4 parent 14 67.3 6.518e+01 -2.124996 4.2301 -0.502346 -#> ds 4 parent 28 43.1 4.462e+01 1.517860 2.9354 0.517085 -#> ds 4 parent 28 45.1 4.462e+01 -0.482140 2.9354 -0.164249 -#> ds 4 parent 60 21.3 2.130e+01 -0.003305 1.5159 -0.002180 -#> ds 4 parent 60 23.5 2.130e+01 -2.203305 1.5159 -1.453435 -#> ds 4 parent 90 11.8 1.180e+01 0.002834 1.0032 0.002825 -#> ds 4 parent 90 12.1 1.180e+01 -0.297166 1.0032 -0.296226 -#> ds 4 parent 120 7.0 6.868e+00 -0.132251 0.7922 -0.166937 -#> ds 4 parent 120 6.2 6.868e+00 0.667749 0.7922 0.842879 -#> ds 4 m1 0 1.6 0.000e+00 -1.600000 0.6586 -2.429424 -#> ds 4 m1 1 0.9 6.826e-01 -0.217363 0.6600 -0.329315 -#> ds 4 m1 3 3.7 1.935e+00 -1.765082 0.6702 -2.633768 -#> ds 4 m1 3 2.0 1.935e+00 -0.065082 0.6702 -0.097112 -#> ds 4 m1 7 3.6 4.035e+00 0.434805 0.7076 0.614501 -#> ds 4 m1 7 3.8 4.035e+00 0.234805 0.7076 0.331845 -#> ds 4 m1 14 7.1 6.652e+00 -0.448187 0.7846 -0.571220 -#> ds 4 m1 14 6.6 6.652e+00 0.051813 0.7846 0.066036 -#> ds 4 m1 28 9.5 9.156e+00 -0.343805 0.8822 -0.389696 -#> ds 4 m1 28 9.3 9.156e+00 -0.143805 0.8822 -0.163000 -#> ds 4 m1 60 8.3 8.848e+00 0.547762 0.8692 0.630185 -#> ds 4 m1 60 9.0 8.848e+00 -0.152238 0.8692 -0.175146 -#> ds 4 m1 90 6.6 6.674e+00 0.073979 0.7854 0.094194 -#> ds 4 m1 90 7.7 6.674e+00 -1.026021 0.7854 -1.306390 -#> ds 4 m1 120 3.7 4.668e+00 0.967537 0.7234 1.337503 -#> ds 4 m1 120 3.5 4.668e+00 1.167537 0.7234 1.613979 -#> ds 5 parent 0 110.4 1.022e+02 -8.170986 6.5872 -1.240433 -#> ds 5 parent 0 112.1 1.022e+02 -9.870986 6.5872 -1.498509 -#> ds 5 parent 1 93.5 9.513e+01 1.630764 6.1346 0.265832 -#> ds 5 parent 1 91.0 9.513e+01 4.130764 6.1346 0.673359 -#> ds 5 parent 3 71.0 8.296e+01 11.964279 5.3597 2.232268 -#> ds 5 parent 3 89.7 8.296e+01 -6.735721 5.3597 -1.256735 -#> ds 5 parent 7 60.4 6.495e+01 4.547441 4.2157 1.078684 -#> ds 5 parent 7 59.1 6.495e+01 5.847441 4.2157 1.387053 -#> ds 5 parent 14 56.5 4.626e+01 -10.241319 3.0380 -3.371047 -#> ds 5 parent 14 47.0 4.626e+01 -0.741319 3.0380 -0.244014 -#> ds 5 parent 28 30.2 3.026e+01 0.058478 2.0487 0.028544 -#> ds 5 parent 28 23.9 3.026e+01 6.358478 2.0487 3.103661 -#> ds 5 parent 60 17.0 1.792e+01 0.919046 1.3242 0.694024 -#> ds 5 parent 60 18.7 1.792e+01 -0.780954 1.3242 -0.589742 -#> ds 5 parent 90 11.3 1.187e+01 0.573917 1.0066 0.570144 -#> ds 5 parent 90 11.9 1.187e+01 -0.026083 1.0066 -0.025912 -#> ds 5 parent 120 9.0 7.898e+00 -1.102089 0.8307 -1.326622 -#> ds 5 parent 120 8.1 7.898e+00 -0.202089 0.8307 -0.243261 -#> ds 5 m1 0 0.7 -1.421e-14 -0.700000 0.6586 -1.062873 -#> ds 5 m1 1 3.0 3.144e+00 0.143526 0.6887 0.208390 -#> ds 5 m1 1 2.6 3.144e+00 0.543526 0.6887 0.789161 -#> ds 5 m1 3 5.1 8.390e+00 3.290265 0.8504 3.869277 -#> ds 5 m1 3 7.5 8.390e+00 0.890265 0.8504 1.046932 -#> ds 5 m1 7 16.5 1.566e+01 -0.841368 1.2007 -0.700751 -#> ds 5 m1 7 19.0 1.566e+01 -3.341368 1.2007 -2.782928 -#> ds 5 m1 14 22.9 2.188e+01 -1.017753 1.5498 -0.656687 -#> ds 5 m1 14 23.2 2.188e+01 -1.317753 1.5498 -0.850257 -#> ds 5 m1 28 22.2 2.386e+01 1.655914 1.6652 0.994399 -#> ds 5 m1 28 24.4 2.386e+01 -0.544086 1.6652 -0.326731 -#> ds 5 m1 60 15.5 1.859e+01 3.091124 1.3618 2.269915 -#> ds 5 m1 60 19.8 1.859e+01 -1.208876 1.3618 -0.887718 -#> ds 5 m1 90 14.9 1.372e+01 -1.176815 1.0990 -1.070784 -#> ds 5 m1 90 14.2 1.372e+01 -0.476815 1.0990 -0.433854 -#> ds 5 m1 120 10.9 9.961e+00 -0.938796 0.9174 -1.023332 -#> ds 5 m1 120 10.4 9.961e+00 -0.438796 0.9174 -0.478308
    # } +#> ds name time observed predicted residual std standardized +#> ds 1 parent 0 89.8 9.878e+01 8.98039 6.3899 1.40541 +#> ds 1 parent 0 104.1 9.878e+01 -5.31961 6.3899 -0.83251 +#> ds 1 parent 1 88.7 9.422e+01 5.52084 6.0981 0.90533 +#> ds 1 parent 1 95.5 9.422e+01 -1.27916 6.0981 -0.20976 +#> ds 1 parent 3 81.8 8.587e+01 4.06752 5.5641 0.73103 +#> ds 1 parent 3 94.5 8.587e+01 -8.63248 5.5641 -1.55147 +#> ds 1 parent 7 71.5 7.180e+01 0.29615 4.6662 0.06347 +#> ds 1 parent 7 70.3 7.180e+01 1.49615 4.6662 0.32063 +#> ds 1 parent 14 54.2 5.360e+01 -0.59602 3.5112 -0.16975 +#> ds 1 parent 14 49.6 5.360e+01 4.00398 3.5112 1.14035 +#> ds 1 parent 28 31.5 3.213e+01 0.62529 2.1691 0.28828 +#> ds 1 parent 28 28.8 3.213e+01 3.32529 2.1691 1.53306 +#> ds 1 parent 60 12.1 1.271e+01 0.60718 1.0490 0.57879 +#> ds 1 parent 60 13.6 1.271e+01 -0.89282 1.0490 -0.85108 +#> ds 1 parent 90 6.2 6.080e+00 -0.12020 0.7649 -0.15716 +#> ds 1 parent 90 8.3 6.080e+00 -2.22020 0.7649 -2.90279 +#> ds 1 parent 120 2.2 3.011e+00 0.81059 0.6852 1.18302 +#> ds 1 parent 120 2.4 3.011e+00 0.61059 0.6852 0.89113 +#> ds 1 m1 1 0.3 1.131e+00 0.83071 0.6613 1.25628 +#> ds 1 m1 1 0.2 1.131e+00 0.93071 0.6613 1.40750 +#> ds 1 m1 3 2.2 3.147e+00 0.94691 0.6877 1.37688 +#> ds 1 m1 3 3.0 3.147e+00 0.14691 0.6877 0.21361 +#> ds 1 m1 7 6.5 6.341e+00 -0.15949 0.7736 -0.20618 +#> ds 1 m1 7 5.0 6.341e+00 1.34051 0.7736 1.73290 +#> ds 1 m1 14 10.2 9.910e+00 -0.28991 0.9157 -0.31659 +#> ds 1 m1 14 9.5 9.910e+00 0.41009 0.9157 0.44783 +#> ds 1 m1 28 12.2 1.255e+01 0.34690 1.0410 0.33323 +#> ds 1 m1 28 13.4 1.255e+01 -0.85310 1.0410 -0.81949 +#> ds 1 m1 60 11.8 1.087e+01 -0.92713 0.9599 -0.96586 +#> ds 1 m1 60 13.2 1.087e+01 -2.32713 0.9599 -2.42434 +#> ds 1 m1 90 6.6 7.813e+00 1.21254 0.8274 1.46541 +#> ds 1 m1 90 9.3 7.813e+00 -1.48746 0.8274 -1.79766 +#> ds 1 m1 120 3.5 5.295e+00 1.79489 0.7403 2.42457 +#> ds 1 m1 120 5.4 5.295e+00 -0.10511 0.7403 -0.14198 +#> ds 2 parent 0 118.0 1.074e+02 -10.63436 6.9396 -1.53242 +#> ds 2 parent 0 99.8 1.074e+02 7.56564 6.9396 1.09021 +#> ds 2 parent 1 90.2 1.012e+02 10.96486 6.5425 1.67594 +#> ds 2 parent 1 94.6 1.012e+02 6.56486 6.5425 1.00342 +#> ds 2 parent 3 96.1 9.054e+01 -5.56014 5.8627 -0.94839 +#> ds 2 parent 3 78.4 9.054e+01 12.13986 5.8627 2.07069 +#> ds 2 parent 7 77.9 7.468e+01 -3.21805 4.8501 -0.66350 +#> ds 2 parent 7 77.7 7.468e+01 -3.01805 4.8501 -0.62226 +#> ds 2 parent 14 56.0 5.748e+01 1.47774 3.7563 0.39340 +#> ds 2 parent 14 54.7 5.748e+01 2.77774 3.7563 0.73948 +#> ds 2 parent 28 36.6 3.996e+01 3.36317 2.6541 1.26717 +#> ds 2 parent 28 36.8 3.996e+01 3.16317 2.6541 1.19182 +#> ds 2 parent 60 22.1 2.132e+01 -0.78225 1.5210 -0.51430 +#> ds 2 parent 60 24.7 2.132e+01 -3.38225 1.5210 -2.22369 +#> ds 2 parent 90 12.4 1.215e+01 -0.25010 1.0213 -0.24487 +#> ds 2 parent 90 10.8 1.215e+01 1.34990 1.0213 1.32169 +#> ds 2 parent 120 6.8 6.931e+00 0.13105 0.7943 0.16500 +#> ds 2 parent 120 7.9 6.931e+00 -0.96895 0.7943 -1.21994 +#> ds 2 m1 1 1.3 1.519e+00 0.21924 0.6645 0.32995 +#> ds 2 m1 3 3.7 4.049e+00 0.34891 0.7070 0.49351 +#> ds 2 m1 3 4.7 4.049e+00 -0.65109 0.7070 -0.92094 +#> ds 2 m1 7 8.1 7.565e+00 -0.53526 0.8179 -0.65448 +#> ds 2 m1 7 7.9 7.565e+00 -0.33526 0.8179 -0.40993 +#> ds 2 m1 14 10.1 1.071e+01 0.60614 0.9521 0.63663 +#> ds 2 m1 14 10.3 1.071e+01 0.40614 0.9521 0.42657 +#> ds 2 m1 28 10.7 1.224e+01 1.54440 1.0260 1.50526 +#> ds 2 m1 28 12.2 1.224e+01 0.04440 1.0260 0.04327 +#> ds 2 m1 60 10.7 1.056e+01 -0.14005 0.9453 -0.14815 +#> ds 2 m1 60 12.5 1.056e+01 -1.94005 0.9453 -2.05226 +#> ds 2 m1 90 9.1 8.089e+00 -1.01088 0.8384 -1.20577 +#> ds 2 m1 90 7.4 8.089e+00 0.68912 0.8384 0.82197 +#> ds 2 m1 120 6.1 5.855e+00 -0.24463 0.7576 -0.32292 +#> ds 2 m1 120 4.5 5.855e+00 1.35537 0.7576 1.78911 +#> ds 3 parent 0 106.2 1.095e+02 3.30335 7.0765 0.46680 +#> ds 3 parent 0 106.9 1.095e+02 2.60335 7.0765 0.36788 +#> ds 3 parent 1 107.4 9.939e+01 -8.01282 6.4287 -1.24641 +#> ds 3 parent 1 96.1 9.939e+01 3.28718 6.4287 0.51133 +#> ds 3 parent 3 79.4 8.365e+01 4.24698 5.4222 0.78326 +#> ds 3 parent 3 82.6 8.365e+01 1.04698 5.4222 0.19309 +#> ds 3 parent 7 63.9 6.405e+01 0.14704 4.1732 0.03523 +#> ds 3 parent 7 62.4 6.405e+01 1.64704 4.1732 0.39467 +#> ds 3 parent 14 51.0 4.795e+01 -3.04985 3.1546 -0.96681 +#> ds 3 parent 14 47.1 4.795e+01 0.85015 3.1546 0.26950 +#> ds 3 parent 28 36.1 3.501e+01 -1.09227 2.3465 -0.46549 +#> ds 3 parent 28 36.6 3.501e+01 -1.59227 2.3465 -0.67858 +#> ds 3 parent 60 20.1 2.012e+01 0.02116 1.4520 0.01457 +#> ds 3 parent 60 19.8 2.012e+01 0.32116 1.4520 0.22119 +#> ds 3 parent 90 11.3 1.206e+01 0.76096 1.0170 0.74826 +#> ds 3 parent 90 10.7 1.206e+01 1.36096 1.0170 1.33825 +#> ds 3 parent 120 8.2 7.230e+00 -0.97022 0.8052 -1.20493 +#> ds 3 parent 120 7.3 7.230e+00 -0.07022 0.8052 -0.08721 +#> ds 3 m1 0 0.8 -5.684e-13 -0.80000 0.6572 -1.21722 +#> ds 3 m1 1 1.8 2.045e+00 0.24538 0.6703 0.36608 +#> ds 3 m1 1 2.3 2.045e+00 -0.25462 0.6703 -0.37987 +#> ds 3 m1 3 4.2 5.136e+00 0.93594 0.7356 1.27228 +#> ds 3 m1 3 4.1 5.136e+00 1.03594 0.7356 1.40822 +#> ds 3 m1 7 6.8 8.674e+00 1.87438 0.8623 2.17381 +#> ds 3 m1 7 10.1 8.674e+00 -1.42562 0.8623 -1.65335 +#> ds 3 m1 14 11.4 1.083e+01 -0.56746 0.9580 -0.59233 +#> ds 3 m1 14 12.8 1.083e+01 -1.96746 0.9580 -2.05369 +#> ds 3 m1 28 11.5 1.098e+01 -0.51762 0.9651 -0.53637 +#> ds 3 m1 28 10.6 1.098e+01 0.38238 0.9651 0.39623 +#> ds 3 m1 60 7.5 8.889e+00 1.38911 0.8713 1.59436 +#> ds 3 m1 60 8.6 8.889e+00 0.28911 0.8713 0.33183 +#> ds 3 m1 90 7.3 6.774e+00 -0.52608 0.7886 -0.66708 +#> ds 3 m1 90 8.1 6.774e+00 -1.32608 0.7886 -1.68150 +#> ds 3 m1 120 5.3 4.954e+00 -0.34584 0.7305 -0.47345 +#> ds 3 m1 120 3.8 4.954e+00 1.15416 0.7305 1.58004 +#> ds 4 parent 0 104.7 9.957e+01 -5.13169 6.4403 -0.79681 +#> ds 4 parent 0 88.3 9.957e+01 11.26831 6.4403 1.74966 +#> ds 4 parent 1 94.2 9.644e+01 2.23888 6.2400 0.35879 +#> ds 4 parent 1 94.6 9.644e+01 1.83888 6.2400 0.29469 +#> ds 4 parent 3 78.1 9.054e+01 12.43946 5.8627 2.12180 +#> ds 4 parent 3 96.5 9.054e+01 -5.96054 5.8627 -1.01669 +#> ds 4 parent 7 76.2 8.004e+01 3.83771 5.1918 0.73919 +#> ds 4 parent 7 77.8 8.004e+01 2.23771 5.1918 0.43101 +#> ds 4 parent 14 70.8 6.511e+01 -5.69246 4.2406 -1.34238 +#> ds 4 parent 14 67.3 6.511e+01 -2.19246 4.2406 -0.51702 +#> ds 4 parent 28 43.1 4.454e+01 1.43744 2.9401 0.48890 +#> ds 4 parent 28 45.1 4.454e+01 -0.56256 2.9401 -0.19134 +#> ds 4 parent 60 21.3 2.132e+01 0.02005 1.5211 0.01318 +#> ds 4 parent 60 23.5 2.132e+01 -2.17995 1.5211 -1.43310 +#> ds 4 parent 90 11.8 1.182e+01 0.02167 1.0053 0.02156 +#> ds 4 parent 90 12.1 1.182e+01 -0.27833 1.0053 -0.27687 +#> ds 4 parent 120 7.0 6.852e+00 -0.14780 0.7914 -0.18675 +#> ds 4 parent 120 6.2 6.852e+00 0.65220 0.7914 0.82408 +#> ds 4 m1 0 1.6 -5.684e-14 -1.60000 0.6572 -2.43444 +#> ds 4 m1 1 0.9 6.918e-01 -0.20821 0.6587 -0.31607 +#> ds 4 m1 3 3.7 1.959e+00 -1.74131 0.6692 -2.60204 +#> ds 4 m1 3 2.0 1.959e+00 -0.04131 0.6692 -0.06173 +#> ds 4 m1 7 3.6 4.076e+00 0.47590 0.7076 0.67252 +#> ds 4 m1 7 3.8 4.076e+00 0.27590 0.7076 0.38989 +#> ds 4 m1 14 7.1 6.698e+00 -0.40189 0.7859 -0.51135 +#> ds 4 m1 14 6.6 6.698e+00 0.09811 0.7859 0.12483 +#> ds 4 m1 28 9.5 9.175e+00 -0.32492 0.8835 -0.36779 +#> ds 4 m1 28 9.3 9.175e+00 -0.12492 0.8835 -0.14141 +#> ds 4 m1 60 8.3 8.818e+00 0.51810 0.8683 0.59671 +#> ds 4 m1 60 9.0 8.818e+00 -0.18190 0.8683 -0.20949 +#> ds 4 m1 90 6.6 6.645e+00 0.04480 0.7841 0.05713 +#> ds 4 m1 90 7.7 6.645e+00 -1.05520 0.7841 -1.34581 +#> ds 4 m1 120 3.7 4.648e+00 0.94805 0.7221 1.31293 +#> ds 4 m1 120 3.5 4.648e+00 1.14805 0.7221 1.58991 +#> ds 5 parent 0 110.4 1.026e+02 -7.81752 6.6333 -1.17853 +#> ds 5 parent 0 112.1 1.026e+02 -9.51752 6.6333 -1.43482 +#> ds 5 parent 1 93.5 9.560e+01 2.10274 6.1865 0.33989 +#> ds 5 parent 1 91.0 9.560e+01 4.60274 6.1865 0.74399 +#> ds 5 parent 3 71.0 8.356e+01 12.55799 5.4165 2.31846 +#> ds 5 parent 3 89.7 8.356e+01 -6.14201 5.4165 -1.13394 +#> ds 5 parent 7 60.4 6.550e+01 5.09732 4.2653 1.19506 +#> ds 5 parent 7 59.1 6.550e+01 6.39732 4.2653 1.49984 +#> ds 5 parent 14 56.5 4.641e+01 -10.09145 3.0576 -3.30044 +#> ds 5 parent 14 47.0 4.641e+01 -0.59145 3.0576 -0.19344 +#> ds 5 parent 28 30.2 2.982e+01 -0.37647 2.0284 -0.18560 +#> ds 5 parent 28 23.9 2.982e+01 5.92353 2.0284 2.92028 +#> ds 5 parent 60 17.0 1.754e+01 0.53981 1.3060 0.41332 +#> ds 5 parent 60 18.7 1.754e+01 -1.16019 1.3060 -0.88834 +#> ds 5 parent 90 11.3 1.175e+01 0.45050 1.0018 0.44969 +#> ds 5 parent 90 11.9 1.175e+01 -0.14950 1.0018 -0.14923 +#> ds 5 parent 120 9.0 7.915e+00 -1.08476 0.8315 -1.30462 +#> ds 5 parent 120 8.1 7.915e+00 -0.18476 0.8315 -0.22220 +#> ds 5 m1 0 0.7 0.000e+00 -0.70000 0.6572 -1.06507 +#> ds 5 m1 1 3.0 3.062e+00 0.06170 0.6861 0.08992 +#> ds 5 m1 1 2.6 3.062e+00 0.46170 0.6861 0.67290 +#> ds 5 m1 3 5.1 8.209e+00 3.10938 0.8432 3.68760 +#> ds 5 m1 3 7.5 8.209e+00 0.70938 0.8432 0.84130 +#> ds 5 m1 7 16.5 1.544e+01 -1.05567 1.1914 -0.88605 +#> ds 5 m1 7 19.0 1.544e+01 -3.55567 1.1914 -2.98436 +#> ds 5 m1 14 22.9 2.181e+01 -1.08765 1.5498 -0.70181 +#> ds 5 m1 14 23.2 2.181e+01 -1.38765 1.5498 -0.89539 +#> ds 5 m1 28 22.2 2.404e+01 1.83624 1.6805 1.09270 +#> ds 5 m1 28 24.4 2.404e+01 -0.36376 1.6805 -0.21647 +#> ds 5 m1 60 15.5 1.875e+01 3.25390 1.3741 2.36805 +#> ds 5 m1 60 19.8 1.875e+01 -1.04610 1.3741 -0.76131 +#> ds 5 m1 90 14.9 1.380e+01 -1.09507 1.1050 -0.99102 +#> ds 5 m1 90 14.2 1.380e+01 -0.39507 1.1050 -0.35753 +#> ds 5 m1 120 10.9 1.002e+01 -0.88429 0.9205 -0.96069 +#> ds 5 m1 120 10.4 1.002e+01 -0.38429 0.9205 -0.41749
    # }
    diff --git a/docs/dev/reference/transform_odeparms.html b/docs/dev/reference/transform_odeparms.html index 46b66073..6e19505f 100644 --- a/docs/dev/reference/transform_odeparms.html +++ b/docs/dev/reference/transform_odeparms.html @@ -77,7 +77,7 @@ the ilr transformation is used." /> mkin - 0.9.50.4 + 1.0.1.9000
    @@ -126,7 +126,7 @@ the ilr transformation is used." />
    diff --git a/docs/dev/authors.html b/docs/dev/authors.html index 9641eec0..8ffb9f97 100644 --- a/docs/dev/authors.html +++ b/docs/dev/authors.html @@ -71,7 +71,7 @@ mkin - 1.0.1.9000 + 1.0.2.9000
    diff --git a/docs/dev/index.html b/docs/dev/index.html index 8888633d..ff9b201f 100644 --- a/docs/dev/index.html +++ b/docs/dev/index.html @@ -38,7 +38,7 @@ mkin - 1.0.1.9000 + 1.0.2.9000
    diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index 998917f2..eab75984 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -71,7 +71,7 @@ mkin - 1.0.1.9000 + 1.0.2.9000
    @@ -141,9 +141,9 @@ Source: NEWS.md
    -
    -

    -mkin 1.0.1.9000 Unreleased +
    +

    +mkin 1.0.2.9000 Unreleased

    • Switch to a versioning scheme where the fourth version component indicates development versions

    • @@ -151,10 +151,18 @@
    • ‘saemix_model’ and ‘saemix_data’: Helper functions to set up nonlinear mixed-effects models for mmkin row objects

    • ‘saem’: generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods

    +
    +
    +

    +mkin 1.0.2 Unreleased +

    +
      +
    • ‘mkinfit’: Keep model names stored in ‘mkinmod’ objects, avoiding their loss in ‘gmkin’
    • +

    -mkin 1.0.1 Unreleased +mkin 1.0.1 2021-02-10

    • ‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code in dontrun sections that failed with current defaults

    • diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index f9b16e29..8921a1e4 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -10,7 +10,7 @@ articles: web_only/NAFTA_examples: NAFTA_examples.html web_only/benchmarks: benchmarks.html web_only/compiled_models: compiled_models.html -last_built: 2021-02-06T17:26Z +last_built: 2021-02-13T11:32Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/endpoints.html b/docs/dev/reference/endpoints.html index a13e11a7..301b454f 100644 --- a/docs/dev/reference/endpoints.html +++ b/docs/dev/reference/endpoints.html @@ -78,7 +78,7 @@ advantage that the SFORB model can also be used for metabolites." /> mkin - 1.0.1.9000 + 1.0.2.9000
    diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index 7e98aa50..b52ecb22 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -71,7 +71,7 @@ mkin - 1.0.1.9000 + 1.0.2.9000

    diff --git a/docs/dev/reference/plot.mixed.mmkin.html b/docs/dev/reference/plot.mixed.mmkin.html index 601e1554..ef169074 100644 --- a/docs/dev/reference/plot.mixed.mmkin.html +++ b/docs/dev/reference/plot.mixed.mmkin.html @@ -72,7 +72,7 @@ mkin - 1.0.1.9000 + 1.0.2.9000
    @@ -283,10 +283,10 @@ corresponding model prediction lines for the different datasets.

    f_saem <- saem(f, transformations = "saemix")
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:17 2021" +#> [1] "Sat Feb 13 12:33:07 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:23 2021"
    plot(f_saem) +#> [1] "Sat Feb 13 12:33:13 2021"
    plot(f_saem)
    # We can overlay the two variants if we generate predictions pred_nlme <- mkinpredict(dfop_sfo, diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html index 4578db2a..02483bec 100644 --- a/docs/dev/reference/saem.html +++ b/docs/dev/reference/saem.html @@ -74,7 +74,7 @@ Expectation Maximisation algorithm (SAEM)." /> mkin - 1.0.1.9000 + 1.0.2.9000
    @@ -261,27 +261,27 @@ using mmkin.

    state.ini = c(parent = 100), fixed_initials = "parent", quiet = TRUE) f_saem_p0_fixed <- saem(f_mmkin_parent_p0_fixed)
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:26 2021" +#> [1] "Sat Feb 13 12:33:16 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:27 2021"
    +#> [1] "Sat Feb 13 12:33:18 2021"
    f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) f_saem_sfo <- saem(f_mmkin_parent["SFO", ])
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:28 2021" +#> [1] "Sat Feb 13 12:33:19 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:30 2021"
    f_saem_fomc <- saem(f_mmkin_parent["FOMC", ]) +#> [1] "Sat Feb 13 12:33:20 2021"
    f_saem_fomc <- saem(f_mmkin_parent["FOMC", ])
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:30 2021" +#> [1] "Sat Feb 13 12:33:20 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:32 2021"
    f_saem_dfop <- saem(f_mmkin_parent["DFOP", ]) +#> [1] "Sat Feb 13 12:33:22 2021"
    f_saem_dfop <- saem(f_mmkin_parent["DFOP", ])
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:32 2021" +#> [1] "Sat Feb 13 12:33:23 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:35 2021"
    +#> [1] "Sat Feb 13 12:33:25 2021"
    # The returned saem.mmkin object contains an SaemixObject, therefore we can use # functions from saemix library(saemix) @@ -324,10 +324,10 @@ using mmkin.

    f_mmkin_parent_tc <- update(f_mmkin_parent, error_model = "tc") f_saem_fomc_tc <- saem(f_mmkin_parent_tc["FOMC", ])
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:37 2021" +#> [1] "Sat Feb 13 12:33:28 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:42 2021"
    compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)) +#> [1] "Sat Feb 13 12:33:32 2021"
    compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so))
    #> Error in compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)): 'compare.saemix' requires at least two models.
    sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) @@ -346,15 +346,15 @@ using mmkin.

    # four minutes f_saem_sfo_sfo <- saem(f_mmkin["SFO-SFO", ])
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:44 2021" +#> [1] "Sat Feb 13 12:33:35 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:48 2021"
    f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ]) +#> [1] "Sat Feb 13 12:33:39 2021"
    f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ])
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:29:49 2021" +#> [1] "Sat Feb 13 12:33:40 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:29:57 2021"
    # We can use print, plot and summary methods to check the results +#> [1] "Sat Feb 13 12:33:48 2021"
    # We can use print, plot and summary methods to check the results print(f_saem_dfop_sfo)
    #> Kinetic nonlinear mixed-effects model fit by SAEM #> Structural model: @@ -395,10 +395,10 @@ using mmkin.

    #> SD.g_qlogis 0.44771 -0.86417 1.7596
    plot(f_saem_dfop_sfo)
    summary(f_saem_dfop_sfo, data = TRUE)
    #> saemix version used for fitting: 3.1.9000 -#> mkin version used for pre-fitting: 1.0.1.9000 +#> mkin version used for pre-fitting: 1.0.2.9000 #> R version used for fitting: 4.0.3 -#> Date of fit: Sat Feb 6 18:29:57 2021 -#> Date of summary: Sat Feb 6 18:29:58 2021 +#> Date of fit: Sat Feb 13 12:33:48 2021 +#> Date of summary: Sat Feb 13 12:33:48 2021 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -413,7 +413,7 @@ using mmkin.

    #> #> Model predictions using solution type analytical #> -#> Fitted in 8.539 s using 300, 100 iterations +#> Fitted in 8.875 s using 300, 100 iterations #> #> Variance model: Constant variance #> diff --git a/docs/dev/reference/summary.saem.mmkin.html b/docs/dev/reference/summary.saem.mmkin.html index 93e1365d..81054813 100644 --- a/docs/dev/reference/summary.saem.mmkin.html +++ b/docs/dev/reference/summary.saem.mmkin.html @@ -76,7 +76,7 @@ endpoints such as formation fractions and DT50 values. Optionally mkin - 1.0.1.9000 + 1.0.2.9000
    @@ -260,15 +260,15 @@ saemix authors for the parts inherited from saemix.

    quiet = TRUE, error_model = "tc", cores = 5) f_saem_dfop_sfo <- saem(f_mmkin_dfop_sfo)
    #> Running main SAEM algorithm -#> [1] "Sat Feb 6 18:30:00 2021" +#> [1] "Sat Feb 13 12:33:52 2021" #> .... #> Minimisation finished -#> [1] "Sat Feb 6 18:30:11 2021"
    summary(f_saem_dfop_sfo, data = TRUE) +#> [1] "Sat Feb 13 12:34:03 2021"
    summary(f_saem_dfop_sfo, data = TRUE)
    #> saemix version used for fitting: 3.1.9000 -#> mkin version used for pre-fitting: 1.0.1.9000 +#> mkin version used for pre-fitting: 1.0.2.9000 #> R version used for fitting: 4.0.3 -#> Date of fit: Sat Feb 6 18:30:12 2021 -#> Date of summary: Sat Feb 6 18:30:12 2021 +#> Date of fit: Sat Feb 13 12:34:04 2021 +#> Date of summary: Sat Feb 13 12:34:04 2021 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -283,7 +283,7 @@ saemix authors for the parts inherited from saemix.

    #> #> Model predictions using solution type analytical #> -#> Fitted in 11.769 s using 300, 100 iterations +#> Fitted in 11.899 s using 300, 100 iterations #> #> Variance model: Two-component variance function #> -- cgit v1.2.1 From 99f04e6a05acde950f26c55f468f1f184e9dbfd9 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 13 Feb 2021 13:17:20 +0100 Subject: Rebuild docs --- docs/dev/pkgdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 8921a1e4..2e984557 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -10,7 +10,7 @@ articles: web_only/NAFTA_examples: NAFTA_examples.html web_only/benchmarks: benchmarks.html web_only/compiled_models: compiled_models.html -last_built: 2021-02-13T11:32Z +last_built: 2021-02-13T12:16Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles -- cgit v1.2.1 From f2c57bd3c183238fa796f9bee5ce52b62f3f75d6 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 13 Feb 2021 13:25:12 +0100 Subject: Structure NEWS entry --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index ad8ae80b..3e599283 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,11 @@ # mkin 1.0.2.9000 +## General + - Switch to a versioning scheme where the fourth version component indicates development versions +## Mixed-effects models + - Reintroduce the interface to the current development version of saemix, in particular: - 'saemix_model' and 'saemix_data': Helper functions to set up nonlinear mixed-effects models for mmkin row objects -- cgit v1.2.1 From c4f327e62f19c0a3fc77a538f7cf0c2c619019d8 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 13 Feb 2021 13:27:09 +0100 Subject: Update static docs --- docs/dev/news/index.html | 20 +++++++++++++++----- docs/dev/pkgdown.yml | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index eab75984..1421edf4 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -145,12 +145,22 @@

    mkin 1.0.2.9000 Unreleased

    +
    +

    +General

    +
      +
    • Switch to a versioning scheme where the fourth version component indicates development versions
    • +
    +
    +
    +

    +Mixed-effects models

      -
    • Switch to a versioning scheme where the fourth version component indicates development versions

    • Reintroduce the interface to the current development version of saemix, in particular:

    • ‘saemix_model’ and ‘saemix_data’: Helper functions to set up nonlinear mixed-effects models for mmkin row objects

    • ‘saem’: generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods

    +

    @@ -176,9 +186,9 @@

    mkin 1.0.0 2021-02-03

    -
    +

    -General

    +General
    • ‘mkinmod’ models gain arguments ‘name’ and ‘dll_dir’ which, in conjunction with a current version of the ‘inline’ package, make it possible to still use the DLL used for fast ODE solutions with ‘deSolve’ after saving and restoring the ‘mkinmod’ object.

    • ‘mkindsg’ R6 class for groups of ‘mkinds’ datasets with metadata

    • @@ -191,9 +201,9 @@
    • ‘plot.mkinfit’: Change default ylab from “Observed” to “Residue”. Pass xlab to residual plot if show_residuals is TRUE.

    -
    +

    -Mixed-effects models

    +Mixed-effects models
    • ‘mixed.mmkin’ New container for mmkin objects for plotting with the ‘plot.mixed.mmkin’ method

    • ‘plot.mixed.mmkin’ method used for ‘nlme.mmkin’ inheriting from ‘mixed.mmkin’ (currently virtual)

    • diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 2e984557..c74efaf7 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -10,7 +10,7 @@ articles: web_only/NAFTA_examples: NAFTA_examples.html web_only/benchmarks: benchmarks.html web_only/compiled_models: compiled_models.html -last_built: 2021-02-13T12:16Z +last_built: 2021-02-13T12:27Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles -- cgit v1.2.1 From b9be19af5e3085216d0cd5af439332f631fa8b92 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 15 Feb 2021 17:36:12 +0100 Subject: Fully rebuild docs, rerun tests and check --- GNUmakefile | 2 +- build.log | 3 +- check.log | 4 +- docs/dev/404.html | 2 +- docs/dev/articles/FOCUS_D.html | 23 +-- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../articles/FOCUS_D_files/figure-html/plot-1.png | Bin 81432 -> 79176 bytes .../FOCUS_D_files/header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/FOCUS_L.html | 129 ++++++------ .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../figure-html/unnamed-chunk-10-1.png | Bin 43110 -> 42203 bytes .../figure-html/unnamed-chunk-12-1.png | Bin 84605 -> 82006 bytes .../figure-html/unnamed-chunk-13-1.png | Bin 33489 -> 32751 bytes .../figure-html/unnamed-chunk-15-1.png | Bin 59507 -> 57939 bytes .../figure-html/unnamed-chunk-4-1.png | Bin 35964 -> 35238 bytes .../figure-html/unnamed-chunk-6-1.png | Bin 36379 -> 35640 bytes .../figure-html/unnamed-chunk-8-1.png | Bin 42221 -> 41399 bytes .../figure-html/unnamed-chunk-9-1.png | Bin 41739 -> 40983 bytes .../FOCUS_L_files/header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/index.html | 2 +- docs/dev/articles/mkin.html | 62 +++--- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../mkin_files/figure-html/unnamed-chunk-2-1.png | Bin 92716 -> 89958 bytes .../mkin_files/header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/twa.html | 13 +- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../twa_files/header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/web_only/FOCUS_Z.html | 35 ++-- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../figure-html/FOCUS_2006_Z_fits_1-1.png | Bin 69227 -> 66640 bytes .../figure-html/FOCUS_2006_Z_fits_10-1.png | Bin 109820 -> 106038 bytes .../figure-html/FOCUS_2006_Z_fits_11-1.png | Bin 109050 -> 105042 bytes .../figure-html/FOCUS_2006_Z_fits_11a-1.png | Bin 79154 -> 75626 bytes .../figure-html/FOCUS_2006_Z_fits_11b-1.png | Bin 35734 -> 35744 bytes .../figure-html/FOCUS_2006_Z_fits_2-1.png | Bin 69227 -> 66640 bytes .../figure-html/FOCUS_2006_Z_fits_3-1.png | Bin 69006 -> 66424 bytes .../figure-html/FOCUS_2006_Z_fits_5-1.png | Bin 83658 -> 80520 bytes .../figure-html/FOCUS_2006_Z_fits_6-1.png | Bin 108890 -> 105149 bytes .../figure-html/FOCUS_2006_Z_fits_7-1.png | Bin 108277 -> 104479 bytes .../figure-html/FOCUS_2006_Z_fits_9-1.png | Bin 91586 -> 88890 bytes .../FOCUS_Z_files/header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/web_only/NAFTA_examples.html | 181 ++++++++--------- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../NAFTA_examples_files/figure-html/p10-1.png | Bin 80950 -> 78793 bytes .../NAFTA_examples_files/figure-html/p11-1.png | Bin 77737 -> 75470 bytes .../NAFTA_examples_files/figure-html/p12a-1.png | Bin 83111 -> 80755 bytes .../NAFTA_examples_files/figure-html/p12b-1.png | Bin 72088 -> 69885 bytes .../NAFTA_examples_files/figure-html/p13-1.png | Bin 79355 -> 77126 bytes .../NAFTA_examples_files/figure-html/p14-1.png | Bin 82078 -> 79693 bytes .../NAFTA_examples_files/figure-html/p15a-1.png | Bin 78261 -> 75945 bytes .../NAFTA_examples_files/figure-html/p15b-1.png | Bin 80090 -> 78004 bytes .../NAFTA_examples_files/figure-html/p16-1.png | Bin 95466 -> 93075 bytes .../NAFTA_examples_files/figure-html/p5a-1.png | Bin 84037 -> 81521 bytes .../NAFTA_examples_files/figure-html/p5b-1.png | Bin 81732 -> 79783 bytes .../NAFTA_examples_files/figure-html/p6-1.png | Bin 84055 -> 81974 bytes .../NAFTA_examples_files/figure-html/p7-1.png | Bin 103771 -> 101606 bytes .../NAFTA_examples_files/figure-html/p8-1.png | Bin 94196 -> 91429 bytes .../NAFTA_examples_files/figure-html/p9a-1.png | Bin 80132 -> 77612 bytes .../NAFTA_examples_files/figure-html/p9b-1.png | Bin 77691 -> 75129 bytes .../header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/web_only/benchmarks.html | 65 ++++-- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/articles/web_only/compiled_models.html | 27 ++- .../accessible-code-block-0.0.1/empty-anchor.js | 15 ++ .../header-attrs-2.6/header-attrs.js | 12 ++ docs/dev/authors.html | 2 +- docs/dev/index.html | 45 +++- docs/dev/news/index.html | 16 +- docs/dev/pkgdown.yml | 2 +- docs/dev/reference/AIC.mmkin.html | 13 +- docs/dev/reference/CAKE_export.html | 4 +- docs/dev/reference/D24_2014.html | 2 +- docs/dev/reference/DFOP.solution.html | 4 +- docs/dev/reference/Extract.mmkin.html | 6 +- docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html | 4 +- docs/dev/reference/FOCUS_2006_FOMC_ref_A_to_F.html | 4 +- docs/dev/reference/FOCUS_2006_HS_ref_A_to_F.html | 4 +- docs/dev/reference/FOCUS_2006_SFO_ref_A_to_F.html | 4 +- docs/dev/reference/FOCUS_2006_datasets.html | 4 +- docs/dev/reference/FOMC.solution.html | 4 +- docs/dev/reference/HS.solution.html | 4 +- docs/dev/reference/IORE.solution.html | 4 +- docs/dev/reference/NAFTA_SOP_2015-1.png | Bin 64838 -> 61980 bytes docs/dev/reference/NAFTA_SOP_2015.html | 4 +- docs/dev/reference/NAFTA_SOP_Attachment-1.png | Bin 66148 -> 63822 bytes docs/dev/reference/NAFTA_SOP_Attachment.html | 8 +- docs/dev/reference/Rplot001.png | Bin 1011 -> 13995 bytes docs/dev/reference/Rplot002.png | Bin 16843 -> 13648 bytes docs/dev/reference/Rplot006.png | Bin 22103 -> 24545 bytes docs/dev/reference/Rplot007.png | Bin 25074 -> 24992 bytes docs/dev/reference/SFO.solution.html | 4 +- docs/dev/reference/SFORB.solution.html | 4 +- docs/dev/reference/add_err-1.png | Bin 111360 -> 108676 bytes docs/dev/reference/add_err-2.png | Bin 64003 -> 63336 bytes docs/dev/reference/add_err-3.png | Bin 60019 -> 58909 bytes docs/dev/reference/add_err.html | 4 +- docs/dev/reference/aw.html | 4 +- docs/dev/reference/confint.mkinfit.html | 6 +- docs/dev/reference/create_deg_func.html | 12 +- docs/dev/reference/dimethenamid_2018.html | 2 +- docs/dev/reference/endpoints.html | 2 +- docs/dev/reference/experimental_data_for_UBA-1.png | Bin 103559 -> 102212 bytes docs/dev/reference/experimental_data_for_UBA.html | 4 +- docs/dev/reference/f_time_norm_focus.html | 2 +- docs/dev/reference/focus_soil_moisture.html | 4 +- docs/dev/reference/get_deg_func.html | 4 +- docs/dev/reference/ilr.html | 4 +- docs/dev/reference/index.html | 2 +- docs/dev/reference/loftest-1.png | Bin 41288 -> 40351 bytes docs/dev/reference/loftest-2.png | Bin 40668 -> 39817 bytes docs/dev/reference/loftest-3.png | Bin 78452 -> 76976 bytes docs/dev/reference/loftest-4.png | Bin 76132 -> 74678 bytes docs/dev/reference/loftest-5.png | Bin 74691 -> 73446 bytes docs/dev/reference/loftest.html | 4 +- docs/dev/reference/logLik.mkinfit.html | 2 +- docs/dev/reference/logistic.solution-2.png | Bin 43807 -> 42118 bytes docs/dev/reference/logistic.solution.html | 10 +- docs/dev/reference/lrtest.mkinfit.html | 4 +- docs/dev/reference/max_twa_parent.html | 4 +- docs/dev/reference/mccall81_245T-1.png | Bin 65341 -> 62537 bytes docs/dev/reference/mccall81_245T.html | 44 ++-- docs/dev/reference/mixed-1.png | Bin 206373 -> 219866 bytes docs/dev/reference/mixed.html | 14 +- docs/dev/reference/mkin_long_to_wide.html | 4 +- docs/dev/reference/mkin_wide_to_long.html | 4 +- docs/dev/reference/mkinds.html | 4 +- docs/dev/reference/mkindsg.html | 10 +- docs/dev/reference/mkinerrmin.html | 4 +- docs/dev/reference/mkinerrplot.html | 4 +- docs/dev/reference/mkinfit-1.png | Bin 67810 -> 65835 bytes docs/dev/reference/mkinfit.html | 132 ++++++------ docs/dev/reference/mkinmod.html | 8 +- docs/dev/reference/mkinparplot-1.png | Bin 25707 -> 25702 bytes docs/dev/reference/mkinparplot.html | 7 +- docs/dev/reference/mkinplot.html | 4 +- docs/dev/reference/mkinpredict.html | 10 +- docs/dev/reference/mkinresplot.html | 2 +- docs/dev/reference/mmkin.html | 6 +- docs/dev/reference/nafta-1.png | Bin 64838 -> 61980 bytes docs/dev/reference/nafta.html | 4 +- docs/dev/reference/nlme-1.png | Bin 69449 -> 70133 bytes docs/dev/reference/nlme-2.png | Bin 89493 -> 94031 bytes docs/dev/reference/nlme.html | 28 +-- docs/dev/reference/nlme.mmkin.html | 4 +- docs/dev/reference/nobs.mkinfit.html | 4 +- docs/dev/reference/parms.html | 14 +- docs/dev/reference/plot.mixed.mmkin.html | 6 +- docs/dev/reference/plot.mkinfit-2.png | Bin 73247 -> 73254 bytes docs/dev/reference/plot.mkinfit-5.png | Bin 66920 -> 66560 bytes docs/dev/reference/plot.mkinfit-6.png | Bin 73078 -> 72717 bytes docs/dev/reference/plot.mkinfit-7.png | Bin 73909 -> 73553 bytes docs/dev/reference/plot.mkinfit.html | 2 +- docs/dev/reference/plot.mmkin-1.png | Bin 49402 -> 48997 bytes docs/dev/reference/plot.mmkin-2.png | Bin 49753 -> 49376 bytes docs/dev/reference/plot.mmkin-3.png | Bin 46090 -> 46202 bytes docs/dev/reference/plot.mmkin-4.png | Bin 33266 -> 33057 bytes docs/dev/reference/plot.mmkin-5.png | Bin 57777 -> 57372 bytes docs/dev/reference/plot.mmkin.html | 2 +- docs/dev/reference/plot.nafta.html | 4 +- docs/dev/reference/reexports.html | 4 +- docs/dev/reference/residuals.mkinfit.html | 6 +- docs/dev/reference/saem.html | 38 ++-- docs/dev/reference/schaefer07_complex_case-1.png | Bin 67659 -> 66965 bytes docs/dev/reference/schaefer07_complex_case.html | 14 +- docs/dev/reference/sigma_twocomp-1.png | Bin 44554 -> 43910 bytes docs/dev/reference/sigma_twocomp.html | 8 +- docs/dev/reference/summary.mkinfit.html | 12 +- docs/dev/reference/summary.nlme.mmkin.html | 226 ++++++++++----------- docs/dev/reference/summary.saem.mmkin.html | 14 +- .../reference/synthetic_data_for_UBA_2014-1.png | Bin 70005 -> 67191 bytes .../dev/reference/synthetic_data_for_UBA_2014.html | 32 +-- docs/dev/reference/test_data_from_UBA_2014-1.png | Bin 59592 -> 57395 bytes docs/dev/reference/test_data_from_UBA_2014-2.png | Bin 76645 -> 72786 bytes docs/dev/reference/test_data_from_UBA_2014.html | 26 +-- docs/dev/reference/transform_odeparms.html | 2 +- docs/dev/reference/update.mkinfit-1.png | Bin 43366 -> 42360 bytes docs/dev/reference/update.mkinfit-2.png | Bin 44304 -> 43389 bytes docs/dev/reference/update.mkinfit.html | 4 +- test.log | 28 +-- vignettes/FOCUS_D.html | 4 +- vignettes/FOCUS_L.html | 32 +-- vignettes/web_only/mkin_benchmarks.rda | Bin 1081 -> 1137 bytes 183 files changed, 1020 insertions(+), 739 deletions(-) create mode 100644 docs/dev/articles/FOCUS_D_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/FOCUS_D_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/FOCUS_L_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/FOCUS_L_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/mkin_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/mkin_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/twa_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/twa_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/web_only/FOCUS_Z_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/web_only/FOCUS_Z_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/web_only/NAFTA_examples_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/web_only/NAFTA_examples_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/web_only/benchmarks_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/web_only/benchmarks_files/header-attrs-2.6/header-attrs.js create mode 100644 docs/dev/articles/web_only/compiled_models_files/accessible-code-block-0.0.1/empty-anchor.js create mode 100644 docs/dev/articles/web_only/compiled_models_files/header-attrs-2.6/header-attrs.js diff --git a/GNUmakefile b/GNUmakefile index 8604d3b3..d7c68ebf 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -112,7 +112,7 @@ pd: roxygen "$(RBIN)/Rscript" -e "pkgdown::build_site(run_dont_run = TRUE, lazy = TRUE)" git add -A -pd_release: roxygen +pd_all: roxygen "$(RBIN)/Rscript" -e "pkgdown::build_site(run_dont_run = TRUE)" git add -A diff --git a/build.log b/build.log index 293831aa..d50a4860 100644 --- a/build.log +++ b/build.log @@ -6,4 +6,5 @@ * creating vignettes ... OK * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories -* building ‘mkin_1.0.2.9000.tar.gz’ +* building ‘mkin_1.0.3.9000.tar.gz’ + diff --git a/check.log b/check.log index 2a4d87ad..ac59f6af 100644 --- a/check.log +++ b/check.log @@ -5,12 +5,12 @@ * using options ‘--no-tests --as-cran’ * checking for file ‘mkin/DESCRIPTION’ ... OK * checking extension type ... Package -* this is package ‘mkin’ version ‘1.0.2.9000’ +* this is package ‘mkin’ version ‘1.0.3.9000’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: ‘Johannes Ranke ’ -Version contains large components (1.0.2.9000) +Version contains large components (1.0.3.9000) Unknown, possibly mis-spelled, fields in DESCRIPTION: ‘Remotes’ diff --git a/docs/dev/404.html b/docs/dev/404.html index ea547a2a..f9e51aa3 100644 --- a/docs/dev/404.html +++ b/docs/dev/404.html @@ -71,7 +71,7 @@ mkin - 1.0.2.9000 + 1.0.3.9000
    diff --git a/docs/dev/articles/FOCUS_D.html b/docs/dev/articles/FOCUS_D.html index dd86f677..a35a255a 100644 --- a/docs/dev/articles/FOCUS_D.html +++ b/docs/dev/articles/FOCUS_D.html @@ -32,7 +32,7 @@ mkin - 0.9.50.4 + 1.0.3.9000
    @@ -81,7 +81,7 @@
    diff --git a/docs/dev/reference/DFOP.solution.html b/docs/dev/reference/DFOP.solution.html index 22b28732..3ee660f2 100644 --- a/docs/dev/reference/DFOP.solution.html +++ b/docs/dev/reference/DFOP.solution.html @@ -73,7 +73,7 @@ two exponential decline functions." /> mkin - 0.9.50.4 + 1.0.3.9000
    @@ -122,7 +122,7 @@ two exponential decline functions." />
    @@ -121,7 +121,7 @@
    #> $par #> parent_0 log_alpha log_beta sigma -#> 99.666193 2.549849 5.050586 1.890202 +#> 99.666192 2.549850 5.050586 1.890202 #> #> $objective #> [1] 28.58291 diff --git a/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html b/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html index 16d12378..a188430d 100644 --- a/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html +++ b/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html @@ -76,7 +76,7 @@ in this fit." /> mkin - 0.9.50.4 + 1.0.3.9000
    @@ -125,7 +125,7 @@ in this fit." />
    @@ -125,7 +125,7 @@ in this fit." />
    @@ -125,7 +125,7 @@ in this fit." />
    @@ -125,7 +125,7 @@ in this fit." />
    @@ -121,7 +121,7 @@
    @@ -122,7 +122,7 @@ a decreasing rate constant." />
    @@ -122,7 +122,7 @@ between them." />
    @@ -122,7 +122,7 @@ a concentration dependent rate constant." />
    @@ -121,7 +121,7 @@
    @@ -121,7 +121,7 @@
    plot(nafta_att_p5a) diff --git a/docs/dev/reference/Rplot001.png b/docs/dev/reference/Rplot001.png index 17a35806..7f498242 100644 Binary files a/docs/dev/reference/Rplot001.png and b/docs/dev/reference/Rplot001.png differ diff --git a/docs/dev/reference/Rplot002.png b/docs/dev/reference/Rplot002.png index 9b97a634..54c31a3f 100644 Binary files a/docs/dev/reference/Rplot002.png and b/docs/dev/reference/Rplot002.png differ diff --git a/docs/dev/reference/Rplot006.png b/docs/dev/reference/Rplot006.png index 730a7481..81525882 100644 Binary files a/docs/dev/reference/Rplot006.png and b/docs/dev/reference/Rplot006.png differ diff --git a/docs/dev/reference/Rplot007.png b/docs/dev/reference/Rplot007.png index fce3b6ee..10b7455a 100644 Binary files a/docs/dev/reference/Rplot007.png and b/docs/dev/reference/Rplot007.png differ diff --git a/docs/dev/reference/SFO.solution.html b/docs/dev/reference/SFO.solution.html index b3e7ef9a..43c434c6 100644 --- a/docs/dev/reference/SFO.solution.html +++ b/docs/dev/reference/SFO.solution.html @@ -72,7 +72,7 @@ mkin - 0.9.50.4 + 1.0.3.9000
    @@ -121,7 +121,7 @@
    @@ -125,7 +125,7 @@ and no substance in the bound fraction." />
    @@ -123,7 +123,7 @@ may depend on the predicted value and is specified as a standard deviation." />