diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-31 17:01:58 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-31 17:01:58 +0100 |
commit | 300aa6ec27529f46deda07874566dc8fcee4e6e7 (patch) | |
tree | 5a78a7bad10e569d439060ee09547e27f9a45c7b | |
parent | e444e3eb3e21c66c34ce48775467cd9fa53f2a92 (diff) |
Fix R CMD check
-rw-r--r-- | NAMESPACE | 2 | ||||
-rw-r--r-- | R/mhmkin.R | 8 | ||||
-rw-r--r-- | log/check.log | 2 | ||||
-rw-r--r-- | log/test.log | 20 | ||||
-rw-r--r-- | man/anova.saem.mmkin.Rd | 6 | ||||
-rw-r--r-- | man/mhmkin.Rd | 7 | ||||
-rw-r--r-- | man/saem.Rd | 4 |
7 files changed, 32 insertions, 17 deletions
@@ -6,6 +6,7 @@ S3method(AIC,mhmkin) S3method(AIC,mmkin) S3method(BIC,mhmkin) S3method(BIC,mmkin) +S3method(anova,mhmkin) S3method(anova,saem.mmkin) S3method(aw,mixed.mmkin) S3method(aw,mkinfit) @@ -26,6 +27,7 @@ S3method(logLik,saem.mmkin) S3method(lrtest,mkinfit) S3method(lrtest,mmkin) S3method(mhmkin,list) +S3method(mhmkin,mmkin) S3method(mixed,mmkin) S3method(mkinpredict,mkinfit) S3method(mkinpredict,mkinmod) @@ -8,6 +8,8 @@ #' #' @param objects A list of [mmkin] objects containing fits of the same #' degradation models to the same data, but using different error models. +#' Alternatively, a single [mmkin] object containing fits of several +#' degradation models to the same data #' @param backend The backend to be used for fitting. Currently, only saemix is #' supported #' @param algorithm The algorithm to be used for fitting (currently not used) @@ -35,8 +37,8 @@ mhmkin <- function(objects, backend = "saemix", algorithm = "saem", ...) { #' @export #' @rdname mhmkin -mhmkin.mmkin <- function(object, ...) { - mhmkin(list(object), ...) +mhmkin.mmkin <- function(objects, ...) { + mhmkin(list(objects), ...) } #' @export @@ -199,7 +201,7 @@ update.mhmkin <- function(object, ..., evaluate = TRUE) { else call } -#' export +#' @export anova.mhmkin <- function(object, ..., method = c("is", "lin", "gq"), test = FALSE, model.names = "auto") { if (identical(model.names, "auto")) { diff --git a/log/check.log b/log/check.log index c2b4aa50..36bd30ca 100644 --- a/log/check.log +++ b/log/check.log @@ -5,7 +5,7 @@ * using options ‘--no-tests --as-cran’ * checking for file ‘mkin/DESCRIPTION’ ... OK * checking extension type ... Package -* this is package ‘mkin’ version ‘1.1.2’ +* this is package ‘mkin’ version ‘1.2.0’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: ‘Johannes Ranke <johannes.ranke@jrwb.de>’ diff --git a/log/test.log b/log/test.log index b4298c40..bb81dd43 100644 --- a/log/test.log +++ b/log/test.log @@ -5,18 +5,18 @@ ✔ | 5 | Calculation of Akaike weights ✔ | 3 | Export dataset for reading into CAKE ✔ | 12 | Confidence intervals and p-values [1.0s] -✔ | 1 12 | Dimethenamid data from 2018 [31.7s] +✔ | 1 12 | Dimethenamid data from 2018 [31.9s] ──────────────────────────────────────────────────────────────────────────────── Skip (test_dmta.R:98:3): Different backends get consistent results for SFO-SFO3+, dimethenamid data Reason: Fitting this ODE model with saemix takes about 15 minutes on my system ──────────────────────────────────────────────────────────────────────────────── -✔ | 14 | Error model fitting [5.0s] +✔ | 14 | Error model fitting [4.9s] ✔ | 5 | Time step normalisation ✔ | 4 | Calculation of FOCUS chi2 error levels [0.6s] ✔ | 14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.8s] ✔ | 4 | Test fitting the decline of metabolites from their maximum [0.3s] ✔ | 1 | Fitting the logistic model [0.2s] -✔ | 7 | Batch fitting and diagnosing hierarchical kinetic models [14.4s] +✔ | 7 | Batch fitting and diagnosing hierarchical kinetic models [15.8s] ✔ | 1 12 | Nonlinear mixed-effects models [0.3s] ──────────────────────────────────────────────────────────────────────────────── Skip (test_mixed.R:74:3): saemix results are reproducible for biphasic fits @@ -27,12 +27,12 @@ Reason: Fitting with saemix takes around 10 minutes when using deSolve ✔ | 3 | mkinfit features [0.7s] ✔ | 8 | mkinmod model generation and printing [0.2s] ✔ | 3 | Model predictions with mkinpredict [0.3s] -✔ | 7 | Multistart method for saem.mmkin models [38.1s] +✔ | 7 | Multistart method for saem.mmkin models [36.3s] ✔ | 16 | Evaluations according to 2015 NAFTA guidance [2.4s] -✔ | 9 | Nonlinear mixed-effects models with nlme [8.6s] -✔ | 16 | Plotting [9.8s] +✔ | 9 | Nonlinear mixed-effects models with nlme [8.9s] +✔ | 16 | Plotting [9.9s] ✔ | 4 | Residuals extracted from mkinfit models -✔ | 1 36 | saemix parent models [72.0s] +✔ | 1 36 | saemix parent models [72.6s] ──────────────────────────────────────────────────────────────────────────────── Skip (test_saemix_parent.R:152:3): We can also use mkin solution methods for saem Reason: This still takes almost 2.5 minutes although we do not solve ODEs @@ -43,11 +43,11 @@ Reason: This still takes almost 2.5 minutes although we do not solve ODEs ✔ | 1 | Summaries of old mkinfit objects ✔ | 5 | Summary [0.2s] ✔ | 4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.2s] -✔ | 9 | Hypothesis tests [8.3s] -✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.1s] +✔ | 9 | Hypothesis tests [8.1s] +✔ | 4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2s] ══ Results ═════════════════════════════════════════════════════════════════════ -Duration: 208.6 s +Duration: 209.2 s ── Skipped tests ────────────────────────────────────────────────────────────── • Fitting this ODE model with saemix takes about 15 minutes on my system (1) diff --git a/man/anova.saem.mmkin.Rd b/man/anova.saem.mmkin.Rd index ab6022bc..34711c41 100644 --- a/man/anova.saem.mmkin.Rd +++ b/man/anova.saem.mmkin.Rd @@ -31,6 +31,8 @@ only be done for nested models.} an "anova" data frame; the traditional (S3) result of anova() } \description{ -Generate an anova object. The method to calculate the BIC is that from -the saemix package. As in other prominent anova methods, models are sorted +Generate an anova object. The method to calculate the BIC is that from the +saemix package. As in other prominent anova methods, models are sorted by +number of parameters, and the tests (if requested) are always relative to +the model on the previous line. } diff --git a/man/mhmkin.Rd b/man/mhmkin.Rd index 0ef1599e..1a6e3869 100644 --- a/man/mhmkin.Rd +++ b/man/mhmkin.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/mhmkin.R \name{mhmkin} \alias{mhmkin} +\alias{mhmkin.mmkin} \alias{mhmkin.list} \alias{[.mhmkin} \alias{print.mhmkin} @@ -10,6 +11,8 @@ degradation models and one or more error models} \usage{ mhmkin(objects, backend = "saemix", algorithm = "saem", ...) +\method{mhmkin}{mmkin}(objects, ...) + \method{mhmkin}{list}( objects, backend = "saemix", @@ -24,7 +27,9 @@ mhmkin(objects, backend = "saemix", algorithm = "saem", ...) } \arguments{ \item{objects}{A list of \link{mmkin} objects containing fits of the same -degradation models to the same data, but using different error models.} +degradation models to the same data, but using different error models. +Alternatively, a single \link{mmkin} object containing fits of several +degradation models to the same data} \item{backend}{The backend to be used for fitting. Currently, only saemix is supported} diff --git a/man/saem.Rd b/man/saem.Rd index d7b04691..9167b51f 100644 --- a/man/saem.Rd +++ b/man/saem.Rd @@ -14,6 +14,7 @@ saem(object, ...) \method{saem}{mmkin}( object, transformations = c("mkin", "saemix"), + error_model = "auto", degparms_start = numeric(), test_log_parms = TRUE, conf.level = 0.6, @@ -37,6 +38,7 @@ saemix_model( object, solution_type = "auto", transformations = c("mkin", "saemix"), + error_model = "auto", degparms_start = numeric(), covariance.model = "auto", no_random_effect = NULL, @@ -64,6 +66,8 @@ are done in 'saemix' for the supported cases, i.e. (as of version 1.1.2) SFO, FOMC, DFOP and HS without fixing \code{parent_0}, and SFO or DFOP with one SFO metabolite.} +\item{error_model}{Possibility to override the error model used in the mmkin object} + \item{degparms_start}{Parameter values given as a named numeric vector will be used to override the starting values obtained from the 'mmkin' object.} |