diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-11-08 02:12:55 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-11-08 02:12:55 +0100 |
commit | 279a1d83d7cbe39a953467762629eb1abb9addf4 (patch) | |
tree | 5f8eb219317d3d3262b0ba027c81a1116bb52ecd /R/summary.nlme.mmkin.R | |
parent | 37cb2b4b793fa699d033632158e3604c37678c20 (diff) |
Improve saem method, add summary
Also make the endpoints function work for saem objects.
Diffstat (limited to 'R/summary.nlme.mmkin.R')
-rw-r--r-- | R/summary.nlme.mmkin.R | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/R/summary.nlme.mmkin.R b/R/summary.nlme.mmkin.R index 9fdd3f73..7e404e00 100644 --- a/R/summary.nlme.mmkin.R +++ b/R/summary.nlme.mmkin.R @@ -75,7 +75,7 @@ summary.nlme.mmkin <- function(object, data = FALSE, verbose = FALSE, distimes = confint_trans <- intervals(object, which = "fixed", level = 1 - alpha)$fixed attr(confint_trans, "label") <- NULL pnames <- rownames(confint_trans) - confint_trans[, "est."] + bp <- backtransform_odeparms(confint_trans[, "est."], object$mkinmod, object$transform_rates, object$transform_fractions) bpnames <- names(bp) @@ -127,14 +127,12 @@ summary.nlme.mmkin <- function(object, data = FALSE, verbose = FALSE, distimes = object$diffs <- object$mkinmod$diffs object$print_data <- data - if (data) { - object$data[["observed"]] <- object$data[["value"]] - object$data[["value"]] <- NULL - object$data[["predicted"]] <- predict(object) - object$data[["residual"]] <- residuals(object, type = "response") - object$data[["std"]] <- object$sigma <- 1/attr(object$modelStruct$varStruct, "weights") - object$data[["standardized"]] <- residuals(object, type = "pearson") - } + object$data[["observed"]] <- object$data[["value"]] + object$data[["value"]] <- NULL + object$data[["predicted"]] <- predict(object) + object$data[["residual"]] <- residuals(object, type = "response") + object$data[["std"]] <- object$sigma <- 1/attr(object$modelStruct$varStruct, "weights") + object$data[["standardized"]] <- residuals(object, type = "pearson") object$verbose <- verbose object$fixed <- object$mmkin_orig[[1]]$fixed @@ -200,11 +198,13 @@ print.summary.nlme.mmkin <- function(x, digits = max(3, getOption("digits") - 3) print(corr, title = "\nCorrelation:", ...) } + cat("\n") # Random effects + print(summary(x$modelStruct), sigma = x$sigma, + reEstimates = x$coef$random, verbose = verbose, ...) + cat("\nBacktransformed parameters with asymmetric confidence intervals:\n") print(x$confint_back) - print(summary(x$modelStruct), sigma = x$sigma, - reEstimates = x$coef$random, verbose = verbose, ...) printSFORB <- !is.null(x$SFORB) if(printSFORB){ |