From 575fcacaa33076de97f41a79afb37efb97ca82e0 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 30 Mar 2020 21:43:10 +0200 Subject: Static documentation rebuilt by pkgdown --- docs/reference/confint.mkinfit.html | 107 ++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 60 deletions(-) (limited to 'docs/reference/confint.mkinfit.html') diff --git a/docs/reference/confint.mkinfit.html b/docs/reference/confint.mkinfit.html index ea69c3bb..1dd6288b 100644 --- a/docs/reference/confint.mkinfit.html +++ b/docs/reference/confint.mkinfit.html @@ -76,7 +76,7 @@ method of Venzon and Moolgavkar (1988)." /> mkin - 0.9.49.8 + 0.9.49.9 @@ -151,10 +151,19 @@ method of Venzon and Moolgavkar (1988).

# S3 method for mkinfit
-confint(object, parm, level = 0.95, alpha = 1 -
-  level, cutoff, method = c("quadratic", "profile"),
-  transformed = TRUE, backtransform = TRUE,
-  cores = round(detectCores()/2), quiet = FALSE, ...)
+confint( + object, + parm, + level = 0.95, + alpha = 1 - level, + cutoff, + method = c("quadratic", "profile"), + transformed = TRUE, + backtransform = TRUE, + cores = round(detectCores()/2), + quiet = FALSE, + ... +)

Arguments

@@ -253,52 +262,30 @@ On Windows machines, cores > 1 is currently not supported.

