diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-31 01:55:01 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-10-31 01:59:05 +0100 |
commit | 7091d3738e7e55acb20edb88772b228f6f5b6c98 (patch) | |
tree | b6e31700074605c702662e5238162c57de330453 /docs/reference/update.mkinfit.html | |
parent | 5e4ea59a41e00b05ea6664c08c7922e892e8ab77 (diff) |
Add likelihood ratio test and other methods, fixes
The likelihood ratio test method is lrtest, in addition,
methods for update and residuals were added.
Diffstat (limited to 'docs/reference/update.mkinfit.html')
-rw-r--r-- | docs/reference/update.mkinfit.html | 544 |
1 files changed, 544 insertions, 0 deletions
diff --git a/docs/reference/update.mkinfit.html b/docs/reference/update.mkinfit.html new file mode 100644 index 00000000..b4040a1b --- /dev/null +++ b/docs/reference/update.mkinfit.html @@ -0,0 +1,544 @@ +<!-- 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>Update an mkinfit model with different arguments — update.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="Update an mkinfit model with different arguments — update.mkinfit" /> +<meta property="og:description" content="This function will return an updated mkinfit object. The fitted degradation +model parameters from the old fit are used as starting values for the +updated fit. Values specified as 'parms.ini' and/or 'state.ini' will +override these starting values." /> +<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>Update an mkinfit model with different arguments</h1> + + <div class="hidden name"><code>update.mkinfit.Rd</code></div> + </div> + + <div class="ref-description"> + <p>This function will return an updated mkinfit object. The fitted degradation +model parameters from the old fit are used as starting values for the +updated fit. Values specified as 'parms.ini' and/or 'state.ini' will +override these starting values.</p> + </div> + + <pre class="usage"><span class='co'># S3 method for mkinfit</span> +<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>object</span>, <span class='no'>...</span>, <span class='kw'>evaluate</span> <span class='kw'>=</span> <span class='fl'>TRUE</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 mkinfit object to be updated</p></td> + </tr> + <tr> + <th>...</th> + <td><p>Arguments to <code><a href='mkinfit.html'>mkinfit</a></code> that should replace +the arguments from the original call. Arguments set to NULL will +remove arguments given in the original call</p></td> + </tr> + <tr> + <th>evaluate</th> + <td><p>Should the call be evaluated or returned as a call</p></td> + </tr> + </table> + + + <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> + <pre class="examples"><div class='input'><span class='co'># \dontrun{</span> +<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"DFOP"</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/stats/update.html'>update</a></span>(<span class='no'>fit</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#> $par +#> parent_0 log_k1 log_k2 g_ilr sigma_low rsd_high +#> 100.85489822 8.84468217 -2.29693632 -14.95263998 0.00375222 0.06763435 +#> +#> $objective +#> [1] 19.40656 +#> +#> $convergence +#> [1] 0 +#> +#> $iterations +#> [1] 120 +#> +#> $evaluations +#> function gradient +#> 144 847 +#> +#> $message +#> [1] "relative convergence (4)" +#> +#> $logLik +#> [1] -19.40656 +#> +#> $d_3_message +#> threestep +#> "Three-step fitting yielded a higher likelihood than direct fitting" +#> +#> $hessian +#> parent_0 log_k1 log_k2 g_ilr sigma_low +#> parent_0 3.662473e-01 -2.914408e-16 -7.241561e+01 -3.021629e-08 1.923504e+01 +#> log_k1 -2.914408e-16 0.000000e+00 -2.215935e-13 -7.291307e-25 3.416474e-15 +#> log_k2 -7.241561e+01 -2.215935e-13 3.127457e+04 6.766544e-06 -1.495826e+04 +#> g_ilr -3.021629e-08 -7.291307e-25 6.766544e-06 3.122099e-09 -1.797429e-06 +#> sigma_low 1.923504e+01 3.416474e-15 -1.495826e+04 -1.797429e-06 7.759299e+04 +#> rsd_high 3.902119e+00 -1.801019e-16 -1.685343e+02 -3.750713e-07 3.984179e+03 +#> rsd_high +#> parent_0 3.902119e+00 +#> log_k1 -1.801019e-16 +#> log_k2 -1.685343e+02 +#> g_ilr -3.750713e-07 +#> sigma_low 3.984179e+03 +#> rsd_high 7.188991e+03 +#> +#> $hessian_notrans +#> parent_0 k1 k2 g sigma_low +#> parent_0 3.662473e-01 -3.714445e-19 -7.201669e+02 -3.261485e+01 1.923504e+01 +#> k1 -3.714445e-19 0.000000e+00 -4.258512e-15 7.218123e-21 4.355854e-18 +#> k2 -7.201669e+02 -4.258512e-15 3.092510e+06 7.263235e+04 -1.456870e+05 +#> g -3.261485e+01 7.218123e-21 7.263235e+04 3.291750e+03 -1.939948e+03 +#> sigma_low 1.923504e+01 4.355854e-18 -1.456870e+05 -1.939948e+03 7.759299e+04 +#> rsd_high 3.902119e+00 -2.259812e-19 -1.779680e+03 -4.048658e+02 3.984179e+03 +#> rsd_high +#> parent_0 3.902119e+00 +#> k1 -2.259812e-19 +#> k2 -1.779680e+03 +#> g -4.048658e+02 +#> sigma_low 3.984179e+03 +#> rsd_high 7.188991e+03 +#> +#> $call +#> mkinfit(mkinmod = "DFOP", observed = subset(FOCUS_2006_D, value != +#> 0), parms.ini = c(k1 = 0.699298911979803, k2 = 0.0899931270871125, +#> g = 0.0923391681138686), state.ini = c(parent = 101.948852047129), +#> quiet = TRUE, error_model = "tc") +#> +#> $error_model_algorithm +#> [1] "d_3" +#> +#> $solution_type +#> [1] "analytical" +#> +#> $transform_rates +#> [1] TRUE +#> +#> $transform_fractions +#> [1] TRUE +#> +#> $reweight.tol +#> [1] 1e-08 +#> +#> $reweight.max.iter +#> [1] 10 +#> +#> $control +#> $control$eval.max +#> [1] 300 +#> +#> $control$iter.max +#> [1] 200 +#> +#> +#> $calls +#> [1] 3105 +#> +#> $time +#> User System verstrichen +#> 10.314 0.000 10.320 +#> +#> $mkinmod +#> <mkinmod> model generated with +#> Use of formation fractions $use_of_ff: min +#> Specification $spec: +#> $parent +#> $type: DFOP; $sink: TRUE +#> Differential equations: +#> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * +#> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) +#> * parent +#> +#> $observed +#> name time value +#> 1 parent 0 99.46 +#> 2 parent 0 102.04 +#> 3 parent 1 93.50 +#> 4 parent 1 92.50 +#> 5 parent 3 63.23 +#> 6 parent 3 68.99 +#> 7 parent 7 52.32 +#> 8 parent 7 55.13 +#> 9 parent 14 27.27 +#> 10 parent 14 26.64 +#> 11 parent 21 11.50 +#> 12 parent 21 11.64 +#> 13 parent 35 2.85 +#> 14 parent 35 2.91 +#> 15 parent 50 0.69 +#> 16 parent 50 0.63 +#> 17 parent 75 0.05 +#> 18 parent 75 0.06 +#> +#> $obs_vars +#> [1] "parent" +#> +#> $predicted +#> name time value +#> 1 parent 0.0000000 100.85489822 +#> 2 parent 0.7575758 93.45650191 +#> 3 parent 1.0000000 91.20560523 +#> 4 parent 1.5151515 86.60082860 +#> 5 parent 2.2727273 80.24806580 +#> 6 parent 3.0000000 74.58828105 +#> 7 parent 3.0303030 74.36132158 +#> 8 parent 3.7878788 68.90641029 +#> 9 parent 4.5454545 63.85165403 +#> 10 parent 5.3030303 59.16769870 +#> 11 parent 6.0606061 54.82734352 +#> 12 parent 6.8181818 50.80538306 +#> 13 parent 7.0000000 49.88485755 +#> 14 parent 7.5757576 47.07846089 +#> 15 parent 8.3333333 43.62493394 +#> 16 parent 9.0909091 40.42474681 +#> 17 parent 9.8484848 37.45931528 +#> 18 parent 10.6060606 34.71141842 +#> 19 parent 11.3636364 32.16509858 +#> 20 parent 12.1212121 29.80556871 +#> 21 parent 12.8787879 27.61912649 +#> 22 parent 13.6363636 25.59307475 +#> 23 parent 14.0000000 24.67405211 +#> 24 parent 14.3939394 23.71564776 +#> 25 parent 15.1515152 21.97594287 +#> 26 parent 15.9090909 20.36385722 +#> 27 parent 16.6666667 18.87002909 +#> 28 parent 17.4242424 17.48578345 +#> 29 parent 18.1818182 16.20308170 +#> 30 parent 18.9393939 15.01447489 +#> 31 parent 19.6969697 13.91306051 +#> 32 parent 20.4545455 12.89244241 +#> 33 parent 21.0000000 12.20428157 +#> 34 parent 21.2121212 11.94669362 +#> 35 parent 21.9696970 11.07032198 +#> 36 parent 22.7272727 10.25823818 +#> 37 parent 23.4848485 9.50572628 +#> 38 parent 24.2424242 8.80841627 +#> 39 parent 25.0000000 8.16225872 +#> 40 parent 25.7575758 7.56350125 +#> 41 parent 26.5151515 7.00866672 +#> 42 parent 27.2727273 6.49453311 +#> 43 parent 28.0303030 6.01811471 +#> 44 parent 28.7878788 5.57664485 +#> 45 parent 29.5454545 5.16755983 +#> 46 parent 30.3030303 4.78848399 +#> 47 parent 31.0606061 4.43721595 +#> 48 parent 31.8181818 4.11171583 +#> 49 parent 32.5757576 3.81009336 +#> 50 parent 33.3333333 3.53059697 +#> 51 parent 34.0909091 3.27160354 +#> 52 parent 34.8484848 3.03160906 +#> 53 parent 35.0000000 2.98576554 +#> 54 parent 35.6060606 2.80921981 +#> 55 parent 36.3636364 2.60314433 +#> 56 parent 37.1212121 2.41218590 +#> 57 parent 37.8787879 2.23523557 +#> 58 parent 38.6363636 2.07126576 +#> 59 parent 39.3939394 1.91932426 +#> 60 parent 40.1515152 1.77852870 +#> 61 parent 40.9090909 1.64806147 +#> 62 parent 41.6666667 1.52716489 +#> 63 parent 42.4242424 1.41513691 +#> 64 parent 43.1818182 1.31132694 +#> 65 parent 43.9393939 1.21513214 +#> 66 parent 44.6969697 1.12599389 +#> 67 parent 45.4545455 1.04339454 +#> 68 parent 46.2121212 0.96685442 +#> 69 parent 46.9696970 0.89592904 +#> 70 parent 47.7272727 0.83020652 +#> 71 parent 48.4848485 0.76930520 +#> 72 parent 49.2424242 0.71287140 +#> 73 parent 50.0000000 0.66057741 +#> 74 parent 50.7575758 0.61211954 +#> 75 parent 51.5151515 0.56721639 +#> 76 parent 52.2727273 0.52560719 +#> 77 parent 53.0303030 0.48705031 +#> 78 parent 53.7878788 0.45132184 +#> 79 parent 54.5454545 0.41821430 +#> 80 parent 55.3030303 0.38753542 +#> 81 parent 56.0606061 0.35910705 +#> 82 parent 56.8181818 0.33276409 +#> 83 parent 57.5757576 0.30835357 +#> 84 parent 58.3333333 0.28573373 +#> 85 parent 59.0909091 0.26477320 +#> 86 parent 59.8484848 0.24535028 +#> 87 parent 60.6060606 0.22735216 +#> 88 parent 61.3636364 0.21067432 +#> 89 parent 62.1212121 0.19521992 +#> 90 parent 62.8787879 0.18089921 +#> 91 parent 63.6363636 0.16762901 +#> 92 parent 64.3939394 0.15533228 +#> 93 parent 65.1515152 0.14393759 +#> 94 parent 65.9090909 0.13337879 +#> 95 parent 66.6666667 0.12359454 +#> 96 parent 67.4242424 0.11452804 +#> 97 parent 68.1818182 0.10612662 +#> 98 parent 68.9393939 0.09834151 +#> 99 parent 69.6969697 0.09112749 +#> 100 parent 70.4545455 0.08444266 +#> 101 parent 71.2121212 0.07824822 +#> 102 parent 71.9696970 0.07250818 +#> 103 parent 72.7272727 0.06718920 +#> 104 parent 73.4848485 0.06226042 +#> 105 parent 74.2424242 0.05769319 +#> 106 parent 75.0000000 0.05346100 +#> +#> $rss +#> function (P) +#> cost_function(P, OLS = TRUE, update_data = FALSE) +#> <bytecode: 0x555557c557c8> +#> <environment: 0x55555bb0e330> +#> +#> $ll +#> function (P, fixed_degparms = FALSE, fixed_errparms = FALSE) +#> { +#> -cost_function(P, trans = FALSE, fixed_degparms = fixed_degparms, +#> fixed_errparms = fixed_errparms, OLS = FALSE, update_data = FALSE) +#> } +#> <bytecode: 0x555557c55bf0> +#> <environment: 0x55555bb0e330> +#> +#> $start +#> value type +#> parent_0 101.94885205 state +#> k1 0.69929891 deparm +#> k2 0.08999313 deparm +#> g 0.09233917 deparm +#> sigma_low 0.10000000 error +#> rsd_high 0.10000000 error +#> +#> $start_transformed +#> value lower upper +#> parent_0 101.948852 -Inf Inf +#> log_k1 -0.357677 -Inf Inf +#> log_k2 -2.408022 -Inf Inf +#> g_ilr -1.616024 -Inf Inf +#> sigma_low 0.100000 0 Inf +#> rsd_high 0.100000 0 Inf +#> +#> $fixed +#> [1] value type +#> <0 Zeilen> (oder row.names mit Länge 0) +#> +#> $data +#> time variable observed predicted residual +#> 1 0 parent 99.46 100.8548982 -1.39489822 +#> 2 0 parent 102.04 100.8548982 1.18510178 +#> 3 1 parent 93.50 91.2056052 2.29439477 +#> 4 1 parent 92.50 91.2056052 1.29439477 +#> 5 3 parent 63.23 74.5882810 -11.35828105 +#> 6 3 parent 68.99 74.5882810 -5.59828105 +#> 7 7 parent 52.32 49.8848576 2.43514245 +#> 8 7 parent 55.13 49.8848576 5.24514245 +#> 9 14 parent 27.27 24.6740521 2.59594789 +#> 10 14 parent 26.64 24.6740521 1.96594789 +#> 11 21 parent 11.50 12.2042816 -0.70428157 +#> 12 21 parent 11.64 12.2042816 -0.56428157 +#> 13 35 parent 2.85 2.9857655 -0.13576554 +#> 14 35 parent 2.91 2.9857655 -0.07576554 +#> 15 50 parent 0.69 0.6605774 0.02942259 +#> 16 50 parent 0.63 0.6605774 -0.03057741 +#> 17 75 parent 0.05 0.0534610 -0.00346100 +#> 18 75 parent 0.06 0.0534610 0.00653900 +#> +#> $atol +#> [1] 1e-08 +#> +#> $rtol +#> [1] 1e-10 +#> +#> $err_mod +#> [1] "tc" +#> +#> $bparms.optim +#> parent_0 k1 k2 g +#> 1.008549e+02 6.937399e+03 1.005665e-01 6.551046e-10 +#> +#> $bparms.fixed +#> numeric(0) +#> +#> $bparms.ode +#> k1 k2 g +#> 6.937399e+03 1.005665e-01 6.551046e-10 +#> +#> $bparms.state +#> parent +#> 100.8549 +#> +#> $errparms +#> sigma_low rsd_high +#> 0.00375222 0.06763435 +#> +#> $df.residual +#> [1] 12 +#> +#> $date +#> [1] "Thu Oct 31 01:49:09 2019" +#> +#> $version +#> [1] "0.9.49.6" +#> +#> $Rversion +#> [1] "3.6.1" +#> +#> attr(,"class") +#> [1] "mkinfit" "modFit" </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="#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> + + |