aboutsummaryrefslogblamecommitdiff
path: root/docs/reference/confint.mkinfit.html
blob: 54696ff5f77a0847d3e1657413210d3f17625651 (plain) (tree)





































                                                                                                                                                                                                             


                                                                                                                 































































































                                                                                                                                                                                                    


                                                                                 



                                                                                                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                   





















                                                                                               





                                                                            


















                                                                         



                                                                                    


                    
                                                                               












                                                                                                  

                                                                                            

                                                            

                                                                        





                                                                                                                                                                                                                                                                                                                          


                                                                                                                                                                                                                                                                                                                                                                       

                                         





                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                         




                                                                                                                    

                                                                                                














































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               




















                                                                                                                                                                                                                                                                                                                                                                                                                         

































                                                                                
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
  <head>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Confidence intervals for parameters of mkinfit objects — confint.mkinfit • mkin</title>


<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>

<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />

<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>

<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>

<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>




<meta property="og:title" content="Confidence intervals for parameters of mkinfit objects — confint.mkinfit" />
<meta property="og:description" content="The default method 'profile' is based on the profile likelihood for each
parameter. The method uses two nested optimisations. The speed of the method
could likely be improved by using the method of Venzon and Moolgavkar (1988)." />
<meta name="twitter:card" content="summary" />




<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->



  </head>

  <body>
    <div class="container template-reference-topic">
      <header>
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">mkin</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.6</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../reference/index.html">Functions and data</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
    Articles
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
    <li>
      <a href="../articles/mkin.html">Introduction to mkin</a>
    </li>
    <li>
      <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
    </li>
    <li>
      <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
    </li>
    <li>
      <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
    </li>
    <li>
      <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
    </li>
    <li>
      <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
    </li>
    <li>
      <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
    </li>
  </ul>
</li>
<li>
  <a href="../news/index.html">News</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        
      </ul>
      
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header>

<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Confidence intervals for parameters of mkinfit objects</h1>
    
    <div class="hidden name"><code>confint.mkinfit.Rd</code></div>
    </div>

    <div class="ref-description">
    <p>The default method 'profile' is based on the profile likelihood for each
parameter. The method uses two nested optimisations. The speed of the method
could likely be improved by using the method of Venzon and Moolgavkar (1988).</p>
    </div>

    <pre class="usage"><span class='co'># S3 method for mkinfit</span>
<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>object</span>, <span class='no'>parm</span>, <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0.95</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>1</span> -
  <span class='no'>level</span>, <span class='no'>cutoff</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"profile"</span>, <span class='st'>"quadratic"</span>),
  <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>backtransform</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
  <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>

    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>object</th>
      <td><p>An <code><a href='mkinfit.html'>mkinfit</a></code> object</p></td>
    </tr>
    <tr>
      <th>parm</th>
      <td><p>A vector of names of the parameters which are to be given
confidence intervals. If missing, all parameters are considered.</p></td>
    </tr>
    <tr>
      <th>level</th>
      <td><p>The confidence level required</p></td>
    </tr>
    <tr>
      <th>alpha</th>
      <td><p>The allowed error probability, overrides 'level' if specified.</p></td>
    </tr>
    <tr>
      <th>cutoff</th>
      <td><p>Possibility to specify an alternative cutoff for the difference
in the log-likelihoods at the confidence boundary. Specifying an explicit
cutoff value overrides arguments 'level' and 'alpha'</p></td>
    </tr>
    <tr>
      <th>method</th>
      <td><p>The 'profile' method searches the parameter space for the
cutoff of the confidence intervals by means of a likelihood ratio test.
The 'quadratic' method approximates the likelihood function at the
optimised parameters using the second term of the Taylor expansion, using
a second derivative (hessian) contained in the object.</p></td>
    </tr>
    <tr>
      <th>transformed</th>
      <td><p>If the quadratic approximation is used, should it be
applied to the likelihood based on the transformed parameters?</p></td>
    </tr>
    <tr>
      <th>backtransform</th>
      <td><p>If we approximate the likelihood in terms of the
transformed parameters, should we backtransform the parameters with
their confidence intervals?</p></td>
    </tr>
    <tr>
      <th>cores</th>
      <td><p>The number of cores to be used for multicore processing. This
