diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-29 10:12:12 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-29 10:12:12 +0100 |
commit | 5e4ea59a41e00b05ea6664c08c7922e892e8ab77 (patch) | |
tree | e050dee7ff9ab7baac53d551d659227806dbe8ae /R | |
parent | 900790b4139dd672c7383a3ed6ad2c1e51d855b9 (diff) |
Return single parameters correctly from confint
Static documentation rebuilt by pkgdown
Diffstat (limited to 'R')
-rw-r--r-- | R/confint.mkinfit.R | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/R/confint.mkinfit.R b/R/confint.mkinfit.R index 75813360..fadd14ae 100644 --- a/R/confint.mkinfit.R +++ b/R/confint.mkinfit.R @@ -98,15 +98,17 @@ #' rel_diffs_transformed_ff #' rel_diffs_untransformed_ff #' -#' # The profiling for the following fit does not finish in a reasonable time -#' #m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")), -#' # M1 = mkinsub("SFO"), -#' # M2 = mkinsub("SFO"), -#' # use_of_ff = "max", quiet = TRUE) -#' #DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data -#' #f_tc_2 <- mkinfit(m_synth_DFOP_par, DFOP_par_c, error_model = "tc", -#' # error_model_algorithm = "direct", quiet = TRUE) -#' #confint(f_tc_2, "parent_0") +#' # The profiling for the following fit does not finish in a reasonable time, +#' # therefore we use the quadratic approximation +#' m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")), +#' M1 = mkinsub("SFO"), +#' M2 = mkinsub("SFO"), +#' use_of_ff = "max", quiet = TRUE) +#' DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data +#' f_tc_2 <- mkinfit(m_synth_DFOP_par, DFOP_par_c, error_model = "tc", +#' error_model_algorithm = "direct", quiet = TRUE) +#' confint(f_tc_2, method = "quadratic") +#' confint(f_tc_2, "parent_0", method = "quadratic") #' } #' @export confint.mkinfit <- function(object, parm, @@ -164,10 +166,12 @@ confint.mkinfit <- function(object, parm, if (transformed & backtransform) { lci_back <- backtransform_odeparms(lci, object$mkinmod, object$transform_rates, object$transform_fractions) - lci <- c(lci_back, lci[names(object$errparms)]) uci_back <- backtransform_odeparms(uci, object$mkinmod, object$transform_rates, object$transform_fractions) - uci <- c(uci_back, uci[names(object$errparms)]) + + return_errparm_names <- intersect(names(object$errparms), return_pnames) + lci <- c(lci_back, lci[return_errparm_names]) + uci <- c(uci_back, uci[return_errparm_names]) } } ci <- cbind(lower = lci, upper = uci) |