SFO_SFO.ff<-mkinmod(parent=mkinsub("SFO", "m1"), m1=mkinsub("SFO"), use_of_ff="max", quiet=TRUE) f_d_1<-mkinfit(SFO_SFO, subset(FOCUS_2006_D, value!=0), quiet=TRUE) -system.time(ci_profile<-confint(f_d_1, method="profile", cores=1, quiet=TRUE))
#> User System verstrichen -#> 51.058 0.000 51.088
# Using more cores does not save much time here, as parent_0 takes up most of the time +system.time(ci_profile <- confint(f_d_1, method = "profile", cores = 1, quiet = TRUE))
#> Error in mkinpredict.mkinmod(mkinmod, parms, odeini, outtimes, solution_type = solution_type, use_compiled = use_compiled, method.ode = method.ode, atol = atol, rtol = rtol, ...): Differential equations were not integrated for all output times because +#> NaN values occurred in output from ode()
#> Timing stopped at: 11.39 0 11.4
# Using more cores does not save much time here, as parent_0 takes up most of the time # If we additionally exclude parent_0 (the confidence of which is often of # minor interest), we get a nice performance improvement from about 50 # seconds to about 12 seconds if we use at least four cores system.time(ci_profile_no_parent_0 <- confint(f_d_1, method = "profile", c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = n_cores))
#> Profiling the likelihood
#> User System verstrichen -#> 0.005 0.004 11.349
ci_profile
#> 2.5% 97.5% -#> parent_0 96.456003650 1.027703e+02 -#> k_parent_sink 0.040762501 5.549764e-02 -#> k_parent_m1 0.046786482 5.500879e-02 -#> k_m1_sink 0.003892605 6.702778e-03 -#> sigma 2.535612399 3.985263e+00
ci_quadratic_transformed <- confint(f_d_1, method = "quadratic") +#> 20.058 0.122 11.784
ci_profile
#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden
ci_quadratic_transformed <- confint(f_d_1, method = "quadratic") ci_quadratic_transformed
#> 2.5% 97.5% -#> parent_0 96.403841649 1.027931e+02 +#> parent_0 96.403841641 1.027931e+02 #> k_parent_sink 0.041033378 5.596269e-02 #> k_parent_m1 0.046777902 5.511931e-02 #> k_m1_sink 0.004012217 6.897547e-03 #> sigma 2.396089689 3.854918e+00
ci_quadratic_untransformed <- confint(f_d_1, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed
#> 2.5% 97.5% -#> parent_0 96.403841653 102.79312450 +#> parent_0 96.403841648 102.79312450 #> k_parent_sink 0.040485331 0.05535491 -#> k_parent_m1 0.046611581 0.05494364 +#> k_parent_m1 0.046611582 0.05494364 #> k_m1_sink 0.003835483 0.00668582 #> sigma 2.396089689 3.85491806
# Against the expectation based on Bates and Watts (1988), the confidence # intervals based on the internal parameter transformation are less # congruent with the likelihood based intervals. Note the superiority of the # interval based on the untransformed fit for k_m1_sink -rel_diffs_transformed <- abs((ci_quadratic_transformed - ci_profile)/ci_profile) -rel_diffs_untransformed <- abs((ci_quadratic_untransformed - ci_profile)/ci_profile) -rel_diffs_transformed < rel_diffs_untransformed
#> 2.5% 97.5% -#> parent_0 FALSE FALSE -#> k_parent_sink TRUE FALSE -#> k_parent_m1 TRUE FALSE -#> k_m1_sink FALSE FALSE -#> sigma FALSE FALSE
signif(rel_diffs_transformed, 3)
#> 2.5% 97.5% -#> parent_0 0.000541 0.000222 -#> k_parent_sink 0.006650 0.008380 -#> k_parent_m1 0.000183 0.002010 -#> k_m1_sink 0.030700 0.029100 -#> sigma 0.055000 0.032700
signif(rel_diffs_untransformed, 3)
#> 2.5% 97.5% -#> parent_0 0.000541 0.000222 -#> k_parent_sink 0.006800 0.002570 -#> k_parent_m1 0.003740 0.001180 -#> k_m1_sink 0.014700 0.002530 -#> sigma 0.055000 0.032700
+rel_diffs_transformed <- abs((ci_quadratic_transformed - ci_profile)/ci_profile)
#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden
rel_diffs_untransformed <- abs((ci_quadratic_untransformed - ci_profile)/ci_profile)
#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden
rel_diffs_transformed < rel_diffs_untransformed
#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_transformed' nicht gefunden
signif(rel_diffs_transformed, 3)
#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_transformed' nicht gefunden
signif(rel_diffs_untransformed, 3)
#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_untransformed' nicht gefunden
# Investigate a case with formation fractions f_d_2 <- mkinfit(SFO_SFO.ff, subset(FOCUS_2006_D, value != 0), quiet = TRUE) @@ -309,16 +296,16 @@ On Windows machines, cores > 1 is currently not supported.

#> f_parent_to_m1 0.471328495 5.611550e-01 #> sigma 2.535612399 3.985263e+00
ci_quadratic_transformed_ff <- confint(f_d_2, method = "quadratic") ci_quadratic_transformed_ff
#> 2.5% 97.5% -#> parent_0 96.403840123 1.027931e+02 -#> k_parent 0.090823791 1.072543e-01 +#> parent_0 96.403839992 1.027931e+02 +#> k_parent 0.090823790 1.072543e-01 #> k_m1 0.004012216 6.897547e-03 -#> f_parent_to_m1 0.469118710 5.595960e-01 +#> f_parent_to_m1 0.469118711 5.595960e-01 #> sigma 2.396089689 3.854918e+00
ci_quadratic_untransformed_ff <- confint(f_d_2, method = "quadratic", transformed = FALSE) ci_quadratic_untransformed_ff
#> 2.5% 97.5% -#> parent_0 96.403840057 1.027931e+02 -#> k_parent 0.090491932 1.069035e-01 +#> parent_0 96.403839944 1.027931e+02 +#> k_parent 0.090491931 1.069035e-01 #> k_m1 0.003835483 6.685819e-03 -#> f_parent_to_m1 0.469113361 5.598386e-01 +#> f_parent_to_m1 0.469113362 5.598386e-01 #> sigma 2.396089689 3.854918e+00
rel_diffs_transformed_ff <- abs((ci_quadratic_transformed_ff - ci_profile_ff)/ci_profile_ff) rel_diffs_untransformed_ff <- abs((ci_quadratic_untransformed_ff - ci_profile_ff)/ci_profile_ff) # While the confidence interval for the parent rate constant is closer to @@ -330,16 +317,16 @@ On Windows machines, cores > 1 is currently not supported.

#> k_parent TRUE TRUE #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE -#> sigma FALSE TRUE
rel_diffs_transformed_ff
#> 2.5% 97.5% -#> parent_0 0.0005408012 0.0002217857 -#> k_parent 0.0009596303 0.0009003981 -#> k_m1 0.0307277425 0.0290579163 -#> f_parent_to_m1 0.0046884178 0.0027782643 +#> sigma FALSE FALSE
rel_diffs_transformed_ff
#> 2.5% 97.5% +#> parent_0 0.0005408026 0.0002217846 +#> k_parent 0.0009596414 0.0009003877 +#> k_m1 0.0307277403 0.0290579212 +#> f_parent_to_m1 0.0046884168 0.0027782604 #> sigma 0.0550252516 0.0327066836
rel_diffs_untransformed_ff
#> 2.5% 97.5% -#> parent_0 0.0005408019 0.0002217863 -#> k_parent 0.0046099989 0.0023730118 -#> k_m1 0.0146746451 0.0025300990 -#> f_parent_to_m1 0.0046997668 0.0023460293 +#> parent_0 0.0005408031 0.0002217851 +#> k_parent 0.0046100089 0.0023730230 +#> k_m1 0.0146746442 0.0025300972 +#> f_parent_to_m1 0.0046997642 0.0023460268 #> sigma 0.0550252516 0.0327066836
# The profiling for the following fit does not finish in a reasonable time, # therefore we use the quadratic approximation @@ -351,17 +338,17 @@ On Windows machines, cores > 1 is currently not supported.

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")
#> 2.5% 97.5% -#> parent_0 94.596183241 106.19937044 -#> k_M1 0.037605436 0.04490758 -#> k_M2 0.008568746 0.01087675 -#> f_parent_to_M1 0.021464277 0.62023879 -#> f_parent_to_M2 0.015166876 0.37975352 -#> k1 0.273897622 0.33388081 -#> k2 0.018614564 0.02250380 -#> g 0.671943572 0.73583247 -#> sigma_low 0.251284138 0.83992136 -#> rsd_high 0.040410998 0.07661999
confint(f_tc_2, "parent_0", method = "quadratic")
#> 2.5% 97.5% -#> parent_0 94.59618 106.1994
# } +#> parent_0 94.596218141 106.19934683 +#> k_M1 0.037605440 0.04490756 +#> k_M2 0.008568747 0.01087674 +#> f_parent_to_M1 0.021466788 0.62023878 +#> f_parent_to_M2 0.015168650 0.37975352 +#> k1 0.273897581 0.33388066 +#> k2 0.018614556 0.02250379 +#> g 0.671943831 0.73583255 +#> sigma_low 0.251283700 0.83992071 +#> rsd_high 0.040411017 0.07662005
confint(f_tc_2, "parent_0", method = "quadratic")
#> 2.5% 97.5% +#> parent_0 94.59622 106.1993
# }