is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows
machines, cores &gt; 1 is not supported.</p></td>
    </tr>
    <tr>
      <th>quiet</th>
      <td><p>Should we suppress the message "Profiling the likelihood"</p></td>
    </tr>
    <tr>
      <th>...</th>
      <td><p>Not used</p></td>
    </tr>
    </table>

    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>A matrix with columns giving lower and upper confidence limits for
  each parameter.</p>
    <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>

    <p>Bates DM and Watts GW (1988) Nonlinear regression analysis &amp; its applications</p>
<p>Pawitan Y (2013) In all likelihood - Statistical modelling and
  inference using likelihood. Clarendon Press, Oxford.</p>
<p>Venzon DJ and Moolgavkar SH (1988) A Method for Computing
  Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
  87–94.</p>

    <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
    <pre class="examples"><div class='input'><span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#&gt;                     2.5%      97.5%
#&gt; parent_0      71.8242430 93.1600766
#&gt; k_parent_sink  0.2109541  0.4440528
#&gt; sigma          1.9778868  7.3681380</div><div class='input'>
<span class='co'># \dontrun{</span>
<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>)</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt;                     2.5%      97.5%
#&gt; parent_0      73.0641834 92.1392181
#&gt; k_parent_sink  0.2170293  0.4235348
#&gt; sigma          3.1307772  8.0628314</div><div class='input'>
<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
  <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='no'>f_d_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt;        User      System verstrichen 
#&gt;      51.646       0.000      51.673 </div><div class='input'><span class='co'># The following does not save much time, as parent_0 takes up most of the time</span>
<span class='co'># system.time(ci_profile &lt;- confint(f_d_1, cores = 5))</span>
<span class='co'># system.time(ci_profile &lt;- confint(f_d_1,</span>
<span class='co'>#   c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = 1))</span>
<span class='co'># If we exclude parent_0 (the confidence of which is often of minor interest), we get a nice</span>
<span class='co'># performance improvement from about 30 seconds to about 12 seconds</span>
<span class='co'># system.time(ci_profile_no_parent_0 &lt;- confint(f_d_1, </span>
<span class='co'>#   c("k_parent_sink", "k_parent_m1", "k_m1_sink", "sigma"), cores = 4))</span>
<span class='no'>ci_profile</span></div><div class='output co'>#&gt;                       2.5%        97.5%
#&gt; parent_0      96.456003650 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='no'>ci_quadratic_transformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)
<span class='no'>ci_quadratic_transformed</span></div><div class='output co'>#&gt;                       2.5%        97.5%
#&gt; parent_0      96.403841649 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='no'>ci_quadratic_untransformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='no'>ci_quadratic_untransformed</span></div><div class='output co'>#&gt;                       2.5%        97.5%
#&gt; parent_0      96.403841653 102.79312450
#&gt; k_parent_sink  0.040485331   0.05535491
#&gt; k_parent_m1    0.046611581   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='no'>rel_diffs_transformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed</span> - <span class='no'>ci_profile</span>)/<span class='no'>ci_profile</span>)
<span class='no'>rel_diffs_untransformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed</span> - <span class='no'>ci_profile</span>)/<span class='no'>ci_profile</span>)
<span class='no'>rel_diffs_transformed</span></div><div class='output co'>#&gt;                       2.5%        97.5%
#&gt; parent_0      0.0005407854 0.0002218012
#&gt; k_parent_sink 0.0066452394 0.0083795930
#&gt; k_parent_m1   0.0001833903 0.0020092090
#&gt; k_m1_sink     0.0307278240 0.0290580487
#&gt; sigma         0.0550252516 0.0327066836</div><div class='input'><span class='no'>rel_diffs_untransformed</span></div><div class='output co'>#&gt;                       2.5%        97.5%
#&gt; parent_0      0.0005407854 0.0002218011
#&gt; k_parent_sink 0.0067996407 0.0025717594
#&gt; k_parent_m1   0.0037382781 0.0011843074
#&gt; k_m1_sink     0.0146745610 0.0025299672
#&gt; sigma         0.0550252516 0.0327066836</div><div class='input'>
<span class='co'># Set the number of cores for further examples</span>
<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span>(<span class='st'>"NOT_CRAN"</span>), <span class='st'>"true"</span>)) {
  <span class='no'>n_cores</span> <span class='kw'>&lt;-</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>() - <span class='fl'>1</span>
} <span class='kw'>else</span> {
 <span class='no'>n_cores</span> <span class='kw'>&lt;-</span> <span class='fl'>1</span>
}
<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span>(<span class='st'>"TRAVIS"</span>) <span class='kw'>!=</span> <span class='st'>""</span>) <span class='no'>n_cores</span> <span class='kw'>=</span> <span class='fl'>1</span>
<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/Sys.info.html'>Sys.info</a></span>()[<span class='st'>"sysname"</span>] <span class='kw'>==</span> <span class='st'>"Windows"</span>) <span class='no'>n_cores</span> <span class='kw'>=</span> <span class='fl'>1</span>

