aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/dimethenamid_2018.R33
-rw-r--r--R/mkinsub.R5
2 files changed, 24 insertions, 14 deletions
diff --git a/R/dimethenamid_2018.R b/R/dimethenamid_2018.R
index 6e0bda0c..770649e2 100644
--- a/R/dimethenamid_2018.R
+++ b/R/dimethenamid_2018.R
@@ -15,7 +15,7 @@
#' @source Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018)
#' Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate and behaviour
#' Rev. 2 - November 2017
-#' \url{http://registerofquestions.efsa.europa.eu/roqFrontend/outputLoader?output=ON-5211}
+#' \url{https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716}
#' @examples
#' print(dimethenamid_2018)
#' dmta_ds <- lapply(1:8, function(i) {
@@ -43,15 +43,30 @@
#' list("DFOP-SFO3+" = dfop_sfo3_plus),
#' dmta_ds, quiet = TRUE, error_model = "tc")
#' nlmixr_model(f_dmta_mkin_tc)
-#' f_dmta_nlmixr_focei <- nlmixr(f_dmta_mkin_tc, est = "focei",
-#' control = nlmixr::foceiControl(print = 500))
+#' # The focei fit takes about four minutes on my system
+#' system.time(
+#' f_dmta_nlmixr_focei <- nlmixr(f_dmta_mkin_tc, est = "focei",
+#' control = nlmixr::foceiControl(print = 500))
+#' )
#' summary(f_dmta_nlmixr_focei)
#' plot(f_dmta_nlmixr_focei)
-#' # saem has a problem with this model/data combination, maybe because of the
-#' # overparameterised error model, to be investigated
-#' #f_dmta_nlmixr_saem <- nlmixr(f_dmta_mkin_tc, est = "saem",
-#' # control = saemControl(print = 500))
-#' #summary(f_dmta_nlmixr_saem)
-#' #plot(f_dmta_nlmixr_saem)
+#' # Using saemix takes about 18 minutes
+#' system.time(
+#' f_dmta_saemix <- saem(f_dmta_mkin_tc, test_log_parms = TRUE)
+#' )
+#'
+#' # nlmixr with est = "saem" is pretty fast with default iteration numbers, most
+#' # of the time (about 2.5 minutes) is spent for calculating the log likelihood at the end
+#' # The likelihood calculated for the nlmixr fit is much lower than that found by saemix
+#' # Also, the trace plot and the plot of the individual predictions is not
+#' # convincing for the parent. It seems we are fitting an overparameterised
+#' # model, so the result we get strongly depends on starting parameters and control settings.
+#' system.time(
+#' f_dmta_nlmixr_saem <- nlmixr(f_dmta_mkin_tc, est = "saem",
+#' control = nlmixr::saemControl(print = 500, logLik = TRUE, nmc = 9))
+#' )
+#' traceplot(f_dmta_nlmixr_saem$nm)
+#' summary(f_dmta_nlmixr_saem)
+#' plot(f_dmta_nlmixr_saem)
#' }
"dimethenamid_2018"
diff --git a/R/mkinsub.R b/R/mkinsub.R
index 886f712c..93af3f16 100644
--- a/R/mkinsub.R
+++ b/R/mkinsub.R
@@ -1,8 +1,3 @@
-#' Function to set up a kinetic submodel for one state variable
-#'
-#' This is a convenience function to set up the lists used as arguments for
-#' \code{\link{mkinmod}}.
-#'
#' @rdname mkinmod
#' @param submodel Character vector of length one to specify the submodel type.
#' See \code{\link{mkinmod}} for the list of allowed submodel names.

Contact - Imprint