diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2023-04-02 16:58:56 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2023-04-02 16:58:56 +0200 |
commit | 0311f0658a276fab84e78c060b73c0b46c33b100 (patch) | |
tree | cbf4ba9576869008978848a403833679638e5cbb /R/summary.saem.mmkin.R | |
parent | 7d5f4cd06b5a3a95a98b345f6b5e1e4ab3526e0a (diff) |
Deal with covariates in summary for saem.mmkin objects
Diffstat (limited to 'R/summary.saem.mmkin.R')
-rw-r--r-- | R/summary.saem.mmkin.R | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/R/summary.saem.mmkin.R b/R/summary.saem.mmkin.R index 49b02a50..c470ccf0 100644 --- a/R/summary.saem.mmkin.R +++ b/R/summary.saem.mmkin.R @@ -15,6 +15,7 @@ #' included. #' @param digits Number of digits to use for printing #' @param \dots optional arguments passed to methods like \code{print}. +#' @inheritParams endpoints #' @return The summary function returns a list based on the [saemix::SaemixObject] #' obtained in the fit, with at least the following additional components #' \item{saemixversion, mkinversion, Rversion}{The saemix, mkin and R versions used} @@ -93,7 +94,9 @@ #' } #' #' @export -summary.saem.mmkin <- function(object, data = FALSE, verbose = FALSE, distimes = TRUE, ...) { +summary.saem.mmkin <- function(object, data = FALSE, verbose = FALSE, + covariates = NULL, covariate_quantile = 0.5, + distimes = TRUE, ...) { mod_vars <- names(object$mkinmod$diffs) @@ -199,6 +202,7 @@ summary.saem.mmkin <- function(object, data = FALSE, verbose = FALSE, distimes = } ep <- endpoints(object) + object$covariates <- ep$covariates if (length(ep$ff) != 0) object$ff <- ep$ff if (distimes) object$distimes <- ep$distimes @@ -281,6 +285,11 @@ print.summary.saem.mmkin <- function(x, digits = max(3, getOption("digits") - 3) print(x$confint_back, digits = digits) } + if (!is.null(x$covariates)) { + cat("\nCovariates used for endpoints below:\n") + print(x$covariates) + } + printSFORB <- !is.null(x$SFORB) if(printSFORB){ cat("\nEstimated Eigenvalues of SFORB model(s):\n") |