From 351248d07f810ccb6c497633a02cd48ee35526e6 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 2 Mar 2022 13:11:49 +0100 Subject: Fix nlmixr fits with parallel metabolites --- man/nlmixr.mmkin.Rd | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'man/nlmixr.mmkin.Rd') diff --git a/man/nlmixr.mmkin.Rd b/man/nlmixr.mmkin.Rd index f9349727..e8a9d170 100644 --- a/man/nlmixr.mmkin.Rd +++ b/man/nlmixr.mmkin.Rd @@ -216,6 +216,30 @@ AIC( plot(f_nlmixr_fomc_sfo_focei_obs_tc) summary(f_nlmixr_fomc_sfo_focei_obs_tc) } + +# Two parallel metabolites +dmta_ds <- lapply(1:7, function(i) { + ds_i <- dimethenamid_2018$ds[[i]]$data + ds_i[ds_i$name == "DMTAP", "name"] <- "DMTA" + ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] + ds_i +}) +names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) +dmta_ds[["Elliot"]] <- rbind(dmta_ds[["Elliot 1"]], dmta_ds[["Elliot 2"]]) +dmta_ds[["Elliot 1"]] <- NULL +dmta_ds[["Elliot 2"]] <- NULL +sfo_sfo2 <- mkinmod( + DMTA = mkinsub("SFO", c("M23", "M27")), + M23 = mkinsub("SFO"), + M27 = mkinsub("SFO"), + quiet = TRUE +) +f_dmta_sfo_sfo2 <- mmkin( + list("SFO-SFO2" = sfo_sfo2), + dmta_ds, quiet = TRUE, error_model = "obs") +nlmixr_model(f_dmta_sfo_sfo2) +nlmixr_focei_dmta_sfo_sfo2 <- nlmixr(f_dmta_sfo_sfo2, est = "focei") + } \seealso{ \link{summary.nlmixr.mmkin} \link{plot.mixed.mmkin} -- cgit v1.2.1