diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2021-06-09 16:53:31 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-06-09 17:00:41 +0200 |
commit | c6eb6b2bb598002523c3d34d71b0e4a99671ccd6 (patch) | |
tree | 7c13470ea01fca6c1cec3749b66a84a17154ec82 /R/saem.R | |
parent | 9907f17aa98bddfe60e82a71c70a2fea914a02f7 (diff) |
Rudimentary support for setting up nlmixr models
- All degradation models are specified as ODE models. This appears to be
fast enough
- Error models are being translated to nlmixr as close to the mkin error
model as possible. When using the 'saem' backend, it appears not to be
possible to use the same error model for more than one observed variable
- No support yet for models with parallel formation of metabolites, where
the ilr transformation is used in mkin per default
- There is a bug in nlmixr which appears to be triggered if the data are
not balanced, see nlmixrdevelopment/nlmixr#530
- There is a print and a plot method, the summary method is not finished
Diffstat (limited to 'R/saem.R')
-rw-r--r-- | R/saem.R | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,6 +13,7 @@ utils::globalVariables(c("predicted", "std")) #' psi0 of [saemix::saemixModel()] are the mean values of the parameters found #' using [mmkin]. #' +#' @importFrom utils packageVersion #' @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 @@ -230,6 +231,11 @@ print.saem.mmkin <- function(x, digits = max(3, getOption("digits") - 3), ...) { saemix_model <- function(object, solution_type = "auto", transformations = c("mkin", "saemix"), degparms_start = numeric(), test_log_parms = FALSE, verbose = FALSE, ...) { + if (packageVersion("saemix") < "3.1.9000") { + stop("To use the interface to saemix, you need to install a development version\n", + "preferably https://github.com/jranke/saemixextension@warp_combined") + } + if (nrow(object) > 1) stop("Only row objects allowed") mkin_model <- object[[1]]$mkinmod |