From cc50f8cad0f608cd2fb9d385f664fc4f53277b2b Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 29 Sep 2021 14:38:38 +0200 Subject: Reduce noise in nlmixr.mmkin output in examples --- R/nlmixr.R | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'R') 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")) -- cgit v1.2.1