diff options
Diffstat (limited to 'R')
-rw-r--r-- | R/mixed.mmkin.R | 3 | ||||
-rw-r--r-- | R/plot.mixed.mmkin.R | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/R/mixed.mmkin.R b/R/mixed.mmkin.R index 7aa5edd5..682a9a34 100644 --- a/R/mixed.mmkin.R +++ b/R/mixed.mmkin.R @@ -3,6 +3,8 @@ #' @param object An [mmkin] row object #' @param method The method to be used #' @param \dots Currently not used +#' @return An object of class 'mixed.mmkin' which has the observed data in a +#' single dataframe which is convenient for plotting #' @examples #' sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) #' n_biphasic <- 8 @@ -54,7 +56,6 @@ mixed.mmkin <- function(object, method = c("none"), ...) { if (nrow(object) > 1) stop("Only row objects allowed") method <- match.arg(method) - if (method == "default") method = c("naive", "nlme") ds_names <- colnames(object) res <- list(mmkin = object, mkinmod = object[[1]]$mkinmod) diff --git a/R/plot.mixed.mmkin.R b/R/plot.mixed.mmkin.R index 21399496..f0682c10 100644 --- a/R/plot.mixed.mmkin.R +++ b/R/plot.mixed.mmkin.R @@ -10,6 +10,10 @@ utils::globalVariables("ds") #' `resplot = "time"`. #' @param pred_over Named list of alternative predictions as obtained #' from [mkinpredict] with a compatible [mkinmod]. +#' @param test_log_parms Passed to [mean_degparms] in the case of an +#' [mixed.mmkin] object +#' @param conf.level Passed to [mean_degparms] in the case of an +#' [mixed.mmkin] object #' @param rel.height.legend The relative height of the legend shown on top #' @param rel.height.bottom The relative height of the bottom plot row #' @param ymax Vector of maximum y axis values @@ -58,6 +62,8 @@ plot.mixed.mmkin <- function(x, xlim = range(x$data$time), resplot = c("predicted", "time"), pred_over = NULL, + test_log_parms = FALSE, + conf.level = 0.6, ymax = "auto", maxabs = "auto", ncol.legend = ifelse(length(i) <= 3, length(i) + 1, ifelse(length(i) <= 8, 3, 4)), nrow.legend = ceiling((length(i) + 1) / ncol.legend), @@ -76,7 +82,7 @@ plot.mixed.mmkin <- function(x, backtransform = TRUE if (identical(class(x), "mixed.mmkin")) { - degparms_pop <- mean_degparms(x$mmkin) + degparms_pop <- mean_degparms(x$mmkin, test_log_parms = test_log_parms, conf.level = conf.level) degparms_tmp <- parms(x$mmkin, transformed = TRUE) degparms_i <- as.data.frame(t(degparms_tmp[setdiff(rownames(degparms_tmp), names(fit_1$errparms)), ])) |