aboutsummaryrefslogtreecommitdiff
path: root/R/nlme.mmkin.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-02-08 17:17:29 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-02-08 17:17:29 +0100
commit0fa8a770812775d697717ad723f7f61fb04b7fef (patch)
tree17473ddf787541745d47dab063bc643ec59a9557 /R/nlme.mmkin.R
parentd081384ddcb75a9f92fad33e4e3f6d6796f98e67 (diff)
parentc0638c84568d475b3b059e2c6e593e6f03b846bc (diff)
Merge branch 'nlmixr'
Diffstat (limited to 'R/nlme.mmkin.R')
-rw-r--r--R/nlme.mmkin.R11
1 files changed, 5 insertions, 6 deletions
diff --git a/R/nlme.mmkin.R b/R/nlme.mmkin.R
index ff1f2fff..7049a9a1 100644
--- a/R/nlme.mmkin.R
+++ b/R/nlme.mmkin.R
@@ -24,7 +24,7 @@ get_deg_func <- function() {
#' This functions sets up a nonlinear mixed effects model for an mmkin row
#' object. 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.
-#'
+#'
#' Note that the convergence of the nlme algorithms depends on the quality
#' of the data. In degradation kinetics, we often only have few datasets
#' (e.g. data for few soils) and complicated degradation models, which may
@@ -34,10 +34,9 @@ get_deg_func <- function() {
#' @param data Ignored, data are taken from the mmkin model
#' @param fixed Ignored, all degradation parameters fitted in the
#' mmkin model are used as fixed parameters
-#' @param random If not specified, correlated random effects are set up
-#' for all optimised degradation model parameters using the log-Cholesky
-#' parameterization [nlme::pdLogChol] that is also the default of
-#' the generic [nlme] method.
+#' @param random If not specified, no correlations between random effects are
+#' set up for the optimised degradation model parameters. This is
+#' achieved by using the [nlme::pdDiag] method.
#' @param groups See the documentation of nlme
#' @param start If not specified, mean values of the fitted degradation
#' parameters taken from the mmkin object are used
@@ -135,7 +134,7 @@ nlme.mmkin <- function(model, data = "auto",
function(el) eval(parse(text = paste(el, 1, sep = "~")))),
random = pdDiag(fixed),
groups,
- start = mean_degparms(model, random = TRUE),
+ start = mean_degparms(model, random = TRUE, test_log_parms = TRUE),
correlation = NULL, weights = NULL,
subset, method = c("ML", "REML"),
na.action = na.fail, naPattern,

Contact - Imprint