aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/mkinfit.R18
-rw-r--r--R/transform_odeparms.R4
2 files changed, 17 insertions, 5 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index ab1977d1..612e43d2 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -364,15 +364,27 @@ summary.mkinfit <- function(object, data = TRUE, distimes = TRUE, alpha = 0.05,
"t value", "Pr(>|t|)", "Pr(>t)"))
blci <- buci <- numeric()
- # Only transform boundaries of CI for one parameter at a time
+ # Transform boundaries of CI for one parameter at a time,
+ # with the exception of sets of formation fractions (single fractions are OK).
+ f_names_skip <- character(0)
+ for (box in mod_vars) { # Figure out sets of fractions to skip
+ f_names <- grep(paste("^f", box, sep = "_"), pnames, value = TRUE)
+ n_paths <- length(f_names)
+ if (n_paths > 1) f_names_skip <- c(f_names_skip, f_names)
+ }
+
for (pname in pnames) {
par.lower <- par.upper <- object$par
par.lower[pname] <- param[pname, "Lower"]
par.upper[pname] <- param[pname, "Upper"]
- blci[pname] <- backtransform_odeparms(par.lower, mod_vars,
+ if (!pname %in% f_names_skip) {
+ blci[pname] <- backtransform_odeparms(par.lower, mod_vars,
object$transform_rates, object$transform_fractions)[pname]
- buci[pname] <- backtransform_odeparms(par.upper, mod_vars,
+ buci[pname] <- backtransform_odeparms(par.upper, mod_vars,
object$transform_rates, object$transform_fractions)[pname]
+ } else {
+ blci[pname] <- buci[pname] <- NA
+ }
}
bparam <- cbind(object$bparms.optim, blci, buci)
dimnames(bparam) <- list(pnames, c("Estimate", "Lower", "Upper"))
diff --git a/R/transform_odeparms.R b/R/transform_odeparms.R
index a0c302f5..2438151b 100644
--- a/R/transform_odeparms.R
+++ b/R/transform_odeparms.R
@@ -30,7 +30,7 @@ transform_odeparms <- function(parms, mod_vars,
else transparms[index_k] <- parms[index_k]
}
- # Go through state variables and apply isotropic logratio transformation if requested
+ # Go through state variables and apply isometric logratio transformation if requested
for (box in mod_vars) {
indices_f <- grep(paste("^f", box, sep = "_"), names(parms))
f_names <- grep(paste("^f", box, sep = "_"), names(parms), value = TRUE)
@@ -73,7 +73,7 @@ backtransform_odeparms <- function(transparms, mod_vars,
else parms[index_k] <- transparms[index_k]
}
- # Go through state variables and apply inverse isotropic logratio transformation
+ # Go through state variables and apply inverse isometric logratio transformation
for (box in mod_vars) {
indices_f <- grep(paste("^f", box, sep = "_"), names(transparms))
f_names <- grep(paste("^f", box, sep = "_"), names(transparms), value = TRUE)

Contact - Imprint