aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/reference/confint.mkinfit.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/reference/confint.mkinfit.html')
-rw-r--r--docs/dev/reference/confint.mkinfit.html127
1 files changed, 64 insertions, 63 deletions
diff --git a/docs/dev/reference/confint.mkinfit.html b/docs/dev/reference/confint.mkinfit.html
index 515a7c9e..2237a539 100644
--- a/docs/dev/reference/confint.mkinfit.html
+++ b/docs/dev/reference/confint.mkinfit.html
@@ -79,7 +79,7 @@ method of Venzon and Moolgavkar (1988)." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span>
+ <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.0.3.9000</span>
</span>
</div>
@@ -128,7 +128,7 @@ method of Venzon and Moolgavkar (1988)." />
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/jranke/mkin/">
- <span class="fab fa fab fa-github fa-lg"></span>
+ <span class="fab fa-github fa-lg"></span>
</a>
</li>
@@ -273,68 +273,69 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span><span class='op'>(</span><span class='st'>"NOT_CRAN"</span><span class='op'>)</span>, <span class='st'>"true"</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='va'>n_cores</span> <span class='op'>&lt;-</span> <span class='fu'>parallel</span><span class='fu'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>-</span> <span class='fl'>1</span>
<span class='op'>}</span> <span class='kw'>else</span> <span class='op'>{</span>
- <span class='va'>n_cores</span> <span class='op'>&lt;-</span> <span class='fl'>1</span>
+ <span class='va'>n_cores</span> <span class='op'>&lt;-</span> <span class='fl'>1</span>
<span class='op'>}</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span><span class='op'>(</span><span class='st'>"TRAVIS"</span><span class='op'>)</span> <span class='op'>!=</span> <span class='st'>""</span><span class='op'>)</span> <span class='va'>n_cores</span> <span class='op'>=</span> <span class='fl'>1</span>
<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.info.html'>Sys.info</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>[</span><span class='st'>"sysname"</span><span class='op'>]</span> <span class='op'>==</span> <span class='st'>"Windows"</span><span class='op'>)</span> <span class='va'>n_cores</span> <span class='op'>=</span> <span class='fl'>1</span>
-<span class='va'>SFO_SFO</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+<span class='va'>SFO_SFO</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>,
+ use_of_ff <span class='op'>=</span> <span class='st'>"min"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='va'>SFO_SFO.ff</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>,
use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='va'>f_d_1</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>FOCUS_2006_D</span>, <span class='va'>value</span> <span class='op'>!=</span> <span class='fl'>0</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span><span class='op'>(</span><span class='va'>ci_profile</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"profile"</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; user system elapsed
-#&gt; 3.900 0.929 3.548 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span>
+#&gt; 4.295 1.008 3.959 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span>
<span class='co'># If we additionally exclude parent_0 (the confidence of which is often of</span>
-<span class='co'># minor interest), we get a nice performance improvement from about 50</span>
-<span class='co'># seconds to about 12 seconds if we use at least four cores</span>
+<span class='co'># minor interest), we get a nice performance improvement if we use at least 4 cores</span>
<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span><span class='op'>(</span><span class='va'>ci_profile_no_parent_0</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"profile"</span>,
<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span><span class='op'>)</span>, cores <span class='op'>=</span> <span class='va'>n_cores</span><span class='op'>)</span><span class='op'>)</span>
-</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt; <span class='warning'>Warning: scheduled cores 3, 2, 1 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#&gt; <span class='error'>Error in dimnames(x) &lt;- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#&gt; <span class='message'>Timing stopped at: 0.009 0.034 0.257</span></div><div class='input'><span class='va'>ci_profile</span>
-</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 96.456003640 1.027703e+02
-#&gt; k_parent 0.090911032 1.071578e-01
-#&gt; k_m1 0.003892606 6.702775e-03
-#&gt; f_parent_to_m1 0.471328495 5.611550e-01
-#&gt; sigma 2.535612399 3.985263e+00</div><div class='input'><span class='va'>ci_quadratic_transformed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 1.451 0.126 0.923 </div><div class='input'><span class='va'>ci_profile</span>
+</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.456003640 1.027703e+02
+#&gt; k_parent_sink 0.040762501 5.549764e-02
+#&gt; k_parent_m1 0.046786482 5.500879e-02
+#&gt; k_m1_sink 0.003892605 6.702778e-03
+#&gt; sigma 2.535612399 3.985263e+00</div><div class='input'><span class='va'>ci_quadratic_transformed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span>
<span class='va'>ci_quadratic_transformed</span>
-</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 96.403833585 102.79311650
-#&gt; k_parent 0.090823771 0.10725430
-#&gt; k_m1 0.004012219 0.00689755
-#&gt; f_parent_to_m1 0.469118824 0.55959615
-#&gt; sigma 2.396089689 3.85491806</div><div class='input'><span class='va'>ci_quadratic_untransformed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.403841640 1.027931e+02
+#&gt; k_parent_sink 0.041033378 5.596269e-02
+#&gt; k_parent_m1 0.046777902 5.511931e-02
+#&gt; k_m1_sink 0.004012217 6.897547e-03
+#&gt; sigma 2.396089689 3.854918e+00</div><div class='input'><span class='va'>ci_quadratic_untransformed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='va'>ci_quadratic_untransformed</span>
-</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 96.403833589 1.027931e+02
-#&gt; k_parent 0.090491913 1.069035e-01
-#&gt; k_m1 0.003835485 6.685823e-03
-#&gt; f_parent_to_m1 0.469113477 5.598387e-01
-#&gt; sigma 2.396089689 3.854918e+00</div><div class='input'><span class='co'># Against the expectation based on Bates and Watts (1988), the confidence</span>
+</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.403841645 102.79312449
+#&gt; k_parent_sink 0.040485331 0.05535491
+#&gt; k_parent_m1 0.046611582 0.05494364
+#&gt; k_m1_sink 0.003835483 0.00668582
+#&gt; sigma 2.396089689 3.85491806</div><div class='input'><span class='co'># Against the expectation based on Bates and Watts (1988), the confidence</span>
<span class='co'># intervals based on the internal parameter transformation are less</span>
<span class='co'># congruent with the likelihood based intervals. Note the superiority of the</span>
<span class='co'># interval based on the untransformed fit for k_m1_sink</span>
<span class='va'>rel_diffs_transformed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span><span class='op'>(</span><span class='op'>(</span><span class='va'>ci_quadratic_transformed</span> <span class='op'>-</span> <span class='va'>ci_profile</span><span class='op'>)</span><span class='op'>/</span><span class='va'>ci_profile</span><span class='op'>)</span>
<span class='va'>rel_diffs_untransformed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span><span class='op'>(</span><span class='op'>(</span><span class='va'>ci_quadratic_untransformed</span> <span class='op'>-</span> <span class='va'>ci_profile</span><span class='op'>)</span><span class='op'>/</span><span class='va'>ci_profile</span><span class='op'>)</span>
<span class='va'>rel_diffs_transformed</span> <span class='op'>&lt;</span> <span class='va'>rel_diffs_untransformed</span>
-</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 FALSE FALSE
-#&gt; k_parent TRUE TRUE
-#&gt; k_m1 FALSE FALSE
-#&gt; f_parent_to_m1 TRUE FALSE
-#&gt; sigma TRUE FALSE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span><span class='op'>(</span><span class='va'>rel_diffs_transformed</span>, <span class='fl'>3</span><span class='op'>)</span>
-</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 0.000541 0.000222
-#&gt; k_parent 0.000960 0.000900
-#&gt; k_m1 0.030700 0.029100
-#&gt; f_parent_to_m1 0.004690 0.002780
-#&gt; sigma 0.055000 0.032700</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span><span class='op'>(</span><span class='va'>rel_diffs_untransformed</span>, <span class='fl'>3</span><span class='op'>)</span>
-</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 0.000541 0.000222
-#&gt; k_parent 0.004610 0.002370
-#&gt; k_m1 0.014700 0.002530
-#&gt; f_parent_to_m1 0.004700 0.002350
-#&gt; sigma 0.055000 0.032700</div><div class='input'>
+</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 FALSE FALSE
+#&gt; k_parent_sink TRUE FALSE
+#&gt; k_parent_m1 TRUE FALSE
+#&gt; k_m1_sink FALSE FALSE
+#&gt; sigma FALSE FALSE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span><span class='op'>(</span><span class='va'>rel_diffs_transformed</span>, <span class='fl'>3</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 0.000541 0.000222
+#&gt; k_parent_sink 0.006650 0.008380
+#&gt; k_parent_m1 0.000183 0.002010
+#&gt; k_m1_sink 0.030700 0.029100
+#&gt; sigma 0.055000 0.032700</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span><span class='op'>(</span><span class='va'>rel_diffs_untransformed</span>, <span class='fl'>3</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 0.000541 0.000222
+#&gt; k_parent_sink 0.006800 0.002570
+#&gt; k_parent_m1 0.003740 0.001180
+#&gt; k_m1_sink 0.014700 0.002530
+#&gt; sigma 0.055000 0.032700</div><div class='input'>
<span class='co'># Investigate a case with formation fractions</span>
<span class='va'>f_d_2</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO.ff</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>FOCUS_2006_D</span>, <span class='va'>value</span> <span class='op'>!=</span> <span class='fl'>0</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
@@ -348,14 +349,14 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
#&gt; sigma 2.535612399 3.985263e+00</div><div class='input'><span class='va'>ci_quadratic_transformed_ff</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_2</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span>
<span class='va'>ci_quadratic_transformed_ff</span>
</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 96.403833585 102.79311650
+#&gt; parent_0 96.403833578 102.79311649
#&gt; k_parent 0.090823771 0.10725430
#&gt; k_m1 0.004012219 0.00689755
#&gt; f_parent_to_m1 0.469118824 0.55959615
#&gt; sigma 2.396089689 3.85491806</div><div class='input'><span class='va'>ci_quadratic_untransformed_ff</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_2</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
<span class='va'>ci_quadratic_untransformed_ff</span>
</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 96.403833589 1.027931e+02
+#&gt; parent_0 96.403833583 1.027931e+02
#&gt; k_parent 0.090491913 1.069035e-01
#&gt; k_m1 0.003835485 6.685823e-03
#&gt; f_parent_to_m1 0.469113477 5.598387e-01
@@ -373,15 +374,15 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
#&gt; f_parent_to_m1 TRUE FALSE
#&gt; sigma TRUE FALSE</div><div class='input'><span class='va'>rel_diffs_transformed_ff</span>
</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 0.0005408689 0.0002217234
+#&gt; parent_0 0.0005408690 0.0002217233
#&gt; k_parent 0.0009598532 0.0009001864
-#&gt; k_m1 0.0307283044 0.0290588365
-#&gt; f_parent_to_m1 0.0046881768 0.0027780063
+#&gt; k_m1 0.0307283041 0.0290588361
+#&gt; f_parent_to_m1 0.0046881769 0.0027780063
#&gt; sigma 0.0550252516 0.0327066836</div><div class='input'><span class='va'>rel_diffs_untransformed_ff</span>
</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 0.0005408689 0.0002217233
-#&gt; k_parent 0.0046102155 0.0023732281
-#&gt; k_m1 0.0146740688 0.0025291817
+#&gt; parent_0 0.0005408689 0.0002217232
+#&gt; k_parent 0.0046102156 0.0023732281
+#&gt; k_m1 0.0146740690 0.0025291820
#&gt; f_parent_to_m1 0.0046995211 0.0023457712
#&gt; sigma 0.0550252516 0.0327066836</div><div class='input'>
<span class='co'># The profiling for the following fit does not finish in a reasonable time,</span>
@@ -395,18 +396,18 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
error_model_algorithm <span class='op'>=</span> <span class='st'>"direct"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_tc_2</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span>
</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 94.596126334 106.19944007
-#&gt; k_M1 0.037605408 0.04490759
-#&gt; k_M2 0.008568739 0.01087675
-#&gt; f_parent_to_M1 0.021463787 0.62023881
-#&gt; f_parent_to_M2 0.015166531 0.37975349
-#&gt; k1 0.273897467 0.33388084
-#&gt; k2 0.018614555 0.02250379
-#&gt; g 0.671943606 0.73583278
-#&gt; sigma_low 0.251283766 0.83992113
-#&gt; rsd_high 0.040411014 0.07662005</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_tc_2</span>, <span class='st'>"parent_0"</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span>
+#&gt; parent_0 94.596039609 106.19954892
+#&gt; k_M1 0.037605368 0.04490762
+#&gt; k_M2 0.008568731 0.01087676
+#&gt; f_parent_to_M1 0.021462489 0.62023882
+#&gt; f_parent_to_M2 0.015165617 0.37975348
+#&gt; k1 0.273897348 0.33388101
+#&gt; k2 0.018614554 0.02250378
+#&gt; g 0.671943411 0.73583305
+#&gt; sigma_low 0.251283495 0.83992077
+#&gt; rsd_high 0.040411024 0.07662008</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_tc_2</span>, <span class='st'>"parent_0"</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span>
</div><div class='output co'>#&gt; 2.5% 97.5%
-#&gt; parent_0 94.59613 106.1994</div><div class='input'><span class='co'># }</span>
+#&gt; parent_0 94.59604 106.1995</div><div class='input'><span class='co'># }</span>
</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">

Contact - Imprint