aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-05-20 08:36:42 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-05-20 09:50:33 +0200
commit4110808d1953b8704ef48d0dc5b5e445cbde9af0 (patch)
tree72b3fb574fecc0494baadf48cea71de2ea5a5b8a /R/mkinfit.R
parent9a594513914874eac093046678f0e7a5ab640871 (diff)
Step back regarding confidence intervals of formation fractions
- Don't give confidence intervals for formation fractions that belong to a set, only for single formation fractions - Update the vignette with history and background - Correct 'isotropic' into 'isometric' in the ilr documentation, the README and the comments in transform_odeparms - Candidate for release to CRAN
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R18
1 files changed, 15 insertions, 3 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"))

Contact - Imprint