diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2023-02-13 05:19:08 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2023-02-13 05:19:08 +0100 |
commit | 8d1a84ac2190538ed3bac53a303064e281595868 (patch) | |
tree | acb894d85ab7ec87c4911c355a5264a77e08e34b /R/intervals.R | |
parent | 51d63256a7b3020ee11931d61b4db97b9ded02c0 (diff) | |
parent | 4200e566ad2600f56bc3987669aeab88582139eb (diff) |
Merge branch 'main' into custom_lsoda_call
Diffstat (limited to 'R/intervals.R')
-rw-r--r-- | R/intervals.R | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/R/intervals.R b/R/intervals.R index 705ef6eb..fcdbaea9 100644 --- a/R/intervals.R +++ b/R/intervals.R @@ -78,8 +78,12 @@ intervals.saem.mmkin <- function(object, level = 0.95, backtransform = TRUE, ... # Random effects sdnames <- intersect(rownames(conf.int), paste("SD", pnames, sep = ".")) - ranef_ret <- as.matrix(conf.int[sdnames, c("lower", "est.", "upper")]) - rownames(ranef_ret) <- paste0(gsub("SD\\.", "sd(", sdnames), ")") + corrnames <- grep("^Corr.", rownames(conf.int), value = TRUE) + ranef_ret <- as.matrix(conf.int[c(sdnames, corrnames), c("lower", "est.", "upper")]) + sdnames_ret <- paste0(gsub("SD\\.", "sd(", sdnames), ")") + corrnames_ret <- gsub("Corr\\.(.*)\\.(.*)", "corr(\\1,\\2)", corrnames) + rownames(ranef_ret) <- c(sdnames_ret, corrnames_ret) + attr(ranef_ret, "label") <- "Random effects:" |