<span class='co'># Investigate a case with formation fractions</span>
<span class='no'>f_d_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='no'>ci_profile_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>)</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='input'><span class='no'>ci_profile_ff</span></div><div class='output co'>#&gt;                        2.5%        97.5%
#&gt; parent_0       96.456003650 1.027703e+02
#&gt; k_parent        0.090911032 1.071578e-01
#&gt; k_m1            0.003892605 6.702778e-03
#&gt; f_parent_to_m1  0.471328495 5.611550e-01
#&gt; sigma           2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)
<span class='no'>ci_quadratic_transformed_ff</span></div><div class='output co'>#&gt;                        2.5%        97.5%
#&gt; parent_0       96.403840123 1.027931e+02
#&gt; k_parent        0.090823791 1.072543e-01
#&gt; k_m1            0.004012216 6.897547e-03
#&gt; f_parent_to_m1  0.469118710 5.595960e-01
#&gt; sigma           2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
<span class='no'>ci_quadratic_untransformed_ff</span></div><div class='output co'>#&gt;                        2.5%        97.5%
#&gt; parent_0       96.403840057 1.027931e+02
#&gt; k_parent        0.090491932 1.069035e-01
#&gt; k_m1            0.003835483 6.685819e-03
#&gt; f_parent_to_m1  0.469113361 5.598386e-01
#&gt; sigma           2.396089689 3.854918e+00</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>)
<span class='no'>rel_diffs_untransformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>)
<span class='co'># While the confidence interval for the parent rate constant is closer to</span>
<span class='co'># the profile based interval when using the internal parameter</span>
<span class='co'># transformation, the intervals for the other parameters are 'better</span>
<span class='co'># without internal parameter transformation.</span>
<span class='no'>rel_diffs_transformed_ff</span></div><div class='output co'>#&gt;                        2.5%        97.5%
#&gt; parent_0       0.0005408012 0.0002217857
#&gt; k_parent       0.0009596303 0.0009003981
#&gt; k_m1           0.0307277425 0.0290579163
#&gt; f_parent_to_m1 0.0046884178 0.0027782643
#&gt; sigma          0.0550252516 0.0327066836</div><div class='input'><span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#&gt;                        2.5%        97.5%
#&gt; parent_0       0.0005408019 0.0002217863
#&gt; k_parent       0.0046099989 0.0023730118
#&gt; k_m1           0.0146746451 0.0025300990
#&gt; f_parent_to_m1 0.0046997668 0.0023460293
#&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>
<span class='co'># therefore we use the quadratic approximation</span>
<span class='no'>m_synth_DFOP_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)),
  <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
  <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
  <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='no'>DFOP_par_c</span> <span class='kw'>&lt;-</span> <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>
<span class='no'>f_tc_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, <span class='no'>DFOP_par_c</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>,
  <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='st'>"direct"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#&gt;                        2.5%        97.5%
#&gt; parent_0       94.596183241 106.19937044
#&gt; k_M1            0.037605436   0.04490758
#&gt; k_M2            0.008568746   0.01087675
#&gt; f_parent_to_M1  0.021464277   0.62023879
#&gt; f_parent_to_M2  0.015166876   0.37975352
#&gt; k1              0.273897622   0.33388081
#&gt; k2              0.018614564   0.02250380
#&gt; g               0.671943572   0.73583247
#&gt; sigma_low       0.251284138   0.83992136
#&gt; rsd_high        0.040410998   0.07661999</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='st'>"parent_0"</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#&gt;              2.5%    97.5%
#&gt; parent_0 94.59618 106.1994</div><div class='input'># }
</div></pre>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
    <h2>Contents</h2>
    <ul class="nav nav-pills nav-stacked">
      <li><a href="#arguments">Arguments</a></li>
      <li><a href="#value">Value</a></li>
      <li><a href="#references">References</a></li>
      <li><a href="#examples">Examples</a></li>
    </ul>

  </div>
</div>


      <footer>
      <div class="copyright">
  <p>Developed by Johannes Ranke.</p>
</div>

<div class="pkgdown">
  <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>

      </footer>
   </div>

  


  </body>
</html>


Contact - Imprint