aboutsummaryrefslogtreecommitdiff
path: root/R/nlmixr.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-09-29 14:38:38 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2021-09-29 14:38:38 +0200
commitcc50f8cad0f608cd2fb9d385f664fc4f53277b2b (patch)
treeb35595d3cf7015fb422a14aa0018c92da5877fe8 /R/nlmixr.R
parent5c15ef747568b3a9a9c094b6aa546dc80e3aa87a (diff)
Reduce noise in nlmixr.mmkin output in examples
Diffstat (limited to 'R/nlmixr.R')
-rw-r--r--R/nlmixr.R39
1 files changed, 25 insertions, 14 deletions
diff --git a/R/nlmixr.R b/R/nlmixr.R
index 5f7950ed..f8fffba9 100644
--- a/R/nlmixr.R
+++ b/R/nlmixr.R
@@ -7,7 +7,8 @@ nlmixr::nlmixr
#'
#' This function uses [nlmixr::nlmixr()] as a backend for fitting nonlinear mixed
#' effects models created from [mmkin] row objects using the Stochastic Approximation
-#' Expectation Maximisation algorithm (SAEM).
+#' Expectation Maximisation algorithm (SAEM) or First Order Conditional
+#' Estimation with Interaction (FOCEI).
#'
#' 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].
@@ -51,20 +52,31 @@ nlmixr::nlmixr
#' f_mmkin_parent_tc <- mmkin(c("SFO", "FOMC", "DFOP"), ds, error_model = "tc",
#' cores = 1, quiet = TRUE)
#'
-#' f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem")
-#' f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei")
+#' library(nlmixr)
+#' f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem",
+#' control = saemControl(print = 0))
+#' f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei",
+#' control = foceiControl(print = 0))
#'
-#' f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem")
-#' f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei")
+#' f_nlmixr_fomc_saem <- nlmixr(f_mmkin_parent["FOMC", ], est = "saem",
+#' control = saemControl(print = 0))
+#' f_nlmixr_fomc_focei <- nlmixr(f_mmkin_parent["FOMC", ], est = "focei",
+#' control = foceiControl(print = 0))
#'
-#' f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem")
-#' f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei")
+#' f_nlmixr_dfop_saem <- nlmixr(f_mmkin_parent["DFOP", ], est = "saem",
+#' control = saemControl(print = 0))
+#' f_nlmixr_dfop_focei <- nlmixr(f_mmkin_parent["DFOP", ], est = "focei",
+#' control = foceiControl(print = 0))
#'
-#' f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem")
-#' f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei")
+#' f_nlmixr_hs_saem <- nlmixr(f_mmkin_parent["HS", ], est = "saem",
+#' control = saemControl(print = 0))
+#' f_nlmixr_hs_focei <- nlmixr(f_mmkin_parent["HS", ], est = "focei",
+#' control = foceiControl(print = 0))
#'
-#' f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem")
-#' f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei")
+#' f_nlmixr_fomc_saem_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "saem",
+#' control = saemControl(print = 0))
+#' f_nlmixr_fomc_focei_tc <- nlmixr(f_mmkin_parent_tc["FOMC", ], est = "focei",
+#' control = foceiControl(print = 0))
#'
#' AIC(
#' f_nlmixr_sfo_saem$nm, f_nlmixr_sfo_focei$nm,
@@ -76,9 +88,8 @@ nlmixr::nlmixr
#' AIC(nlme(f_mmkin_parent["FOMC", ]))
#' AIC(nlme(f_mmkin_parent["HS", ]))
#'
-#' # nlme is comparable to nlmixr with focei, saem finds a better
-#' # solution, the two-component error model does not improve it
-#' plot(f_nlmixr_fomc_saem)
+#' # The FOCEI fit of FOMC with constant variance or the tc error model is best
+#' plot(f_nlmixr_fomc_saem_tc)
#'
#' sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"),
#' A1 = mkinsub("SFO"))

Contact - Imprint