From 0c9b2f0e3c8ce65cb790c9e048476784cbbea070 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 11 Jun 2021 11:14:45 +0200 Subject: Finished 'summary.nlmixr.mmkin', checks, docs --- man/endpoints.Rd | 4 ++-- man/mean_degparms.Rd | 2 ++ man/nlmixr.mmkin.Rd | 24 +++++++++++++++++++----- man/reexports.Rd | 5 ++++- man/summary.nlmixr.mmkin.Rd | 17 ++++++++++------- man/summary.saem.mmkin.Rd | 24 +++++++++++------------- 6 files changed, 48 insertions(+), 28 deletions(-) (limited to 'man') diff --git a/man/endpoints.Rd b/man/endpoints.Rd index 72487717..a37ff98d 100644 --- a/man/endpoints.Rd +++ b/man/endpoints.Rd @@ -8,8 +8,8 @@ with mkinfit} endpoints(fit) } \arguments{ -\item{fit}{An object of class \link{mkinfit}, \link{nlme.mmkin} or -\link{saem.mmkin}. Or another object that has list components +\item{fit}{An object of class \link{mkinfit}, \link{nlme.mmkin}, \link{saem.mmkin} or +\link{nlmixr.mmkin}. Or another object that has list components mkinmod containing an \link{mkinmod} degradation model, and two numeric vectors, bparms.optim and bparms.fixed, that contain parameter values for that model.} diff --git a/man/mean_degparms.Rd b/man/mean_degparms.Rd index 92ed4c9d..5e2b4b0f 100644 --- a/man/mean_degparms.Rd +++ b/man/mean_degparms.Rd @@ -7,6 +7,8 @@ mean_degparms(object, random = FALSE, test_log_parms = FALSE, conf.level = 0.6) } \arguments{ +\item{object}{An mmkin row object containing several fits of the same model to different datasets} + \item{random}{Should a list with fixed and random effects be returned?} \item{test_log_parms}{If TRUE, log parameters are only considered in diff --git a/man/nlmixr.mmkin.Rd b/man/nlmixr.mmkin.Rd index 86bbdc9f..4ab30272 100644 --- a/man/nlmixr.mmkin.Rd +++ b/man/nlmixr.mmkin.Rd @@ -29,7 +29,8 @@ nlmixr_model( degparms_start = "auto", test_log_parms = FALSE, conf.level = 0.6, - error_model = object[[1]]$err_mod + error_model = object[[1]]$err_mod, + add_attributes = FALSE ) nlmixr_data(object, ...) @@ -38,9 +39,16 @@ nlmixr_data(object, ...) \item{object}{An \link{mmkin} row object containing several fits of the same \link{mkinmod} model to different datasets} +\item{data}{Not used, as the data are extracted from the mmkin row object} + \item{est}{Estimation method passed to \link[nlmixr:nlmixr]{nlmixr::nlmixr}} -\item{control}{Passed to \link[nlmixr:nlmixr]{nlmixr::nlmixr}.} +\item{control}{Passed to \link[nlmixr:nlmixr]{nlmixr::nlmixr}} + +\item{table}{Passed to \link[nlmixr:nlmixr]{nlmixr::nlmixr}} + +\item{error_model}{Possibility to override the error model which is being +set based on the error model used in the mmkin row object.} \item{test_log_parms}{If TRUE, an attempt is made to use more robust starting values for population parameters fitted as log parameters in mkin (like @@ -52,6 +60,10 @@ for parameter that are tested if requested by 'test_log_parms'.} \item{\dots}{Passed to \link{nlmixr_model}} +\item{save}{Passed to \link[nlmixr:nlmixr]{nlmixr::nlmixr}} + +\item{envir}{Passed to \link[nlmixr:nlmixr]{nlmixr::nlmixr}} + \item{x}{An nlmixr.mmkin object to print} \item{digits}{Number of digits to use for printing} @@ -59,8 +71,9 @@ for parameter that are tested if requested by 'test_log_parms'.} \item{degparms_start}{Parameter values given as a named numeric vector will be used to override the starting values obtained from the 'mmkin' object.} -\item{solution_type}{Possibility to specify the solution type in case the -automatic choice is not desired} +\item{add_attributes}{Should the starting values used for degradation model +parameters and their distribution and for the error model parameters +be returned as attributes?} } \value{ An S3 object of class 'nlmixr.mmkin', containing the fitted @@ -81,9 +94,11 @@ 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 \link{mkinfit}. } \examples{ +\dontrun{ ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) subset(x$data[c("name", "time", "value")])) names(ds) <- paste("Dataset", 6:10) + f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP", "HS"), ds, quiet = TRUE, cores = 1) f_mmkin_parent_tc <- mmkin(c("SFO", "FOMC", "DFOP"), ds, error_model = "tc", cores = 1, quiet = TRUE) @@ -117,7 +132,6 @@ AIC(nlme(f_mmkin_parent["HS", ])) # solution, the two-component error model does not improve it plot(f_nlmixr_fomc_saem) -\dontrun{ sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) fomc_sfo <- mkinmod(parent = mkinsub("FOMC", "A1"), diff --git a/man/reexports.Rd b/man/reexports.Rd index ccba7567..d4fc6b96 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -1,10 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/lrtest.mkinfit.R, R/nlme.mmkin.R +% Please edit documentation in R/lrtest.mkinfit.R, R/nlme.mmkin.R, R/nlmixr.R \docType{import} \name{reexports} \alias{reexports} \alias{lrtest} \alias{nlme} +\alias{nlmixr} \title{Objects exported from other packages} \keyword{internal} \description{ @@ -15,5 +16,7 @@ below to see their documentation. \item{lmtest}{\code{\link[lmtest]{lrtest}}} \item{nlme}{\code{\link[nlme]{nlme}}} + + \item{nlmixr}{\code{\link[nlmixr]{nlmixr}}} }} diff --git a/man/summary.nlmixr.mmkin.Rd b/man/summary.nlmixr.mmkin.Rd index 03f0ffb2..ab8abd5d 100644 --- a/man/summary.nlmixr.mmkin.Rd +++ b/man/summary.nlmixr.mmkin.Rd @@ -2,12 +2,15 @@ % Please edit documentation in R/summary.nlmixr.mmkin.R \name{summary.nlmixr.mmkin} \alias{summary.nlmixr.mmkin} +\alias{print.summary.nlmixr.mmkin} \title{Summary method for class "nlmixr.mmkin"} \usage{ \method{summary}{nlmixr.mmkin}(object, data = FALSE, verbose = FALSE, distimes = TRUE, ...) + +\method{print}{summary.nlmixr.mmkin}(x, digits = max(3, getOption("digits") - 3), verbose = x$verbose, ...) } \arguments{ -\item{object}{an object of class \link{nlmix.mmkin}} +\item{object}{an object of class \link{nlmixr.mmkin}} \item{data}{logical, indicating whether the full data should be included in the summary.} @@ -19,7 +22,7 @@ included.} \item{\dots}{optional arguments passed to methods like \code{print}.} -\item{x}{an object of class \link{summary.nlmix.mmkin}} +\item{x}{an object of class \link{summary.nlmixr.mmkin}} \item{digits}{Number of digits to use for printing} } @@ -32,9 +35,7 @@ produced} \item{diffs}{The differential equations used in the degradation model} \item{use_of_ff}{Was maximum or minimum use made of formation fractions} \item{data}{The data} -\item{confint_trans}{Transformed parameters as used in the optimisation, with confidence intervals} \item{confint_back}{Backtransformed parameters, with confidence intervals if available} -\item{confint_errmod}{Error model parameters with confidence intervals} \item{ff}{The estimated formation fractions derived from the fitted model.} \item{distimes}{The DT50 and DT90 values for each observed variable.} @@ -85,12 +86,14 @@ ds_syn_dfop_sfo <- lapply(ds_mean_dfop_sfo, function(ds) { \dontrun{ # Evaluate using mmkin and nlmixr f_mmkin_dfop_sfo <- mmkin(list(dfop_sfo), ds_syn_dfop_sfo, - quiet = TRUE, error_model = "obs", cores = 5) + quiet = TRUE, error_model = "tc", cores = 5) f_saemix_dfop_sfo <- mkin::saem(f_mmkin_dfop_sfo) f_nlme_dfop_sfo <- mkin::nlme(f_mmkin_dfop_sfo) f_nlmixr_dfop_sfo_saem <- nlmixr(f_mmkin_dfop_sfo, est = "saem") -#f_nlmixr_dfop_sfo_focei <- nlmixr(f_mmkin_dfop_sfo, est = "focei") -summary(f_nlmixr_dfop_sfo, data = TRUE) +# The following takes a very long time but gives +f_nlmixr_dfop_sfo_focei <- nlmixr(f_mmkin_dfop_sfo, est = "focei") +AIC(f_nlmixr_dfop_sfo_saem$nm, f_nlmixr_dfop_sfo_focei$nm) +summary(f_nlmixr_dfop_sfo_sfo, data = TRUE) } } diff --git a/man/summary.saem.mmkin.Rd b/man/summary.saem.mmkin.Rd index 86938d31..67cb3cbb 100644 --- a/man/summary.saem.mmkin.Rd +++ b/man/summary.saem.mmkin.Rd @@ -1,32 +1,30 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/summary.nlmixr.mmkin.R, R/summary.saem.mmkin.R -\name{print.summary.saem.mmkin} -\alias{print.summary.saem.mmkin} +% Please edit documentation in R/summary.saem.mmkin.R +\name{summary.saem.mmkin} \alias{summary.saem.mmkin} +\alias{print.summary.saem.mmkin} \title{Summary method for class "saem.mmkin"} \usage{ -\method{print}{summary.saem.mmkin}(x, digits = max(3, getOption("digits") - 3), verbose = x$verbose, ...) - \method{summary}{saem.mmkin}(object, data = FALSE, verbose = FALSE, distimes = TRUE, ...) \method{print}{summary.saem.mmkin}(x, digits = max(3, getOption("digits") - 3), verbose = x$verbose, ...) } \arguments{ -\item{x}{an object of class \link{summary.saem.mmkin}} - -\item{digits}{Number of digits to use for printing} - -\item{verbose}{Should the summary be verbose?} - -\item{\dots}{optional arguments passed to methods like \code{print}.} - \item{object}{an object of class \link{saem.mmkin}} \item{data}{logical, indicating whether the full data should be included in the summary.} +\item{verbose}{Should the summary be verbose?} + \item{distimes}{logical, indicating whether DT50 and DT90 values should be included.} + +\item{\dots}{optional arguments passed to methods like \code{print}.} + +\item{x}{an object of class \link{summary.saem.mmkin}} + +\item{digits}{Number of digits to use for printing} } \value{ The summary function returns a list based on the \link[saemix:SaemixObject-class]{saemix::SaemixObject} -- cgit v1.2.1