diff options
Diffstat (limited to 'docs/reference')
43 files changed, 7314 insertions, 0 deletions
| diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html new file mode 100644 index 00000000..3422c206 --- /dev/null +++ b/docs/reference/DFOP.solution.html @@ -0,0 +1,132 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>DFOP.solution. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function describing decline from a defined starting value using the sum +  of two exponential decline functions.</p> +     + +    <pre><span class='fu'>DFOP.solution</span>(<span class='no'>t</span>, <span class='no'>parent.0</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>g</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>t</dt> +      <dd> Time. </dd> +      <dt>parent.0</dt> +      <dd> Starting value for the response variable at time zero. </dd> +      <dt>k1</dt> +      <dd> First kinetic constant. </dd> +      <dt>k2</dt> +      <dd> Second kinetic constant. </dd> +      <dt>g</dt> +      <dd> Fraction of the starting value declining according to the +    first kinetic constant. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The value of the response variable at time <code>t</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='fu'>plot</span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>DFOP.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>5</span>, <span class='fl'>0.5</span>, <span class='fl'>0.3</span>), <span class='fl'>0</span>, <span class='fl'>4</span>, <span class='kw'>ylim</span><span class='kw'>=</span><span class='fu'>c</span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><img src='unknown-2.png' alt='' width='540' height='400' /></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html new file mode 100644 index 00000000..b811eb95 --- /dev/null +++ b/docs/reference/Extract.mmkin.html @@ -0,0 +1,1192 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>[.mmkin. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1>Subsetting method for mmkin objects</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Subsetting method for mmkin objects.</p> +     + +    <pre># S3 method for mmkin +[(x, i, j, ..., drop = FALSE)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd>An <code>mmkin object</code></dd> +      <dt>i</dt> +      <dd>Row index selecting the fits for specific models</dd> +      <dt>j</dt> +      <dd>Column index selecting the fits to specific datasets</dd> +      <dt>...</dt> +      <dd>Not used, only there to satisfy the generic method definition</dd> +      <dt>drop</dt> +      <dd>If FALSE, the method always returns an mmkin object, otherwise either  +  a list of mkinfit objects or a single mkinfit object.</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>An object of class <code>mmkin</code>.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='co'># Only use one core, to pass R CMD check --as-cran</span> +  <span class='no'>fits</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='fu'>c</span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>), <span class='fu'>list</span>(<span class='kw'>B</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_B</span>, <span class='kw'>C</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</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>) +  <span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ]</div><div class='output co'>#>       dataset +#> model  B       C       +#>   FOMC List,42 List,42 +#> attr(,"class") +#> [1] "mmkin" +#> </div><div class='input'>  <span class='no'>fits</span>[, <span class='st'>"B"</span>]</div><div class='output co'>#>       dataset +#> model  B       +#>   SFO  List,42 +#>   FOMC List,42 +#> attr(,"class") +#> [1] "mmkin" +#> </div><div class='input'>  <span class='no'>fits</span>[, <span class='st'>"B"</span>, <span class='kw'>drop</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>]$<span class='no'>FOMC</span></div><div class='output co'>#> $par +#>  parent_0 log_alpha  log_beta  +#> 99.666193  2.549849  5.050586  +#>  +#> $ssr +#> [1] 28.58291 +#>  +#> $convergence +#> [1] 0 +#>  +#> $iterations +#> [1] 21 +#>  +#> $evaluations +#> function gradient  +#>       25       78  +#>  +#> $counts +#> [1] "both X-convergence and relative convergence (5)" +#>  +#> $hessian +#>             parent_0   log_alpha    log_beta +#> parent_0    4.123033   -95.69983    93.17699 +#> log_alpha -95.699832  6618.85833 -6352.46648 +#> log_beta   93.176993 -6352.46648  6101.23483 +#>  +#> $residuals +#>       parent       parent       parent       parent       parent       parent  +#>  1.046192647 -3.322396479  3.655156669 -1.705316770  0.406306255 -0.123734689  +#>       parent       parent  +#> -0.036886982 -0.006240458  +#>  +#> $ms +#> [1] 3.572863 +#>  +#> $var_ms +#>   parent  +#> 3.572863  +#>  +#> $var_ms_unscaled +#>   parent  +#> 3.572863  +#>  +#> $var_ms_unweighted +#>   parent  +#> 3.572863  +#>  +#> $rank +#> [1] 3 +#>  +#> $df.residual +#> [1] 5 +#>  +#> $solution_type +#> [1] "analytical" +#>  +#> $transform_rates +#> [1] TRUE +#>  +#> $transform_fractions +#> [1] TRUE +#>  +#> $method.modFit +#> [1] "Port" +#>  +#> $maxit.modFit +#> [1] "auto" +#>  +#> $calls +#> [1] 111 +#>  +#> $time +#>    user  system elapsed  +#>   0.256   0.000   0.257  +#>  +#> $mkinmod +#> <mkinmod> model generated with +#> Use of formation fractions $use_of_ff: min  +#> Specification $spec: +#> $parent +#> $type: FOMC; $sink: TRUE +#>  +#> $observed +#>     name time value +#> 1 parent    0 98.62 +#> 2 parent    3 81.43 +#> 3 parent    7 53.18 +#> 4 parent   14 34.89 +#> 5 parent   30 10.09 +#> 6 parent   62  1.50 +#> 7 parent   90  0.33 +#> 8 parent  118  0.08 +#>  +#> $obs_vars +#> [1] "parent" +#>  +#> $predicted +#>       name       time       value +#> 1   parent   0.000000 99.66619265 +#> 2   parent   1.191919 90.41690342 +#> 3   parent   2.383838 82.08630014 +#> 4   parent   3.000000 78.10760352 +#> 5   parent   3.575758 74.57722848 +#> 6   parent   4.767677 67.80342415 +#> 7   parent   5.959596 61.68822425 +#> 8   parent   7.000000 56.83515667 +#> 9   parent   7.151515 56.16343898 +#> 10  parent   8.343434 51.16836285 +#> 11  parent   9.535354 46.64890734 +#> 12  parent  10.727273 42.55683931 +#> 13  parent  11.919192 38.84911158 +#> 14  parent  13.111111 35.48727414 +#> 15  parent  14.000000 33.18468323 +#> 16  parent  14.303030 32.43695565 +#> 17  parent  15.494949 29.66740651 +#> 18  parent  16.686869 27.15109578 +#> 19  parent  17.878788 24.86335532 +#> 20  parent  19.070707 22.78206538 +#> 21  parent  20.262626 20.88737647 +#> 22  parent  21.454545 19.16146324 +#> 23  parent  22.646465 17.58830644 +#> 24  parent  23.838384 16.15349953 +#> 25  parent  25.030303 14.84407724 +#> 26  parent  26.222222 13.64836315 +#> 27  parent  27.414141 12.55583436 +#> 28  parent  28.606061 11.55700107 +#> 29  parent  29.797980 10.64329940 +#> 30  parent  30.000000 10.49630626 +#> 31  parent  30.989899  9.80699593 +#> 32  parent  32.181818  9.04110261 +#> 33  parent  33.373737  8.33930082 +#> 34  parent  34.565657  7.69587362 +#> 35  parent  35.757576  7.10564515 +#> 36  parent  36.949495  6.56392657 +#> 37  parent  38.141414  6.06646759 +#> 38  parent  39.333333  5.60941311 +#> 39  parent  40.525253  5.18926438 +#> 40  parent  41.717172  4.80284421 +#> 41  parent  42.909091  4.44726569 +#> 42  parent  44.101010  4.11990420 +#> 43  parent  45.292929  3.81837216 +#> 44  parent  46.484848  3.54049644 +#> 45  parent  47.676768  3.28429799 +#> 46  parent  48.868687  3.04797350 +#> 47  parent  50.060606  2.82987892 +#> 48  parent  51.252525  2.62851456 +#> 49  parent  52.444444  2.44251172 +#> 50  parent  53.636364  2.27062056 +#> 51  parent  54.828283  2.11169922 +#> 52  parent  56.020202  1.96470393 +#> 53  parent  57.212121  1.82868009 +#> 54  parent  58.404040  1.70275424 +#> 55  parent  59.595960  1.58612677 +#> 56  parent  60.787879  1.47806529 +#> 57  parent  61.979798  1.37789865 +#> 58  parent  62.000000  1.37626531 +#> 59  parent  63.171717  1.28501157 +#> 60  parent  64.363636  1.19883967 +#> 61  parent  65.555556  1.11886504 +#> 62  parent  66.747475  1.04461220 +#> 63  parent  67.939394  0.97564441 +#> 64  parent  69.131313  0.91156031 +#> 65  parent  70.323232  0.85199096 +#> 66  parent  71.515152  0.79659697 +#> 67  parent  72.707071  0.74506609 +#> 68  parent  73.898990  0.69711084 +#> 69  parent  75.090909  0.65246649 +#> 70  parent  76.282828  0.61088912 +#> 71  parent  77.474747  0.57215389 +#> 72  parent  78.666667  0.53605348 +#> 73  parent  79.858586  0.50239663 +#> 74  parent  81.050505  0.47100683 +#> 75  parent  82.242424  0.44172111 +#> 76  parent  83.434343  0.41438896 +#> 77  parent  84.626263  0.38887128 +#> 78  parent  85.818182  0.36503953 +#> 79  parent  87.010101  0.34277481 +#> 80  parent  88.202020  0.32196716 +#> 81  parent  89.393939  0.30251479 +#> 82  parent  90.000000  0.29311302 +#> 83  parent  90.585859  0.28432347 +#> 84  parent  91.777778  0.26730596 +#> 85  parent  92.969697  0.25138141 +#> 86  parent  94.161616  0.23647487 +#> 87  parent  95.353535  0.22251689 +#> 88  parent  96.545455  0.20944302 +#> 89  parent  97.737374  0.19719349 +#> 90  parent  98.929293  0.18571281 +#> 91  parent 100.121212  0.17494947 +#> 92  parent 101.313131  0.16485560 +#> 93  parent 102.505051  0.15538676 +#> 94  parent 103.696970  0.14650163 +#> 95  parent 104.888889  0.13816179 +#> 96  parent 106.080808  0.13033150 +#> 97  parent 107.272727  0.12297753 +#> 98  parent 108.464646  0.11606895 +#> 99  parent 109.656566  0.10957695 +#> 100 parent 110.848485  0.10347470 +#> 101 parent 112.040404  0.09773723 +#> 102 parent 113.232323  0.09234125 +#> 103 parent 114.424242  0.08726506 +#> 104 parent 115.616162  0.08248842 +#> 105 parent 116.808081  0.07799245 +#> 106 parent 118.000000  0.07375954 +#>  +#> $cost +#> function (P)  +#> { +#>     assign("calls", calls + 1, inherits = TRUE) +#>     if (trace_parms)  +#>         cat(P, "\n") +#>     if (length(state.ini.optim) > 0) { +#>         odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) +#>         names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) +#>     } +#>     else { +#>         odeini <- state.ini.fixed +#>         names(odeini) <- state.ini.fixed.boxnames +#>     } +#>     odeparms <- c(P[(length(state.ini.optim) + 1):length(P)],  +#>         transparms.fixed) +#>     parms <- backtransform_odeparms(odeparms, mkinmod, transform_rates = transform_rates,  +#>         transform_fractions = transform_fractions) +#>     out <- mkinpredict(mkinmod, parms, odeini, outtimes, solution_type = solution_type,  +#>         use_compiled = use_compiled, method.ode = method.ode,  +#>         atol = atol, rtol = rtol, ...) +#>     assign("out_predicted", out, inherits = TRUE) +#>     mC <- modCost(out, observed, y = "value", err = err, weight = weight,  +#>         scaleVar = scaleVar) +#>     if (mC$model < cost.old) { +#>         if (!quiet)  +#>             cat("Model cost at call ", calls, ": ", mC$model,  +#>                 "\n") +#>         if (plot) { +#>             outtimes_plot = seq(min(observed$time), max(observed$time),  +#>                 length.out = 100) +#>             out_plot <- mkinpredict(mkinmod, parms, odeini, outtimes_plot,  +#>                 solution_type = solution_type, use_compiled = use_compiled,  +#>                 method.ode = method.ode, atol = atol, rtol = rtol,  +#>                 ...) +#>             plot(0, type = "n", xlim = range(observed$time),  +#>                 ylim = c(0, max(observed$value, na.rm = TRUE)),  +#>                 xlab = "Time", ylab = "Observed") +#>             col_obs <- pch_obs <- 1:length(obs_vars) +#>             lty_obs <- rep(1, length(obs_vars)) +#>             names(col_obs) <- names(pch_obs) <- names(lty_obs) <- obs_vars +#>             for (obs_var in obs_vars) { +#>                 points(subset(observed, name == obs_var, c(time,  +#>                   value)), pch = pch_obs[obs_var], col = col_obs[obs_var]) +#>             } +#>             matlines(out_plot$time, out_plot[-1], col = col_obs,  +#>                 lty = lty_obs) +#>             legend("topright", inset = c(0.05, 0.05), legend = obs_vars,  +#>                 col = col_obs, pch = pch_obs, lty = 1:length(pch_obs)) +#>         } +#>         assign("cost.old", mC$model, inherits = TRUE) +#>     } +#>     return(mC) +#> } +#> <environment: 0x27fc328> +#>  +#> $cost_notrans +#> function (P)  +#> { +#>     if (length(state.ini.optim) > 0) { +#>         odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) +#>         names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) +#>     } +#>     else { +#>         odeini <- state.ini.fixed +#>         names(odeini) <- state.ini.fixed.boxnames +#>     } +#>     odeparms <- c(P[(length(state.ini.optim) + 1):length(P)],  +#>         parms.fixed) +#>     out <- mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = solution_type,  +#>         use_compiled = use_compiled, method.ode = method.ode,  +#>         atol = atol, rtol = rtol, ...) +#>     mC <- modCost(out, observed, y = "value", err = err, weight = weight,  +#>         scaleVar = scaleVar) +#>     return(mC) +#> } +#> <environment: 0x27fc328> +#>  +#> $hessian_notrans +#>            parent_0     alpha       beta +#> parent_0  4.1230329 -7.473531  0.5968527 +#> alpha    -7.4735307 40.365690 -3.1777189 +#> beta      0.5968527 -3.177719  0.2503425 +#>  +#> $start +#>          value   type +#> parent_0 98.62  state +#> alpha     1.00 deparm +#> beta     10.00 deparm +#>  +#> $start_transformed +#>               value lower upper +#> parent_0  98.620000  -Inf   Inf +#> log_alpha  0.000000  -Inf   Inf +#> log_beta   2.302585  -Inf   Inf +#>  +#> $fixed +#> [1] value type  +#> <0 rows> (or 0-length row.names) +#>  +#> $data +#>   time variable observed   predicted     residual +#> 1    0   parent    98.62 99.66619265 -1.046192647 +#> 2    3   parent    81.43 78.10760352  3.322396479 +#> 3    7   parent    53.18 56.83515667 -3.655156669 +#> 4   14   parent    34.89 33.18468323  1.705316770 +#> 5   30   parent    10.09 10.49630626 -0.406306255 +#> 6   62   parent     1.50  1.37626531  0.123734689 +#> 7   90   parent     0.33  0.29311302  0.036886982 +#> 8  118   parent     0.08  0.07375954  0.006240458 +#>  +#> $atol +#> [1] 1e-08 +#>  +#> $rtol +#> [1] 1e-10 +#>  +#> $weight.ini +#> [1] "none" +#>  +#> $reweight.tol +#> [1] 1e-08 +#>  +#> $reweight.max.iter +#> [1] 10 +#>  +#> $bparms.optim +#>  parent_0     alpha      beta  +#>  99.66619  12.80517 156.11390  +#>  +#> $bparms.fixed +#> numeric(0) +#>  +#> $bparms.ode +#>     alpha      beta  +#>  12.80517 156.11390  +#>  +#> $bparms.state +#>   parent  +#> 99.66619  +#>  +#> $date +#> [1] "Thu Oct  6 09:17:52 2016" +#>  +#> attr(,"class") +#> [1] "mkinfit" "modFit"  +#> </div><div class='input'>  <span class='no'>fits</span>[<span class='st'>"SFO"</span>, <span class='st'>"B"</span>]</div><div class='output co'>#>      dataset +#> model B       +#>   SFO List,42 +#> attr(,"class") +#> [1] "mmkin" +#> </div><div class='input'>  <span class='no'>fits</span><span class='kw'>[[</span><span class='st'>"SFO"</span>, <span class='st'>"B"</span>]] <span class='co'># This is equivalent to</span></div><div class='output co'>#> $par +#>          parent_0 log_k_parent_sink  +#>         99.174072         -2.549028  +#>  +#> $ssr +#> [1] 30.65564 +#>  +#> $convergence +#> [1] 0 +#>  +#> $iterations +#> [1] 5 +#>  +#> $evaluations +#> function gradient  +#>        8       15  +#>  +#> $counts +#> [1] "relative convergence (4)" +#>  +#> $hessian +#>                     parent_0 log_k_parent_sink +#> parent_0            4.163631         -94.09343 +#> log_k_parent_sink -94.093431        6311.34610 +#>  +#> $residuals +#>      parent      parent      parent      parent      parent      parent  +#>  0.55407218 -2.98452128  4.20445742 -1.68599939 -0.58185357 -0.72033730  +#>      parent      parent  +#> -0.24260405 -0.07020339  +#>  +#> $ms +#> [1] 3.831956 +#>  +#> $var_ms +#>   parent  +#> 3.831956  +#>  +#> $var_ms_unscaled +#>   parent  +#> 3.831956  +#>  +#> $var_ms_unweighted +#>   parent  +#> 3.831956  +#>  +#> $rank +#> [1] 2 +#>  +#> $df.residual +#> [1] 6 +#>  +#> $solution_type +#> [1] "analytical" +#>  +#> $transform_rates +#> [1] TRUE +#>  +#> $transform_fractions +#> [1] TRUE +#>  +#> $method.modFit +#> [1] "Port" +#>  +#> $maxit.modFit +#> [1] "auto" +#>  +#> $calls +#> [1] 29 +#>  +#> $time +#>    user  system elapsed  +#>   0.068   0.000   0.068  +#>  +#> $mkinmod +#> <mkinmod> model generated with +#> Use of formation fractions $use_of_ff: min  +#> Specification $spec: +#> $parent +#> $type: SFO; $sink: TRUE +#> Coefficient matrix $coefmat available +#>  +#> $observed +#>     name time value +#> 1 parent    0 98.62 +#> 2 parent    3 81.43 +#> 3 parent    7 53.18 +#> 4 parent   14 34.89 +#> 5 parent   30 10.09 +#> 6 parent   62  1.50 +#> 7 parent   90  0.33 +#> 8 parent  118  0.08 +#>  +#> $obs_vars +#> [1] "parent" +#>  +#> $predicted +#>       name       time       value +#> 1   parent   0.000000 99.17407218 +#> 2   parent   1.191919 90.35253561 +#> 3   parent   2.383838 82.31567498 +#> 4   parent   3.000000 78.44547872 +#> 5   parent   3.575758 74.99369333 +#> 6   parent   4.767677 68.32300215 +#> 7   parent   5.959596 62.24566915 +#> 8   parent   7.000000 57.38445742 +#> 9   parent   7.151515 56.70891509 +#> 10  parent   8.343434 51.66465547 +#> 11  parent   9.535354 47.06908288 +#> 12  parent  10.727273 42.88228661 +#> 13  parent  11.919192 39.06790599 +#> 14  parent  13.111111 35.59281463 +#> 15  parent  14.000000 33.20400061 +#> 16  parent  14.303030 32.42683275 +#> 17  parent  15.494949 29.54246504 +#> 18  parent  16.686869 26.91466193 +#> 19  parent  17.878788 24.52060198 +#> 20  parent  19.070707 22.33949373 +#> 21  parent  20.262626 20.35239512 +#> 22  parent  21.454545 18.54204899 +#> 23  parent  22.646465 16.89273320 +#> 24  parent  23.838384 15.39012410 +#> 25  parent  25.030303 14.02117212 +#> 26  parent  26.222222 12.77398846 +#> 27  parent  27.414141 11.63774182 +#> 28  parent  28.606061 10.60256435 +#> 29  parent  29.797980  9.65946594 +#> 30  parent  30.000000  9.50814643 +#> 31  parent  30.989899  8.80025617 +#> 32  parent  32.181818  8.01747313 +#> 33  parent  33.373737  7.30431867 +#> 34  parent  34.565657  6.65459931 +#> 35  parent  35.757576  6.06267251 +#> 36  parent  36.949495  5.52339762 +#> 37  parent  38.141414  5.03209124 +#> 38  parent  39.333333  4.58448658 +#> 39  parent  40.525253  4.17669637 +#> 40  parent  41.717172  3.80517911 +#> 41  parent  42.909091  3.46670832 +#> 42  parent  44.101010  3.15834451 +#> 43  parent  45.292929  2.87740968 +#> 44  parent  46.484848  2.62146400 +#> 45  parent  47.676768  2.38828471 +#> 46  parent  48.868687  2.17584671 +#> 47  parent  50.060606  1.98230508 +#> 48  parent  51.252525  1.80597899 +#> 49  parent  52.444444  1.64533711 +#> 50  parent  53.636364  1.49898432 +#> 51  parent  54.828283  1.36564963 +#> 52  parent  56.020202  1.24417505 +#> 53  parent  57.212121  1.13350565 +#> 54  parent  58.404040  1.03268029 +#> 55  parent  59.595960  0.94082335 +#> 56  parent  60.787879  0.85713708 +#> 57  parent  61.979798  0.78089471 +#> 58  parent  62.000000  0.77966270 +#> 59  parent  63.171717  0.71143411 +#> 60  parent  64.363636  0.64815202 +#> 61  parent  65.555556  0.59049888 +#> 62  parent  66.747475  0.53797399 +#> 63  parent  67.939394  0.49012119 +#> 64  parent  69.131313  0.44652489 +#> 65  parent  70.323232  0.40680649 +#> 66  parent  71.515152  0.37062104 +#> 67  parent  72.707071  0.33765429 +#> 68  parent  73.898990  0.30761993 +#> 69  parent  75.090909  0.28025713 +#> 70  parent  76.282828  0.25532825 +#> 71  parent  77.474747  0.23261679 +#> 72  parent  78.666667  0.21192552 +#> 73  parent  79.858586  0.19307474 +#> 74  parent  81.050505  0.17590074 +#> 75  parent  82.242424  0.16025436 +#> 76  parent  83.434343  0.14599973 +#> 77  parent  84.626263  0.13301305 +#> 78  parent  85.818182  0.12118154 +#> 79  parent  87.010101  0.11040244 +#> 80  parent  88.202020  0.10058214 +#> 81  parent  89.393939  0.09163535 +#> 82  parent  90.000000  0.08739595 +#> 83  parent  90.585859  0.08348439 +#> 84  parent  91.777778  0.07605845 +#> 85  parent  92.969697  0.06929305 +#> 86  parent  94.161616  0.06312943 +#> 87  parent  95.353535  0.05751406 +#> 88  parent  96.545455  0.05239819 +#> 89  parent  97.737374  0.04773737 +#> 90  parent  98.929293  0.04349113 +#> 91  parent 100.121212  0.03962259 +#> 92  parent 101.313131  0.03609816 +#> 93  parent 102.505051  0.03288723 +#> 94  parent 103.696970  0.02996191 +#> 95  parent 104.888889  0.02729679 +#> 96  parent 106.080808  0.02486874 +#> 97  parent 107.272727  0.02265667 +#> 98  parent 108.464646  0.02064136 +#> 99  parent 109.656566  0.01880531 +#> 100 parent 110.848485  0.01713257 +#> 101 parent 112.040404  0.01560863 +#> 102 parent 113.232323  0.01422024 +#> 103 parent 114.424242  0.01295535 +#> 104 parent 115.616162  0.01180297 +#> 105 parent 116.808081  0.01075310 +#> 106 parent 118.000000  0.00979661 +#>  +#> $cost +#> function (P)  +#> { +#>     assign("calls", calls + 1, inherits = TRUE) +#>     if (trace_parms)  +#>         cat(P, "\n") +#>     if (length(state.ini.optim) > 0) { +#>         odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) +#>         names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) +#>     } +#>     else { +#>         odeini <- state.ini.fixed +#>         names(odeini) <- state.ini.fixed.boxnames +#>     } +#>     odeparms <- c(P[(length(state.ini.optim) + 1):length(P)],  +#>         transparms.fixed) +#>     parms <- backtransform_odeparms(odeparms, mkinmod, transform_rates = transform_rates,  +#>         transform_fractions = transform_fractions) +#>     out <- mkinpredict(mkinmod, parms, odeini, outtimes, solution_type = solution_type,  +#>         use_compiled = use_compiled, method.ode = method.ode,  +#>         atol = atol, rtol = rtol, ...) +#>     assign("out_predicted", out, inherits = TRUE) +#>     mC <- modCost(out, observed, y = "value", err = err, weight = weight,  +#>         scaleVar = scaleVar) +#>     if (mC$model < cost.old) { +#>         if (!quiet)  +#>             cat("Model cost at call ", calls, ": ", mC$model,  +#>                 "\n") +#>         if (plot) { +#>             outtimes_plot = seq(min(observed$time), max(observed$time),  +#>                 length.out = 100) +#>             out_plot <- mkinpredict(mkinmod, parms, odeini, outtimes_plot,  +#>                 solution_type = solution_type, use_compiled = use_compiled,  +#>                 method.ode = method.ode, atol = atol, rtol = rtol,  +#>                 ...) +#>             plot(0, type = "n", xlim = range(observed$time),  +#>                 ylim = c(0, max(observed$value, na.rm = TRUE)),  +#>                 xlab = "Time", ylab = "Observed") +#>             col_obs <- pch_obs <- 1:length(obs_vars) +#>             lty_obs <- rep(1, length(obs_vars)) +#>             names(col_obs) <- names(pch_obs) <- names(lty_obs) <- obs_vars +#>             for (obs_var in obs_vars) { +#>                 points(subset(observed, name == obs_var, c(time,  +#>                   value)), pch = pch_obs[obs_var], col = col_obs[obs_var]) +#>             } +#>             matlines(out_plot$time, out_plot[-1], col = col_obs,  +#>                 lty = lty_obs) +#>             legend("topright", inset = c(0.05, 0.05), legend = obs_vars,  +#>                 col = col_obs, pch = pch_obs, lty = 1:length(pch_obs)) +#>         } +#>         assign("cost.old", mC$model, inherits = TRUE) +#>     } +#>     return(mC) +#> } +#> <environment: 0x2e966b0> +#>  +#> $cost_notrans +#> function (P)  +#> { +#>     if (length(state.ini.optim) > 0) { +#>         odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) +#>         names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) +#>     } +#>     else { +#>         odeini <- state.ini.fixed +#>         names(odeini) <- state.ini.fixed.boxnames +#>     } +#>     odeparms <- c(P[(length(state.ini.optim) + 1):length(P)],  +#>         parms.fixed) +#>     out <- mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = solution_type,  +#>         use_compiled = use_compiled, method.ode = method.ode,  +#>         atol = atol, rtol = rtol, ...) +#>     mC <- modCost(out, observed, y = "value", err = err, weight = weight,  +#>         scaleVar = scaleVar) +#>     return(mC) +#> } +#> <environment: 0x2e966b0> +#>  +#> $hessian_notrans +#>                   parent_0 k_parent_sink +#> parent_0          4.163631     -1203.894 +#> k_parent_sink -1203.893702   1033188.753 +#>  +#> $start +#>               value   type +#> parent_0      98.62  state +#> k_parent_sink  0.10 deparm +#>  +#> $start_transformed +#>                       value lower upper +#> parent_0          98.620000  -Inf   Inf +#> log_k_parent_sink -2.302585  -Inf   Inf +#>  +#> $fixed +#> [1] value type  +#> <0 rows> (or 0-length row.names) +#>  +#> $data +#>   time variable observed   predicted    residual +#> 1    0   parent    98.62 99.17407218 -0.55407218 +#> 2    3   parent    81.43 78.44547872  2.98452128 +#> 3    7   parent    53.18 57.38445742 -4.20445742 +#> 4   14   parent    34.89 33.20400061  1.68599939 +#> 5   30   parent    10.09  9.50814643  0.58185357 +#> 6   62   parent     1.50  0.77966270  0.72033730 +#> 7   90   parent     0.33  0.08739595  0.24260405 +#> 8  118   parent     0.08  0.00979661  0.07020339 +#>  +#> $atol +#> [1] 1e-08 +#>  +#> $rtol +#> [1] 1e-10 +#>  +#> $weight.ini +#> [1] "none" +#>  +#> $reweight.tol +#> [1] 1e-08 +#>  +#> $reweight.max.iter +#> [1] 10 +#>  +#> $bparms.optim +#>      parent_0 k_parent_sink  +#>   99.17407218    0.07815759  +#>  +#> $bparms.fixed +#> numeric(0) +#>  +#> $bparms.ode +#> k_parent_sink  +#>    0.07815759  +#>  +#> $bparms.state +#>   parent  +#> 99.17407  +#>  +#> $date +#> [1] "Thu Oct  6 09:17:51 2016" +#>  +#> attr(,"class") +#> [1] "mkinfit" "modFit"  +#> </div><div class='input'>  <span class='no'>fits</span>[<span class='st'>"SFO"</span>, <span class='st'>"B"</span>, <span class='kw'>drop</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>]</div><div class='output co'>#> [[1]] +#> $par +#>          parent_0 log_k_parent_sink  +#>         99.174072         -2.549028  +#>  +#> $ssr +#> [1] 30.65564 +#>  +#> $convergence +#> [1] 0 +#>  +#> $iterations +#> [1] 5 +#>  +#> $evaluations +#> function gradient  +#>        8       15  +#>  +#> $counts +#> [1] "relative convergence (4)" +#>  +#> $hessian +#>                     parent_0 log_k_parent_sink +#> parent_0            4.163631         -94.09343 +#> log_k_parent_sink -94.093431        6311.34610 +#>  +#> $residuals +#>      parent      parent      parent      parent      parent      parent  +#>  0.55407218 -2.98452128  4.20445742 -1.68599939 -0.58185357 -0.72033730  +#>      parent      parent  +#> -0.24260405 -0.07020339  +#>  +#> $ms +#> [1] 3.831956 +#>  +#> $var_ms +#>   parent  +#> 3.831956  +#>  +#> $var_ms_unscaled +#>   parent  +#> 3.831956  +#>  +#> $var_ms_unweighted +#>   parent  +#> 3.831956  +#>  +#> $rank +#> [1] 2 +#>  +#> $df.residual +#> [1] 6 +#>  +#> $solution_type +#> [1] "analytical" +#>  +#> $transform_rates +#> [1] TRUE +#>  +#> $transform_fractions +#> [1] TRUE +#>  +#> $method.modFit +#> [1] "Port" +#>  +#> $maxit.modFit +#> [1] "auto" +#>  +#> $calls +#> [1] 29 +#>  +#> $time +#>    user  system elapsed  +#>   0.068   0.000   0.068  +#>  +#> $mkinmod +#> <mkinmod> model generated with +#> Use of formation fractions $use_of_ff: min  +#> Specification $spec: +#> $parent +#> $type: SFO; $sink: TRUE +#> Coefficient matrix $coefmat available +#>  +#> $observed +#>     name time value +#> 1 parent    0 98.62 +#> 2 parent    3 81.43 +#> 3 parent    7 53.18 +#> 4 parent   14 34.89 +#> 5 parent   30 10.09 +#> 6 parent   62  1.50 +#> 7 parent   90  0.33 +#> 8 parent  118  0.08 +#>  +#> $obs_vars +#> [1] "parent" +#>  +#> $predicted +#>       name       time       value +#> 1   parent   0.000000 99.17407218 +#> 2   parent   1.191919 90.35253561 +#> 3   parent   2.383838 82.31567498 +#> 4   parent   3.000000 78.44547872 +#> 5   parent   3.575758 74.99369333 +#> 6   parent   4.767677 68.32300215 +#> 7   parent   5.959596 62.24566915 +#> 8   parent   7.000000 57.38445742 +#> 9   parent   7.151515 56.70891509 +#> 10  parent   8.343434 51.66465547 +#> 11  parent   9.535354 47.06908288 +#> 12  parent  10.727273 42.88228661 +#> 13  parent  11.919192 39.06790599 +#> 14  parent  13.111111 35.59281463 +#> 15  parent  14.000000 33.20400061 +#> 16  parent  14.303030 32.42683275 +#> 17  parent  15.494949 29.54246504 +#> 18  parent  16.686869 26.91466193 +#> 19  parent  17.878788 24.52060198 +#> 20  parent  19.070707 22.33949373 +#> 21  parent  20.262626 20.35239512 +#> 22  parent  21.454545 18.54204899 +#> 23  parent  22.646465 16.89273320 +#> 24  parent  23.838384 15.39012410 +#> 25  parent  25.030303 14.02117212 +#> 26  parent  26.222222 12.77398846 +#> 27  parent  27.414141 11.63774182 +#> 28  parent  28.606061 10.60256435 +#> 29  parent  29.797980  9.65946594 +#> 30  parent  30.000000  9.50814643 +#> 31  parent  30.989899  8.80025617 +#> 32  parent  32.181818  8.01747313 +#> 33  parent  33.373737  7.30431867 +#> 34  parent  34.565657  6.65459931 +#> 35  parent  35.757576  6.06267251 +#> 36  parent  36.949495  5.52339762 +#> 37  parent  38.141414  5.03209124 +#> 38  parent  39.333333  4.58448658 +#> 39  parent  40.525253  4.17669637 +#> 40  parent  41.717172  3.80517911 +#> 41  parent  42.909091  3.46670832 +#> 42  parent  44.101010  3.15834451 +#> 43  parent  45.292929  2.87740968 +#> 44  parent  46.484848  2.62146400 +#> 45  parent  47.676768  2.38828471 +#> 46  parent  48.868687  2.17584671 +#> 47  parent  50.060606  1.98230508 +#> 48  parent  51.252525  1.80597899 +#> 49  parent  52.444444  1.64533711 +#> 50  parent  53.636364  1.49898432 +#> 51  parent  54.828283  1.36564963 +#> 52  parent  56.020202  1.24417505 +#> 53  parent  57.212121  1.13350565 +#> 54  parent  58.404040  1.03268029 +#> 55  parent  59.595960  0.94082335 +#> 56  parent  60.787879  0.85713708 +#> 57  parent  61.979798  0.78089471 +#> 58  parent  62.000000  0.77966270 +#> 59  parent  63.171717  0.71143411 +#> 60  parent  64.363636  0.64815202 +#> 61  parent  65.555556  0.59049888 +#> 62  parent  66.747475  0.53797399 +#> 63  parent  67.939394  0.49012119 +#> 64  parent  69.131313  0.44652489 +#> 65  parent  70.323232  0.40680649 +#> 66  parent  71.515152  0.37062104 +#> 67  parent  72.707071  0.33765429 +#> 68  parent  73.898990  0.30761993 +#> 69  parent  75.090909  0.28025713 +#> 70  parent  76.282828  0.25532825 +#> 71  parent  77.474747  0.23261679 +#> 72  parent  78.666667  0.21192552 +#> 73  parent  79.858586  0.19307474 +#> 74  parent  81.050505  0.17590074 +#> 75  parent  82.242424  0.16025436 +#> 76  parent  83.434343  0.14599973 +#> 77  parent  84.626263  0.13301305 +#> 78  parent  85.818182  0.12118154 +#> 79  parent  87.010101  0.11040244 +#> 80  parent  88.202020  0.10058214 +#> 81  parent  89.393939  0.09163535 +#> 82  parent  90.000000  0.08739595 +#> 83  parent  90.585859  0.08348439 +#> 84  parent  91.777778  0.07605845 +#> 85  parent  92.969697  0.06929305 +#> 86  parent  94.161616  0.06312943 +#> 87  parent  95.353535  0.05751406 +#> 88  parent  96.545455  0.05239819 +#> 89  parent  97.737374  0.04773737 +#> 90  parent  98.929293  0.04349113 +#> 91  parent 100.121212  0.03962259 +#> 92  parent 101.313131  0.03609816 +#> 93  parent 102.505051  0.03288723 +#> 94  parent 103.696970  0.02996191 +#> 95  parent 104.888889  0.02729679 +#> 96  parent 106.080808  0.02486874 +#> 97  parent 107.272727  0.02265667 +#> 98  parent 108.464646  0.02064136 +#> 99  parent 109.656566  0.01880531 +#> 100 parent 110.848485  0.01713257 +#> 101 parent 112.040404  0.01560863 +#> 102 parent 113.232323  0.01422024 +#> 103 parent 114.424242  0.01295535 +#> 104 parent 115.616162  0.01180297 +#> 105 parent 116.808081  0.01075310 +#> 106 parent 118.000000  0.00979661 +#>  +#> $cost +#> function (P)  +#> { +#>     assign("calls", calls + 1, inherits = TRUE) +#>     if (trace_parms)  +#>         cat(P, "\n") +#>     if (length(state.ini.optim) > 0) { +#>         odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) +#>         names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) +#>     } +#>     else { +#>         odeini <- state.ini.fixed +#>         names(odeini) <- state.ini.fixed.boxnames +#>     } +#>     odeparms <- c(P[(length(state.ini.optim) + 1):length(P)],  +#>         transparms.fixed) +#>     parms <- backtransform_odeparms(odeparms, mkinmod, transform_rates = transform_rates,  +#>         transform_fractions = transform_fractions) +#>     out <- mkinpredict(mkinmod, parms, odeini, outtimes, solution_type = solution_type,  +#>         use_compiled = use_compiled, method.ode = method.ode,  +#>         atol = atol, rtol = rtol, ...) +#>     assign("out_predicted", out, inherits = TRUE) +#>     mC <- modCost(out, observed, y = "value", err = err, weight = weight,  +#>         scaleVar = scaleVar) +#>     if (mC$model < cost.old) { +#>         if (!quiet)  +#>             cat("Model cost at call ", calls, ": ", mC$model,  +#>                 "\n") +#>         if (plot) { +#>             outtimes_plot = seq(min(observed$time), max(observed$time),  +#>                 length.out = 100) +#>             out_plot <- mkinpredict(mkinmod, parms, odeini, outtimes_plot,  +#>                 solution_type = solution_type, use_compiled = use_compiled,  +#>                 method.ode = method.ode, atol = atol, rtol = rtol,  +#>                 ...) +#>             plot(0, type = "n", xlim = range(observed$time),  +#>                 ylim = c(0, max(observed$value, na.rm = TRUE)),  +#>                 xlab = "Time", ylab = "Observed") +#>             col_obs <- pch_obs <- 1:length(obs_vars) +#>             lty_obs <- rep(1, length(obs_vars)) +#>             names(col_obs) <- names(pch_obs) <- names(lty_obs) <- obs_vars +#>             for (obs_var in obs_vars) { +#>                 points(subset(observed, name == obs_var, c(time,  +#>                   value)), pch = pch_obs[obs_var], col = col_obs[obs_var]) +#>             } +#>             matlines(out_plot$time, out_plot[-1], col = col_obs,  +#>                 lty = lty_obs) +#>             legend("topright", inset = c(0.05, 0.05), legend = obs_vars,  +#>                 col = col_obs, pch = pch_obs, lty = 1:length(pch_obs)) +#>         } +#>         assign("cost.old", mC$model, inherits = TRUE) +#>     } +#>     return(mC) +#> } +#> <environment: 0x2e966b0> +#>  +#> $cost_notrans +#> function (P)  +#> { +#>     if (length(state.ini.optim) > 0) { +#>         odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) +#>         names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) +#>     } +#>     else { +#>         odeini <- state.ini.fixed +#>         names(odeini) <- state.ini.fixed.boxnames +#>     } +#>     odeparms <- c(P[(length(state.ini.optim) + 1):length(P)],  +#>         parms.fixed) +#>     out <- mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = solution_type,  +#>         use_compiled = use_compiled, method.ode = method.ode,  +#>         atol = atol, rtol = rtol, ...) +#>     mC <- modCost(out, observed, y = "value", err = err, weight = weight,  +#>         scaleVar = scaleVar) +#>     return(mC) +#> } +#> <environment: 0x2e966b0> +#>  +#> $hessian_notrans +#>                   parent_0 k_parent_sink +#> parent_0          4.163631     -1203.894 +#> k_parent_sink -1203.893702   1033188.753 +#>  +#> $start +#>               value   type +#> parent_0      98.62  state +#> k_parent_sink  0.10 deparm +#>  +#> $start_transformed +#>                       value lower upper +#> parent_0          98.620000  -Inf   Inf +#> log_k_parent_sink -2.302585  -Inf   Inf +#>  +#> $fixed +#> [1] value type  +#> <0 rows> (or 0-length row.names) +#>  +#> $data +#>   time variable observed   predicted    residual +#> 1    0   parent    98.62 99.17407218 -0.55407218 +#> 2    3   parent    81.43 78.44547872  2.98452128 +#> 3    7   parent    53.18 57.38445742 -4.20445742 +#> 4   14   parent    34.89 33.20400061  1.68599939 +#> 5   30   parent    10.09  9.50814643  0.58185357 +#> 6   62   parent     1.50  0.77966270  0.72033730 +#> 7   90   parent     0.33  0.08739595  0.24260405 +#> 8  118   parent     0.08  0.00979661  0.07020339 +#>  +#> $atol +#> [1] 1e-08 +#>  +#> $rtol +#> [1] 1e-10 +#>  +#> $weight.ini +#> [1] "none" +#>  +#> $reweight.tol +#> [1] 1e-08 +#>  +#> $reweight.max.iter +#> [1] 10 +#>  +#> $bparms.optim +#>      parent_0 k_parent_sink  +#>   99.17407218    0.07815759  +#>  +#> $bparms.fixed +#> numeric(0) +#>  +#> $bparms.ode +#> k_parent_sink  +#>    0.07815759  +#>  +#> $bparms.state +#>   parent  +#> 99.17407  +#>  +#> $date +#> [1] "Thu Oct  6 09:17:51 2016" +#>  +#> attr(,"class") +#> [1] "mkinfit" "modFit"  +#>  +#> </div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html b/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html new file mode 100644 index 00000000..5c0faa43 --- /dev/null +++ b/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html @@ -0,0 +1,129 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>FOCUS_2006_DFOP_ref_A_to_B. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> +     + +    <pre><span class='fu'>data</span>(<span class='no'>FOCUS_2006_DFOP_ref_A_to_B</span>)</pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>A data frame containing the following variables. +  <dl class='dl-horizontal'> +    <dt><code>package</code></dt><dd>a factor giving the name of the software package</dd> +    <dt><code>M0</code></dt><dd>The fitted initial concentration of the parent compound</dd> +    <dt><code>f</code></dt><dd>The fitted f parameter</dd> +    <dt><code>k1</code></dt><dd>The fitted k1 parameter</dd> +    <dt><code>k2</code></dt><dd>The fitted k2 parameter</dd> +    <dt><code>DT50</code></dt><dd>The resulting half-life of the parent compound</dd> +    <dt><code>DT90</code></dt><dd>The resulting DT90 of the parent compound</dd> +    <dt><code>dataset</code></dt><dd>The FOCUS dataset that was used</dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='no'>FOCUS_2006_DFOP_ref_A_to_B</span>)</div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html new file mode 100644 index 00000000..89faecbf --- /dev/null +++ b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html @@ -0,0 +1,128 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>FOCUS_2006_FOMC_ref_A_to_F. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> +     + +    <pre><span class='fu'>data</span>(<span class='no'>FOCUS_2006_FOMC_ref_A_to_F</span>)</pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>A data frame containing the following variables. +  <dl class='dl-horizontal'> +    <dt><code>package</code></dt><dd>a factor giving the name of the software package</dd> +    <dt><code>M0</code></dt><dd>The fitted initial concentration of the parent compound</dd> +    <dt><code>alpha</code></dt><dd>The fitted alpha parameter</dd> +    <dt><code>beta</code></dt><dd>The fitted beta parameter</dd> +    <dt><code>DT50</code></dt><dd>The resulting half-life of the parent compound</dd> +    <dt><code>DT90</code></dt><dd>The resulting DT90 of the parent compound</dd> +    <dt><code>dataset</code></dt><dd>The FOCUS dataset that was used</dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='no'>FOCUS_2006_FOMC_ref_A_to_F</span>)</div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html new file mode 100644 index 00000000..2dfafec6 --- /dev/null +++ b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html @@ -0,0 +1,129 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>FOCUS_2006_HS_ref_A_to_F. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> +     + +    <pre><span class='fu'>data</span>(<span class='no'>FOCUS_2006_HS_ref_A_to_F</span>)</pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>A data frame containing the following variables. +  <dl class='dl-horizontal'> +    <dt><code>package</code></dt><dd>a factor giving the name of the software package</dd> +    <dt><code>M0</code></dt><dd>The fitted initial concentration of the parent compound</dd> +    <dt><code>tb</code></dt><dd>The fitted tb parameter</dd> +    <dt><code>k1</code></dt><dd>The fitted k1 parameter</dd> +    <dt><code>k2</code></dt><dd>The fitted k2 parameter</dd> +    <dt><code>DT50</code></dt><dd>The resulting half-life of the parent compound</dd> +    <dt><code>DT90</code></dt><dd>The resulting DT90 of the parent compound</dd> +    <dt><code>dataset</code></dt><dd>The FOCUS dataset that was used</dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='no'>FOCUS_2006_HS_ref_A_to_F</span>)</div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html new file mode 100644 index 00000000..ed3a4aff --- /dev/null +++ b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html @@ -0,0 +1,127 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>FOCUS_2006_SFO_ref_A_to_F. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> +     + +    <pre><span class='fu'>data</span>(<span class='no'>FOCUS_2006_SFO_ref_A_to_F</span>)</pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>A data frame containing the following variables. +  <dl class='dl-horizontal'> +    <dt><code>package</code></dt><dd>a factor giving the name of the software package</dd> +    <dt><code>M0</code></dt><dd>The fitted initial concentration of the parent compound</dd> +    <dt><code>k</code></dt><dd>The fitted first-order degradation rate constant</dd> +    <dt><code>DT50</code></dt><dd>The resulting half-life of the parent compound</dd> +    <dt><code>DT90</code></dt><dd>The resulting DT90 of the parent compound</dd> +    <dt><code>dataset</code></dt><dd>The FOCUS dataset that was used</dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='no'>FOCUS_2006_SFO_ref_A_to_F</span>)</div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/FOCUS_2006_datasets.html b/docs/reference/FOCUS_2006_datasets.html new file mode 100644 index 00000000..c1eacbd8 --- /dev/null +++ b/docs/reference/FOCUS_2006_datasets.html @@ -0,0 +1,130 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>FOCUS_2006_datasets. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Data taken from FOCUS (2006), p. 258.</p> +     + +    <pre><span class='no'>FOCUS_2006_datasets</span></pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>6 datasets with observations on the following variables. +  <dl class='dl-horizontal'> +    <dt><code>name</code></dt><dd>a factor containing the name of the observed variable</dd> +    <dt><code>time</code></dt><dd>a numeric vector containing time points</dd> +    <dt><code>value</code></dt><dd>a numeric vector containing concentrations in percent of applied radioactivity</dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>FOCUS_2006_C</span></div><div class='output co'>#>     name time value +#> 1 parent    0  85.1 +#> 2 parent    1  57.9 +#> 3 parent    3  29.9 +#> 4 parent    7  14.6 +#> 5 parent   14   9.7 +#> 6 parent   28   6.6 +#> 7 parent   63   4.0 +#> 8 parent   91   3.9 +#> 9 parent  119   0.6 +#> </div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html new file mode 100644 index 00000000..912cf414 --- /dev/null +++ b/docs/reference/FOMC.solution.html @@ -0,0 +1,147 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>FOMC.solution. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> First-Order Multi-Compartment kinetics </h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function describing exponential decline from a defined starting value, with  +  a decreasing rate constant.</p> + +    <p>The form given here differs slightly from the original reference by Gustafson +  and Holden (1990). The parameter <code>beta</code> corresponds to 1/beta in the +  original equation.</p> +     + +    <pre><span class='fu'>FOMC.solution</span>(<span class='no'>t</span>, <span class='no'>parent.0</span>, <span class='no'>alpha</span>, <span class='no'>beta</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>t</dt> +      <dd> Time. </dd> +      <dt>parent.0</dt> +      <dd> Starting value for the response variable at time zero. </dd> +      <dt>alpha</dt> +      <dd>  +    Shape parameter determined by coefficient of variation of rate constant +    values. </dd> +      <dt>beta</dt> +      <dd> +    Location parameter. +</dd> +    </dl> +     +    <div class="Note"> +      <h2>Note</h2> + +      <p>The solution of the FOMC kinetic model reduces to the +  <code>SFO.solution</code> for large values of <code>alpha</code> and +  <code>beta</code> with  +  \(k = \frac{\beta}{\alpha}\).</p> +    </div> + +    <div class="Value"> +      <h2>Value</h2> + +      <p>The value of the response variable at time <code>t</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +      <p>Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: A +  new model based on spatial variability. <em>Environmental Science and  +  Technology</em> <b>24</b>, 1032-1038</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='fu'>plot</span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>FOMC.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>10</span>, <span class='fl'>2</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><img src='unknown-2.png' alt='' width='540' height='400' /></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html new file mode 100644 index 00000000..994f8373 --- /dev/null +++ b/docs/reference/HS.solution.html @@ -0,0 +1,131 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>HS.solution. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> Hockey-Stick kinetics </h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function describing two exponential decline functions with a break point +  between them.</p> +     + +    <pre><span class='fu'>HS.solution</span>(<span class='no'>t</span>, <span class='no'>parent.0</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>tb</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>t</dt> +      <dd> Time. </dd> +      <dt>parent.0</dt> +      <dd> Starting value for the response variable at time zero. </dd> +      <dt>k1</dt> +      <dd> First kinetic constant. </dd> +      <dt>k2</dt> +      <dd> Second kinetic constant. </dd> +      <dt>tb</dt> +      <dd> Break point. Before this time, exponential decline according +    to <code>k1</code> is calculated, after this time, exponential decline proceeds +    according to <code>k2</code>. </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The value of the response variable at time <code>t</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='fu'>plot</span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>HS.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>2</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span><span class='kw'>=</span><span class='fu'>c</span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><img src='unknown-2.png' alt='' width='540' height='400' /></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html new file mode 100644 index 00000000..06f5c1ad --- /dev/null +++ b/docs/reference/IORE.solution.html @@ -0,0 +1,149 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>IORE.solution. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> Indeterminate order rate equation kinetics </h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function describing exponential decline from a defined starting value, with  +  a concentration dependent rate constant.</p> +     + +    <pre><span class='fu'>IORE.solution</span>(<span class='no'>t</span>, <span class='no'>parent.0</span>, <span class='no'>k__iore</span>, <span class='no'>N</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>t</dt> +      <dd> Time. </dd> +      <dt>parent.0</dt> +      <dd> Starting value for the response variable at time zero. </dd> +      <dt>k__iore</dt> +      <dd> Rate constant. Note that this depends on the concentration units used. </dd> +      <dt>N</dt> +      <dd> Exponent describing the nonlinearity of the rate equation </dd> +    </dl> +     +    <div class="Note"> +      <h2>Note</h2> + +      <p>The solution of the IORE kinetic model reduces to the +  <code>SFO.solution</code> if N = 1. +  The parameters of the IORE model can be transformed to equivalent parameters +  of the FOMC mode - see the NAFTA guidance for details.</p> +    </div> + +    <div class="Value"> +      <h2>Value</h2> + +      <p>The value of the response variable at time <code>t</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>NAFTA Technical Working Group on Pesticides (not dated) Guidance for +  Evaluating and Calculating Degradation Kinetics in Environmental  +  Media</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='fu'>plot</span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>IORE.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.2</span>, <span class='fl'>1.3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, +                                       <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><img src='unknown-2.png' alt='' width='540' height='400' /><div class='input'>  <span class='no'>fit.fomc</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +  <span class='no'>fit.iore</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +  <span class='no'>fit.iore.deS</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) + +  <span class='fu'>print</span>(<span class='fu'>data.frame</span>(<span class='fu'>coef</span>(<span class='no'>fit.fomc</span>), <span class='fu'>coef</span>(<span class='no'>fit.iore</span>), <span class='fu'>coef</span>(<span class='no'>fit.iore.deS</span>), +                   <span class='kw'>row.names</span> <span class='kw'>=</span> <span class='fu'>paste</span>(<span class='st'>"model par"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>)))</div><div class='output co'>#>             coef.fit.fomc. coef.fit.iore. coef.fit.iore.deS. +#> model par 1    85.87489063      85.874891          85.874890 +#> model par 2     0.05192238      -4.826631          -4.826631 +#> model par 3     0.65096665       1.949403           1.949403 +#> </div><div class='input'>  <span class='fu'>print</span>(<span class='fu'>rbind</span>(<span class='kw'>fomc</span> <span class='kw'>=</span> <span class='fu'>endpoints</span>(<span class='no'>fit.fomc</span>)$<span class='no'>distimes</span>, <span class='kw'>iore</span> <span class='kw'>=</span> <span class='fu'>endpoints</span>(<span class='no'>fit.iore</span>)$<span class='no'>distimes</span>, +              <span class='kw'>iore.deS</span> <span class='kw'>=</span> <span class='fu'>endpoints</span>(<span class='no'>fit.iore</span>)$<span class='no'>distimes</span>))</div><div class='output co'>#>              DT50    DT90 DT50back +#> fomc     1.785233 15.1479 4.559973 +#> iore     1.785233 15.1479 4.559973 +#> iore.deS 1.785233 15.1479 4.559973 +#> </div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html new file mode 100644 index 00000000..9cf069d7 --- /dev/null +++ b/docs/reference/SFO.solution.html @@ -0,0 +1,124 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>SFO.solution. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> Single First-Order kinetics </h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function describing exponential decline from a defined starting value.</p> +     + +    <pre><span class='fu'>SFO.solution</span>(<span class='no'>t</span>, <span class='no'>parent.0</span>, <span class='no'>k</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>t</dt> +      <dd> Time. </dd> +      <dt>parent.0</dt> +      <dd> Starting value for the response variable at time zero. </dd> +      <dt>k</dt> +      <dd> Kinetic constant. </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The value of the response variable at time <code>t</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='co'>## Not run: plot(function(x) SFO.solution(x, 100, 3), 0, 2)</span></div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html new file mode 100644 index 00000000..57959f26 --- /dev/null +++ b/docs/reference/SFORB.solution.html @@ -0,0 +1,133 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>SFORB.solution. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> Single First-Order Reversible Binding kinetics </h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function describing the solution of the differential equations describing +  the kinetic model with first-order terms for a two-way transfer from a free +  to a bound fraction, and a first-order degradation term for the free +  fraction.  The initial condition is a defined amount in the free fraction and +  no substance in the bound fraction.</p> +     + +    <pre><span class='fu'>SFORB.solution</span>(<span class='no'>t</span>, <span class='no'>parent.0</span>, <span class='no'>k_12</span>, <span class='no'>k_21</span>, <span class='no'>k_1output</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>t</dt> +      <dd> Time. </dd> +      <dt>parent.0</dt> +      <dd> Starting value for the response variable at time zero. </dd> +      <dt>k_12</dt> +      <dd> Kinetic constant describing transfer from free to bound. </dd> +      <dt>k_21</dt> +      <dd> Kinetic constant describing transfer from bound to free. </dd> +      <dt>k_1output</dt> +      <dd> Kinetic constant describing degradation of the free fraction. </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The value of the response variable, which is the sum of free and bound  +  fractions at time <code>t</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='co'>## Not run: plot(function(x) SFORB.solution(x, 100, 0.5, 2, 3), 0, 2)</span></div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html new file mode 100644 index 00000000..cbc925ca --- /dev/null +++ b/docs/reference/add_err.html @@ -0,0 +1,196 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>add_err. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Normally distributed errors are added to data predicted for a specific +  degradation model using <code>mkinpredict</code>. The variance of the error +  may depend on the predicted value and is specified as a standard deviation.</p> +     + +    <pre><span class='fu'>add_err</span>(<span class='no'>prediction</span>, <span class='no'>sdfunc</span>, +          <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>LOD</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>reps</span> <span class='kw'>=</span> <span class='fl'>2</span>, +          <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>prediction</dt> +      <dd> +    A prediction from a kinetic model as produced by <code>mkinpredict</code>. +  </dd> +      <dt>sdfunc</dt> +      <dd> +    A function taking the predicted value as its only argument and returning +    a standard deviation that should be used for generating the random error +    terms for this value. +  </dd> +      <dt>n</dt> +      <dd> +    The number of datasets to be generated. +  </dd> +      <dt>LOD</dt> +      <dd> +    The limit of detection (LOD). Values that are below the LOD after adding +    the random error will be set to NA. +  </dd> +      <dt>reps</dt> +      <dd> +    The number of replicates to be generated within the datasets. +  </dd> +      <dt>digits</dt> +      <dd> +    The number of digits to which the values will be rounded. +  </dd> +      <dt>seed</dt> +      <dd> +    The seed used for the generation of random numbers. If NA, the seed  +    is not set. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A list of datasets compatible with <code>mmkin</code>, i.e. +  the components of the list are datasets compatible with  +  <code>mkinfit</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>Ranke J and Lehmann R (2015) To t-test or not to t-test, that is the question. XV Symposium on Pesticide Chemistry 2-4 September 2015, Piacenza, Italy +  http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'># The kinetic model</span> +<span class='no'>m_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"M1"</span>), +                     <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'> +<span class='co'># Generate a prediction for a specific set of parameters</span> +<span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>) + +<span class='co'># This is the prediction used for the "Type 2 datasets" on the Piacenza poster</span> +<span class='co'># from 2015</span> +<span class='no'>d_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinpredict</span>(<span class='no'>m_SFO_SFO</span>, +                         <span class='fu'>c</span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, +                           <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fu'>log</span>(<span class='fl'>2</span>)/<span class='fl'>1000</span>), +                         <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>), +                         <span class='no'>sampling_times</span>) + +<span class='co'># Add an error term with a constant (independent of the value) standard deviation</span> +<span class='co'># of 10, and generate three datasets</span> +<span class='no'>d_SFO_SFO_err</span> <span class='kw'><-</span> <span class='fu'>add_err</span>(<span class='no'>d_SFO_SFO</span>, <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fl'>10</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456789</span> ) + +<span class='co'># Name the datasets for nicer plotting</span> +<span class='fu'>names</span>(<span class='no'>d_SFO_SFO_err</span>) <span class='kw'><-</span> <span class='fu'>paste</span>(<span class='st'>"Dataset"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>) + +<span class='co'># Name the model in the list of models (with only one member in this case)</span> +<span class='co'># for nicer plotting later on.</span> +<span class='co'># Be quiet and use the faster Levenberg-Marquardt algorithm, as the datasets</span> +<span class='co'># are easy and examples are run often. Use only one core not to offend CRAN</span> +<span class='co'># checks</span> +<span class='no'>f_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='fu'>list</span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>m_SFO_SFO</span>), +                   <span class='no'>d_SFO_SFO_err</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>, <span class='kw'>method.modFit</span> <span class='kw'>=</span> <span class='st'>"Marq"</span>) + +<span class='fu'>plot</span>(<span class='no'>f_SFO_SFO</span>)</div><img src='unknown-4.png' alt='' width='540' height='400' /><div class='input'> +<span class='co'># We would like to inspect the fit for dataset 3 more closely</span> +<span class='co'># Using double brackets makes the returned object an mkinfit object</span> +<span class='co'># instead of a list of mkinfit objects, so plot.mkinfit is used</span> +<span class='fu'>plot</span>(<span class='no'>f_SFO_SFO</span><span class='kw'>[[</span><span class='fl'>3</span>]], <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><img src='unknown-6.png' alt='' width='540' height='400' /><div class='input'> +<span class='co'># If we use single brackets, we should give two indices (model and dataset),</span> +<span class='co'># and plot.mmkin is used</span> +<span class='fu'>plot</span>(<span class='no'>f_SFO_SFO</span>[<span class='fl'>1</span>, <span class='fl'>3</span>])</div><img src='unknown-8.png' alt='' width='540' height='400' /><div class='input'> +</div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html new file mode 100644 index 00000000..8ceb39d9 --- /dev/null +++ b/docs/reference/endpoints.html @@ -0,0 +1,123 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>endpoints. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function calculates DT50 and DT90 values as well as formation fractions from kinetic models +fitted with mkinfit. If the SFORB model was specified for one of the parents or metabolites,  +the Eigenvalues are returned. These are equivalent to the rate constantes of the DFOP model, but  +with the advantage that the SFORB model can also be used for metabolites.</p> +     + +    <pre><span class='fu'>endpoints</span>(<span class='no'>fit</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>fit</dt> +      <dd> +  An object of class <code>mkinfit</code>. +  </dd> +    </dl> +     +    <div class="Note"> +      <h2>Note</h2> + +      <p>The function is used internally by <code>summary.mkinfit</code>.</p> +    </div> + +    <div class="Value"> +      <h2>Value</h2> + +      <p>A list with the components mentioned above.</p> +    </div> +      </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/geometric_mean.html b/docs/reference/geometric_mean.html new file mode 100644 index 00000000..1d9a9e66 --- /dev/null +++ b/docs/reference/geometric_mean.html @@ -0,0 +1,115 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>geometric_mean. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> Calculate the geometric mean </h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Function calculating the geometric mean of numeric vectors</p> +     + +    <pre><span class='fu'>geometric_mean</span>(<span class='no'>x</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd> A numeric vector </dd> +      <dt>na.rm</dt> +      <dd> Should NA values be ignored </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The geometric mean.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='fu'>geometric_mean</span>(<span class='fu'>c</span>(<span class='fl'>1</span>,<span class='fl'>3</span>, <span class='fl'>9</span>))</div><div class='output co'>#> [1] 3 +#> </div><div class='input'>  <span class='fu'>geometric_mean</span>(<span class='fu'>c</span>(<span class='fl'>1</span>,<span class='fl'>3</span>, <span class='fl'>NA</span>))</div><div class='output co'>#> [1] NA +#> </div><div class='input'>  <span class='fu'>geometric_mean</span>(<span class='fu'>c</span>(<span class='fl'>1</span>,<span class='fl'>3</span>, <span class='fl'>NA</span>), <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> [1] 1.732051 +#> </div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html new file mode 100644 index 00000000..355cbb78 --- /dev/null +++ b/docs/reference/ilr.html @@ -0,0 +1,152 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>ilr. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This implementation is a special case of the class of isometric log-ratio transformations.</p> +     + +    <pre><span class='fu'>ilr</span>(<span class='no'>x</span>) +  <span class='fu'>invilr</span>(<span class='no'>x</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd> +    A numeric vector. Naturally, the forward transformation is only sensible for +    vectors with all elements being greater than zero. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The result of the forward or backward transformation. The returned components always  +  sum to 1 for the case of the inverse log-ratio transformation.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>Peter Filzmoser, Karel Hron (2008) Outlier Detection for Compositional Data Using Robust Methods. Math Geosci 40 233-248</p> +    </div> + +    <div class="See also"> +      <h2>See also</h2> + +      <p>Another implementation can be found in R package <code>robCompositions</code>.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'># Order matters</span> +<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#> [1] -1.628174 -2.820079 +#> </div><div class='input'><span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#> [1] 1.628174 2.820079 +#> </div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span> +<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#> [1] 0 0 +#> </div><div class='input'><span class='co'># Almost equal entries give small numbers</span> +<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#> [1] -0.2034219  0.1174457 +#> </div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span> +<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> [1] 0.70 0.29 0.01 +#> </div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'>c</span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> [1] 0.70 0.29 0.01 +#> </div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span> +<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#> [1] 7.213536e-07 9.999993e-01 +#> </div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>c</span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#> [1] 7.207415e-07 9.991507e-01 8.486044e-04 +#> </div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span> +<span class='fu'>sum</span>(<span class='fu'>invilr</span>(<span class='fu'>c</span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#> [1] 1 +#> </div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span> +<span class='no'>a</span> <span class='kw'><-</span> <span class='fu'>c</span>(<span class='fl'>0.1</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>) +<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'>invilr</span>(<span class='no'>a</span>) +<span class='fu'>length</span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#> [1] 4 +#> </div><div class='input'><span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'>sum</span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#> [1] 0.1 0.3 0.5 +#> </div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  René Lehmann and Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 00000000..869f61dd --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,111 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>Function reference. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1>Function reference <small>version 0.9.44.9000</small></h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +    <div class="section "> +      <h2>Main functions</h2> +      <p class="section-desc"><p>Essential functionality</p></p> + +      <dl class="dl-horizontal"> +        <dt><a href="mkinfit.html">mkinfit</a></dt> +        <dd> +</dd> +        <dt><a href="mkinmod.html">mkinmod</a></dt> +        <dd> +</dd> +        <dt><a href="mmkin.html">mmkin</a></dt> +        <dd> +</dd> +      </dl> +    </div> +    <div class="section "> +      <h2>Show results</h2> +      <p class="section-desc"></p> + +      <dl class="dl-horizontal"> +      </dl> +    </div> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html new file mode 100644 index 00000000..edfce55a --- /dev/null +++ b/docs/reference/mccall81_245T.html @@ -0,0 +1,229 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mccall81_245T. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Time course of 2,4,5-trichlorophenoxyacetic acid, and the corresponding + 2,4,5-trichlorophenol and 2,4,5-trichloroanisole as recovered in diethylether + extracts.</p> +     + +    <pre><span class='no'>mccall81_245T</span></pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>A dataframe containing the following variables. +  <dl class='dl-horizontal'> +    <dt><code>name</code></dt><dd>the name of the compound observed. Note that T245 is used as  +                       an acronym for 2,4,5-T. T245 is a legitimate object name +                       in R, which is necessary for specifying models using +                       <code>mkinmod</code>.</dd>  +    <dt><code>time</code></dt><dd>a numeric vector containing sampling times in days after +                       treatment</dd> +    <dt><code>value</code></dt><dd>a numeric vector containing concentrations in percent of applied radioactivity</dd> +    <dt><code>soil</code></dt><dd>a factor containing the name of the soil</dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>McCall P, Vrona SA, Kelley SS (1981) Fate of uniformly carbon-14 ring labeled 2,4,5-Trichlorophenoxyacetic acid and 2,4-dichlorophenoxyacetic acid. J Agric Chem 29, 100-107 +  <a href = 'http://dx.doi.org/10.1021/jf00103a026'>http://dx.doi.org/10.1021/jf00103a026</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='no'>SFO_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"phenol"</span>), +                         <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"anisole"</span>), +                         <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'>  <span class='co'>## Not run: ------------------------------------</span> +<span class='co'>#     fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"))</span> +<span class='co'>#     summary(fit.1, data = FALSE)</span> +<span class='co'>#   </span> +<span class='co'>## ---------------------------------------------</span> +  <span class='co'># No covariance matrix and k_phenol_sink is really small, therefore fix it to zero</span> +  <span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'>subset</span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), +                 <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='kw'>k_phenol_sink</span> <span class='kw'>=</span> <span class='fl'>0</span>), +                 <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='st'>"k_phenol_sink"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +  <span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version:    0.9.44.9000  +#> R version:       3.3.1  +#> Date of fit:     Thu Oct  6 09:17:57 2016  +#> Date of summary: Thu Oct  6 09:17:57 2016  +#>  +#> Equations: +#> d_T245 = - k_T245_sink * T245 - k_T245_phenol * T245 +#> d_phenol = + k_T245_phenol * T245 - k_phenol_sink * phenol - +#>            k_phenol_anisole * phenol +#> d_anisole = + k_phenol_anisole * phenol - k_anisole_sink * anisole +#>  +#> Model predictions using solution type deSolve  +#>  +#> Fitted with method Port using 246 model solutions performed in 1.508 s +#>  +#> Weighting: none +#>  +#> Starting values for parameters to be optimised: +#>                     value   type +#> T245_0           100.9000  state +#> k_T245_sink        0.1000 deparm +#> k_T245_phenol      0.1001 deparm +#> k_phenol_anisole   0.1002 deparm +#> k_anisole_sink     0.1003 deparm +#>  +#> Starting values for the transformed parameters actually optimised: +#>                           value lower upper +#> T245_0               100.900000  -Inf   Inf +#> log_k_T245_sink       -2.302585  -Inf   Inf +#> log_k_T245_phenol     -2.301586  -Inf   Inf +#> log_k_phenol_anisole  -2.300587  -Inf   Inf +#> log_k_anisole_sink    -2.299590  -Inf   Inf +#>  +#> Fixed parameter values: +#>               value   type +#> phenol_0          0  state +#> anisole_0         0  state +#> k_phenol_sink     0 deparm +#>  +#> Optimised, transformed parameters with symmetric confidence intervals: +#>                      Estimate Std. Error  Lower    Upper +#> T245_0               103.9000    2.35200 98.930 108.8000 +#> log_k_T245_sink       -4.1130    0.13250 -4.390  -3.8350 +#> log_k_T245_phenol     -3.6120    0.05002 -3.716  -3.5070 +#> log_k_phenol_anisole  -0.9037    0.30580 -1.544  -0.2637 +#> log_k_anisole_sink    -5.0090    0.11180 -5.243  -4.7750 +#>  +#> Parameter correlation: +#>                        T245_0 log_k_T245_sink log_k_T245_phenol +#> T245_0                1.00000         0.63761           -0.1742 +#> log_k_T245_sink       0.63761         1.00000           -0.3831 +#> log_k_T245_phenol    -0.17416        -0.38313            1.0000 +#> log_k_phenol_anisole -0.05948         0.08745           -0.3047 +#> log_k_anisole_sink   -0.16208        -0.60469            0.5227 +#>                      log_k_phenol_anisole log_k_anisole_sink +#> T245_0                           -0.05948            -0.1621 +#> log_k_T245_sink                   0.08745            -0.6047 +#> log_k_T245_phenol                -0.30470             0.5227 +#> log_k_phenol_anisole              1.00000            -0.1774 +#> log_k_anisole_sink               -0.17744             1.0000 +#>  +#> Residual standard error: 2.706 on 19 degrees of freedom +#>  +#> Backtransformed parameters: +#> Confidence intervals for internally transformed parameters are asymmetric. +#> t-test (unrealistically) based on the assumption of normal distribution +#> for estimators of untransformed parameters. +#>                   Estimate t value    Pr(>t)     Lower     Upper +#> T245_0           1.039e+02  44.160 6.462e-21 98.930000 108.80000 +#> k_T245_sink      1.636e-02   7.545 1.978e-07  0.012400   0.02159 +#> k_T245_phenol    2.701e-02  19.990 1.607e-14  0.024320   0.02999 +#> k_phenol_anisole 4.051e-01   3.270 2.014e-03  0.213600   0.76820 +#> k_anisole_sink   6.679e-03   8.942 1.544e-08  0.005285   0.00844 +#>  +#> Chi2 error levels in percent: +#>          err.min n.optim df +#> All data   9.831       5 17 +#> T245       7.908       3  5 +#> phenol    99.808       1  6 +#> anisole    5.379       1  6 +#>  +#> Resulting formation fractions: +#>                    ff +#> T245_sink      0.3772 +#> T245_phenol    0.6228 +#> phenol_anisole 1.0000 +#> phenol_sink    0.0000 +#> anisole_sink   1.0000 +#>  +#> Estimated disappearance times: +#>            DT50    DT90 +#> T245     15.982  53.091 +#> phenol    1.711   5.685 +#> anisole 103.784 344.763 +#> </div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkin_long_to_wide.html b/docs/reference/mkin_long_to_wide.html new file mode 100644 index 00000000..5b1a8353 --- /dev/null +++ b/docs/reference/mkin_long_to_wide.html @@ -0,0 +1,152 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkin_long_to_wide. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function takes a dataframe in the long form as required by <code>modCost</code>  +  and converts it into a dataframe with one independent variable and several  +  dependent variables as columns.</p> +     + +    <pre><span class='fu'>mkin_long_to_wide</span>(<span class='no'>long_data</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>, <span class='kw'>outtime</span> <span class='kw'>=</span> <span class='st'>"time"</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>long_data</dt> +      <dd> +  The dataframe must contain one variable called "time" with the time values specified by the  +  <code>time</code> argument, one column called "name" with the grouping of the observed values, and  +  finally one column of observed values called "value". +</dd> +      <dt>time</dt> +      <dd> +  The name of the time variable in the long input data. +</dd> +      <dt>outtime</dt> +      <dd> +  The name of the time variable in the wide output data. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>Dataframe in wide format.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='fu'>mkin_long_to_wide</span>(<span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#>    time parent    m1 +#> 1     0  99.46  0.00 +#> 2     0 102.04  0.00 +#> 3     1  93.50  4.84 +#> 4     1  92.50  5.64 +#> 5     3  63.23 12.91 +#> 6     3  68.99 12.96 +#> 7     7  52.32 22.97 +#> 8     7  55.13 24.47 +#> 9    14  27.27 41.69 +#> 10   14  26.64 33.21 +#> 11   21  11.50 44.37 +#> 12   21  11.64 46.44 +#> 13   35   2.85 41.22 +#> 14   35   2.91 37.95 +#> 15   50   0.69 41.19 +#> 16   50   0.63 40.01 +#> 17   75   0.05 40.09 +#> 18   75   0.06 33.85 +#> 19  100     NA 31.04 +#> 20  100     NA 33.13 +#> 21  120     NA 25.15 +#> 22  120     NA 33.31 +#> </div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkin_wide_to_long.html b/docs/reference/mkin_wide_to_long.html new file mode 100644 index 00000000..2a70ebbe --- /dev/null +++ b/docs/reference/mkin_wide_to_long.html @@ -0,0 +1,131 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkin_wide_to_long. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function simply takes a dataframe with one independent variable and several  +  dependent variable and converts it into the long form as required by <code>modCost</code>.</p> +     + +    <pre><span class='fu'>mkin_wide_to_long</span>(<span class='no'>wide_data</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"t"</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>wide_data</dt> +      <dd> +  The dataframe must contain one variable with the time values specified by the  +  <code>time</code> argument and usually more than one column of observed values. +</dd> +      <dt>time</dt> +      <dd> +  The name of the time variable. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>Dataframe in long format as needed for <code>modCost</code>.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>wide</span> <span class='kw'><-</span> <span class='fu'>data.frame</span>(<span class='kw'>t</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>1</span>,<span class='fl'>2</span>,<span class='fl'>3</span>), <span class='kw'>x</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>1</span>,<span class='fl'>4</span>,<span class='fl'>7</span>), <span class='kw'>y</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>3</span>,<span class='fl'>4</span>,<span class='fl'>5</span>)) +<span class='fu'>mkin_wide_to_long</span>(<span class='no'>wide</span>)</div><div class='output co'>#>   name time value +#> 1    x    1     1 +#> 2    x    2     4 +#> 3    x    3     7 +#> 4    y    1     3 +#> 5    y    2     4 +#> 6    y    3     5 +#> </div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html new file mode 100644 index 00000000..0b4341aa --- /dev/null +++ b/docs/reference/mkinds.html @@ -0,0 +1,120 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinds. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1>A dataset class for mkin</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>A dataset class for mkin</p> +     + +    <pre><span class='no'>mkinds</span></pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>An <code>R6Class</code> generator object.</p> +    </div> + +    <div class="Fields"> +      <h2>Fields</h2> + +      <p></p> +      <p><dl class='dl-horizontal'> +<dt><code>title</code></dt><dd>A full title for the dataset</dd></p> +      <p><dt><code>sampling</code></dt><dd>times The sampling times</dd></p> +      <p><dt><code>time_unit</code></dt><dd>The time unit</dd></p> +      <p><dt><code>observed</code></dt><dd>Names of the observed compounds</dd></p> +      <p><dt><code>unit</code></dt><dd>The unit of the observations</dd></p> +      <p><dt><code>replicates</code></dt><dd>The number of replicates</dd></p> +      <p><dt><code>data</code></dt><dd>A dataframe with at least the columns name, time and value +in order to be compatible with mkinfit</dd> +</dl></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>mds</span> <span class='kw'><-</span> <span class='no'>mkinds</span>$<span class='fu'>new</span>(<span class='st'>"FOCUS A"</span>, <span class='no'>FOCUS_2006_A</span>)</div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinerrmin.html b/docs/reference/mkinerrmin.html new file mode 100644 index 00000000..cd9faf1a --- /dev/null +++ b/docs/reference/mkinerrmin.html @@ -0,0 +1,150 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinerrmin. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function uses <code>optimize</code> in order to iteratively find the +smallest relative error still resulting in passing the chi-squared test +as defined in the FOCUS kinetics report from 2006.</p> +     + +    <pre><span class='fu'>mkinerrmin</span>(<span class='no'>fit</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.05</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>fit</dt> +      <dd> +    an object of class <code>mkinfit</code>. +  </dd> +      <dt>alpha</dt> +      <dd> +    The confidence level chosen for the chi-squared test. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A dataframe with the following components:</p> +      <p>The dataframe has one row for the total dataset and one further row for +  each observed state variable in the model.</p> +    </div> + +    <div class="Details"> +      <h2>Details</h2> + +      <p>This function is used internally by <code>summary.mkinfit</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>SFO_SFO</span> <span class='kw'>=</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), +                  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), +                  <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'> +<span class='no'>fit_FOCUS_D</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>round</span>(<span class='fu'>mkinerrmin</span>(<span class='no'>fit_FOCUS_D</span>), <span class='fl'>4</span>)</div><div class='output co'>#>          err.min n.optim df +#> All data  0.0640       4 15 +#> parent    0.0646       2  7 +#> m1        0.0469       2  8 +#> </div><div class='input'><span class='no'>fit_FOCUS_E</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_E</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>round</span>(<span class='fu'>mkinerrmin</span>(<span class='no'>fit_FOCUS_E</span>), <span class='fl'>4</span>)</div><div class='output co'>#>          err.min n.optim df +#> All data  0.1544       4 13 +#> parent    0.1659       2  7 +#> m1        0.1095       2  6 +#> </div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html new file mode 100644 index 00000000..d1441f8b --- /dev/null +++ b/docs/reference/mkinfit.html @@ -0,0 +1,531 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinfit. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function uses the Flexible Modelling Environment package +  <code>FME</code> to create a function calculating the model cost, i.e. the  +  deviation between the kinetic model and the observed data. This model cost is +  then minimised using the Port algorithm <code>nlminb</code>,  +  using the specified initial or fixed parameters and starting values. +  Per default, parameters in the kinetic models are internally transformed in order  +  to better satisfy the assumption of a normal distribution of their estimators. +  In each step of the optimsation, the kinetic model is solved using the +  function <code>mkinpredict</code>. The variance of the residuals for each +  observed variable can optionally be iteratively reweighted until convergence +  using the argument <code>reweight.method = "obs"</code>.</p> +     + +    <pre><span class='fu'>mkinfit</span>(<span class='no'>mkinmod</span>, <span class='no'>observed</span>, +  <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, +  <span class='kw'>state.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, +  <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>fixed_initials</span> <span class='kw'>=</span> <span class='fu'>names</span>(<span class='no'>mkinmod</span>$<span class='no'>diffs</span>)[-<span class='fl'>1</span>], +  <span class='kw'>from_max_mean</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, +  <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"auto"</span>, <span class='st'>"analytical"</span>, <span class='st'>"eigen"</span>, <span class='st'>"deSolve"</span>), +  <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, +  <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, +  <span class='kw'>method.modFit</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Port"</span>, <span class='st'>"Marq"</span>, <span class='st'>"SANN"</span>, <span class='st'>"Nelder-Mead"</span>, <span class='st'>"BFGS"</span>, <span class='st'>"CG"</span>, <span class='st'>"L-BFGS-B"</span>), +  <span class='kw'>maxit.modFit</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, +  <span class='kw'>control.modFit</span> <span class='kw'>=</span> <span class='fu'>list</span>(), +  <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, +  <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, +  <span class='kw'>plot</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>weight</span> <span class='kw'>=</span> <span class='st'>"none"</span>, +  <span class='kw'>scaleVar</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, +  <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-8</span>, <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, <span class='kw'>n.outtimes</span> <span class='kw'>=</span> <span class='fl'>100</span>, +  <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, +  <span class='kw'>reweight.tol</span> <span class='kw'>=</span> <span class='fl'>1e-8</span>, <span class='kw'>reweight.max.iter</span> <span class='kw'>=</span> <span class='fl'>10</span>, +  <span class='kw'>trace_parms</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>mkinmod</dt> +      <dd> +    A list of class <code>mkinmod</code>, containing the kinetic model to be +    fitted to the data, or one of the shorthand names ("SFO", "FOMC", "DFOP", +    "HS", "SFORB"). If a shorthand name is given, a parent only degradation +    model is generated for the variable with the highest value in +    <code>observed</code>. +  </dd> +      <dt>observed</dt> +      <dd> +    The observed data. It has to be in the long format as described in +    <code>modFit</code>, i.e. the first column called "name" must contain the +    name of the observed variable for each data point. The second column must +    contain the times of observation, named "time".  The third column must be +    named "value" and contain the observed values. Optionally, a further column +    can contain weights for each data point. Its name must be passed as a +    further argument named <code>err</code> which is then passed on to +    <code>modFit</code>. +  </dd> +      <dt>parms.ini</dt> +      <dd> +    A named vector of initial values for the parameters, including parameters +    to be optimised and potentially also fixed parameters as indicated by +    <code>fixed_parms</code>.  If set to "auto", initial values for rate constants +    are set to default values.  Using parameter names that are not in the model +    gives an error. + +    It is possible to only specify a subset of the parameters that the model +    needs. You can use the parameter lists "bparms.ode" from a previously +    fitted model, which contains the differential equation parameters from this +    model. This works nicely if the models are nested. An example is given +    below. +  </dd> +      <dt>state.ini</dt> +      <dd> +    A named vector of initial values for the state variables of the model. In +    case the observed variables are represented by more than one model +    variable, the names will differ from the names of the observed variables +    (see <code>map</code> component of <code>mkinmod</code>). The default is to set +    the initial value of the first model variable to the mean of the time zero +    values for the variable with the maximum observed value, and all others to 0. +    If this variable has no time zero observations, its initial value is set to 100. +  </dd> +      <dt>fixed_parms</dt> +      <dd> +    The names of parameters that should not be optimised but rather kept at the +    values specified in <code>parms.ini</code>. +  </dd> +      <dt>fixed_initials</dt> +      <dd> +    The names of model variables for which the initial state at time 0 should +    be excluded from the optimisation. Defaults to all state variables except +    for the first one. +  </dd> +      <dt>from_max_mean</dt> +      <dd> +    If this is set to TRUE, and the model has only one observed variable, then +    data before the time of the maximum observed value (after averaging for each +    sampling time) are discarded, and this time is subtracted from all +    remaining time values, so the time of the maximum observed mean value is +    the new time zero. +  </dd> +      <dt>solution_type</dt> +      <dd> +    If set to "eigen", the solution of the system of differential equations is +    based on the spectral decomposition of the coefficient matrix in cases that +    this is possible. If set to "deSolve", a numerical ode solver from package +    <code>deSolve</code> is used. If set to "analytical", an analytical +    solution of the model is used. This is only implemented for simple +    degradation experiments with only one state variable, i.e. with no +    metabolites. The default is "auto", which uses "analytical" if possible, +    otherwise "eigen" if the model can be expressed using eigenvalues and +    eigenvectors, and finally "deSolve" for the remaining models (time +    dependence of degradation rates and metabolites). This argument is passed +    on to the helper function <code>mkinpredict</code>. +  </dd> +      <dt>method.ode</dt> +      <dd> +    The solution method passed via <code>mkinpredict</code> to +    <code>ode</code> in case the solution type is "deSolve". The default +    "lsoda" is performant, but sometimes fails to converge. +  </dd> +      <dt>use_compiled</dt> +      <dd> +    If set to <code>FALSE</code>, no compiled version of the <code>mkinmod</code>  +    model is used, in the calls to <code>mkinpredict</code> even if +    a compiled verion is present.  +  </dd> +      <dt>method.modFit</dt> +      <dd> +    The optimisation method passed to <code>modFit</code>.   + +    In order to optimally deal with problems where local minima occur, the +    "Port" algorithm is now used per default as it is less prone to get trapped +    in local minima and depends less on starting values for parameters than +    the Levenberg Marquardt variant selected by "Marq".  However, "Port" needs +    more iterations. + +    The former default "Marq" is the Levenberg Marquardt algorithm +    <code>nls.lm</code> from the package <code>minpack.lm</code> and usually needs +    the least number of iterations. + +    The "Pseudo" algorithm is not included because it needs finite parameter bounds +    which are currently not supported. + +    The "Newton" algorithm is not included because its number of iterations +    can not be controlled by <code>control.modFit</code> and it does not appear +    to provide advantages over the other algorithms. +  </dd> +      <dt>maxit.modFit</dt> +      <dd> +    Maximum number of iterations in the optimisation. If not "auto", this will +    be passed to the method called by <code>modFit</code>, overriding  +    what may be specified in the next argument <code>control.modFit</code>. +  </dd> +      <dt>control.modFit</dt> +      <dd> +    Additional arguments passed to the optimisation method used by +    <code>modFit</code>.  +  </dd> +      <dt>transform_rates</dt> +      <dd> +    Boolean specifying if kinetic rate constants should be transformed in the +    model specification used in the fitting for better compliance with the +    assumption of normal distribution of the estimator. If TRUE, also  +    alpha and beta parameters of the FOMC model are log-transformed, as well  +    as k1 and k2 rate constants for the DFOP and HS models and the break point +    tb of the HS model. +    If FALSE, zero is used as a lower bound for the rates in the optimisation. +  </dd> +      <dt>transform_fractions</dt> +      <dd> +    Boolean specifying if formation fractions constants should be transformed in the +    model specification used in the fitting for better compliance with the +    assumption of normal distribution of the estimator. The default (TRUE) is  +    to do transformations. If TRUE, the g parameter of the DFOP and HS +    models are also transformed, as they can also be seen as compositional +    data. The transformation used for these transformations is the +    <code>ilr</code> transformation. +  </dd> +      <dt>plot</dt> +      <dd> +    Should the observed values and the numerical solutions be plotted at each +    stage of the optimisation? +  </dd> +      <dt>quiet</dt> +      <dd> +    Suppress printing out the current model cost after each improvement? +  </dd> +      <dt>err </dt> +      <dd>either <code>NULL</code>, or the name of the column with the +    <em>error</em> estimates, used to weigh the residuals (see details of +    <code>modCost</code>); if <code>NULL</code>, then the residuals are not weighed. +  </dd> +      <dt>weight</dt> +      <dd> +    only if <code>err</code>=<code>NULL</code>: how to weight the residuals, one of "none", +    "std", "mean", see details of <code>modCost</code>. +  </dd> +      <dt>scaleVar</dt> +      <dd> +    Will be passed to <code>modCost</code>. Default is not to scale Variables +    according to the number of observations. +  </dd> +      <dt>atol</dt> +      <dd> +    Absolute error tolerance, passed to <code>ode</code>. Default is 1e-8, +    lower than in <code>lsoda</code>. +  </dd> +      <dt>rtol</dt> +      <dd> +    Absolute error tolerance, passed to <code>ode</code>. Default is 1e-10, +    much lower than in <code>lsoda</code>. +  </dd> +      <dt>n.outtimes</dt> +      <dd> +    The length of the dataseries that is produced by the model prediction +    function <code>mkinpredict</code>. This impacts the accuracy of +    the numerical solver if that is used (see <code>solution_type</code> argument.  +    The default value is 100. +  </dd> +      <dt>reweight.method</dt> +      <dd> +    The method used for iteratively reweighting residuals, also known +    as iteratively reweighted least squares (IRLS). Default is NULL, +    the other method implemented is called "obs", meaning that each +    observed variable is assumed to have its own variance, this is  +    estimated from the fit and used for weighting the residuals +    in each iteration until convergence of this estimate up to  +    <code>reweight.tol</code> or up to the maximum number of iterations +    specified by <code>reweight.max.iter</code>. +  </dd> +      <dt>reweight.tol</dt> +      <dd> +    Tolerance for convergence criterion for the variance components +    in IRLS fits. +  </dd> +      <dt>reweight.max.iter</dt> +      <dd> +    Maximum iterations in IRLS fits. +  </dd> +      <dt>trace_parms</dt> +      <dd> +    Should a trace of the parameter values be listed? +  </dd> +      <dt>&#8230;</dt> +      <dd> +    Further arguments that will be passed to <code>modFit</code>.  +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A list with "mkinfit" and "modFit" in the class attribute.  +  A summary can be obtained by <code>summary.mkinfit</code>.</p> +    </div> + +    <div class="See also"> +      <h2>See also</h2> + +      <p>Plotting methods <code>plot.mkinfit</code> and +  <code>mkinparplot</code>.</p> +      <p>Fitting of several models to several datasets in a single call to  +  <code>mmkin</code>.</p> +    </div> + +    <div class="Note"> +      <h2>Note</h2> + +      <p>The implementation of iteratively reweighted least squares is inspired by the +  work of the KinGUII team at Bayer Crop Science (Walter Schmitt and Zhenglei +  Gao). A similar implemention can also be found in CAKE 2.0, which is the +  other GUI derivative of mkin, sponsored by Syngenta.</p> +    </div> + +    <div class="Note"> +      <h2>Note</h2> + +      <p>When using the "IORE" submodel for metabolites, fitting with  +  "transform_rates = TRUE" (the default) often leads to failures of the +  numerical ODE solver. In this situation it may help to switch off the +  internal rate transformation.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'># Use shorthand notation for parent only degradation</span> +<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</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'>summary</span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version:    0.9.44.9000  +#> R version:       3.3.1  +#> Date of fit:     Thu Oct  6 09:17:59 2016  +#> Date of summary: Thu Oct  6 09:17:59 2016  +#>  +#> Equations: +#> d_parent = - (alpha/beta) * 1/((time/beta) + 1) * parent +#>  +#> Model predictions using solution type analytical  +#>  +#> Fitted with method Port using 64 model solutions performed in 0.153 s +#>  +#> Weighting: none +#>  +#> Starting values for parameters to be optimised: +#>          value   type +#> parent_0  85.1  state +#> alpha      1.0 deparm +#> beta      10.0 deparm +#>  +#> Starting values for the transformed parameters actually optimised: +#>               value lower upper +#> parent_0  85.100000  -Inf   Inf +#> log_alpha  0.000000  -Inf   Inf +#> log_beta   2.302585  -Inf   Inf +#>  +#> Fixed parameter values: +#> None +#>  +#> Optimised, transformed parameters with symmetric confidence intervals: +#>           Estimate Std. Error    Lower   Upper +#> parent_0  85.87000     2.2460 80.38000 91.3700 +#> log_alpha  0.05192     0.1605 -0.34080  0.4446 +#> log_beta   0.65100     0.2801 -0.03452  1.3360 +#>  +#> Parameter correlation: +#>           parent_0 log_alpha log_beta +#> parent_0    1.0000   -0.2033  -0.3624 +#> log_alpha  -0.2033    1.0000   0.9547 +#> log_beta   -0.3624    0.9547   1.0000 +#>  +#> Residual standard error: 2.275 on 6 degrees of freedom +#>  +#> Backtransformed parameters: +#> Confidence intervals for internally transformed parameters are asymmetric. +#> t-test (unrealistically) based on the assumption of normal distribution +#> for estimators of untransformed parameters. +#>          Estimate t value    Pr(>t)   Lower  Upper +#> parent_0   85.870  38.230 1.069e-08 80.3800 91.370 +#> alpha       1.053   6.231 3.953e-04  0.7112  1.560 +#> beta        1.917   3.570 5.895e-03  0.9661  3.806 +#>  +#> Chi2 error levels in percent: +#>          err.min n.optim df +#> All data   6.657       3  6 +#> parent     6.657       3  6 +#>  +#> Estimated disappearance times: +#>         DT50  DT90 DT50back +#> parent 1.785 15.15     4.56 +#>  +#> Data: +#>  time variable observed predicted residual +#>     0   parent     85.1    85.875  -0.7749 +#>     1   parent     57.9    55.191   2.7091 +#>     3   parent     29.9    31.845  -1.9452 +#>     7   parent     14.6    17.012  -2.4124 +#>    14   parent      9.7     9.241   0.4590 +#>    28   parent      6.6     4.754   1.8460 +#>    63   parent      4.0     2.102   1.8977 +#>    91   parent      3.9     1.441   2.4590 +#>   119   parent      0.6     1.092  -0.4919 +#> </div><div class='input'> +<span class='co'># One parent compound, one metabolite, both single first order.</span> +<span class='co'># Use mkinsub for convenience in model formulation. Pathway to sink included per default.</span> +<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), +  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> +<span class='fu'>print</span>(<span class='fu'>system.time</span>(<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, +                           <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#>    user  system elapsed  +#>   1.252   1.176   0.914  +#> </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit</span>)</div><div class='output co'>#>          parent_0 log_k_parent_sink   log_k_parent_m1     log_k_m1_sink  +#>          99.59848          -3.03822          -2.98030          -5.24750  +#> </div><div class='input'><span class='fu'>endpoints</span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff +#> parent_sink   parent_m1     m1_sink  +#>    0.485524    0.514476    1.000000  +#>  +#> $SFORB +#> logical(0) +#>  +#> $distimes +#>              DT50      DT90 +#> parent   7.022929  23.32967 +#> m1     131.760712 437.69961 +#>  +#> </div><div class='input'><span class='co'>## Not run: ------------------------------------</span> +<span class='co'># # deSolve is slower when no C compiler (gcc) was available during model generation</span> +<span class='co'># print(system.time(fit.deSolve <- mkinfit(SFO_SFO, FOCUS_2006_D, </span> +<span class='co'>#                            solution_type = "deSolve")))</span> +<span class='co'># coef(fit.deSolve)</span> +<span class='co'># endpoints(fit.deSolve)</span> +<span class='co'>## ---------------------------------------------</span> + +<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC</span> +<span class='co'>## Not run: ------------------------------------</span> +<span class='co'># FOMC_SFO <- mkinmod(</span> +<span class='co'>#   parent = mkinsub("FOMC", "m1"),</span> +<span class='co'>#   m1 = mkinsub("SFO"))</span> +<span class='co'># # Fit the model to the FOCUS example dataset D using defaults</span> +<span class='co'># fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D)</span> +<span class='co'># # Use starting parameters from parent only FOMC fit</span> +<span class='co'># fit.FOMC = mkinfit("FOMC", FOCUS_2006_D, plot=TRUE)</span> +<span class='co'># fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, </span> +<span class='co'>#   parms.ini = fit.FOMC$bparms.ode, plot=TRUE)</span> +<span class='co'># </span> +<span class='co'># # Use stepwise fitting, using optimised parameters from parent only fit, SFORB</span> +<span class='co'># SFORB_SFO <- mkinmod(</span> +<span class='co'>#   parent = list(type = "SFORB", to = "m1", sink = TRUE),</span> +<span class='co'>#   m1 = list(type = "SFO"))</span> +<span class='co'># # Fit the model to the FOCUS example dataset D using defaults</span> +<span class='co'># fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D)</span> +<span class='co'># fit.SFORB_SFO.deSolve <- mkinfit(SFORB_SFO, FOCUS_2006_D, solution_type = "deSolve")</span> +<span class='co'># # Use starting parameters from parent only SFORB fit (not really needed in this case)</span> +<span class='co'># fit.SFORB = mkinfit("SFORB", FOCUS_2006_D)</span> +<span class='co'># fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.ode)</span> +<span class='co'>## ---------------------------------------------</span> + +<span class='co'>## Not run: ------------------------------------</span> +<span class='co'># # Weighted fits, including IRLS</span> +<span class='co'># SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"),</span> +<span class='co'>#                       m1 = mkinsub("SFO"), use_of_ff = "max")</span> +<span class='co'># f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D)</span> +<span class='co'># summary(f.noweight)</span> +<span class='co'># f.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, reweight.method = "obs")</span> +<span class='co'># summary(f.irls)</span> +<span class='co'># f.w.mean <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, weight = "mean")</span> +<span class='co'># summary(f.w.mean)</span> +<span class='co'># f.w.value <- mkinfit(SFO_SFO.ff, subset(FOCUS_2006_D, value != 0), err = "value")</span> +<span class='co'># summary(f.w.value)</span> +<span class='co'>## ---------------------------------------------</span> + +<span class='co'>## Not run: ------------------------------------</span> +<span class='co'># # Manual weighting</span> +<span class='co'># dw <- FOCUS_2006_D</span> +<span class='co'># errors <- c(parent = 2, m1 = 1)</span> +<span class='co'># dw$err.man <- errors[FOCUS_2006_D$name]</span> +<span class='co'># f.w.man <- mkinfit(SFO_SFO.ff, dw, err = "err.man")</span> +<span class='co'># summary(f.w.man)</span> +<span class='co'># f.w.man.irls <- mkinfit(SFO_SFO.ff, dw, err = "err.man",</span> +<span class='co'>#                        reweight.method = "obs")</span> +<span class='co'># summary(f.w.man.irls)</span> +<span class='co'>## ---------------------------------------------</span></div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html new file mode 100644 index 00000000..9dd8fca0 --- /dev/null +++ b/docs/reference/mkinmod.html @@ -0,0 +1,206 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinmod. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>The function usually takes several expressions, each assigning a compound name to  +  a list, specifying the kinetic model type and reaction or transfer to other +  observed compartments. Instead of specifying several expressions, a list +  of lists can be given in the speclist argument.</p> + +    <p>For the definition of model types and their parameters, the equations given +  in the FOCUS and NAFTA guidance documents are used.</p> +     + +    <pre><span class='fu'>mkinmod</span>(<span class='no'>...</span>, <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"min"</span>, <span class='kw'>speclist</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>...</dt> +      <dd> +    For each observed variable, a list has to be specified as an argument, containing +    at least a component <code>type</code>, specifying the type of kinetics to use +    for the variable. Currently, single first order kinetics "SFO",  +    indeterminate order rate equation kinetics "IORE", or +    single first order with reversible binding "SFORB" are implemented for all +    variables, while  +    "FOMC", "DFOP" and "HS" can additionally be chosen for the first +    variable which is assumed to be the source compartment. +    Additionally, each component of the list can include a character vector <code>to</code>, +    specifying names of variables to which a transfer is to be assumed in the +    model. +    If the argument <code>use_of_ff</code> is set to "min" (default) and the model for  +    the compartment is "SFO" or "SFORB", an additional component of the list +    can be "sink=FALSE" effectively fixing the flux to sink to zero. +  </dd> +      <dt>use_of_ff</dt> +      <dd> +    Specification of the use of formation fractions in the model equations and, if  +    applicable, the coefficient matrix. If "min", a minimum use of formation  +    fractions is made in order to avoid fitting the product of formation fractions  +    and rate constants. If "max", formation fractions are always used. +  </dd> +      <dt>speclist</dt> +      <dd> +    The specification of the observed variables and their submodel types and  +    pathways can be given as a single list using this argument. Default is NULL. +  </dd> +      <dt>quiet</dt> +      <dd> +    Should messages be suppressed? +  </dd> +      <dt>verbose</dt> +      <dd> +    If <code>TRUE</code>, passed to <code>cfunction</code> if applicable to give +    detailed information about the C function being built. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A list of class <code>mkinmod</code> for use with <code>mkinfit</code>, containing</p> +    </div> + +    <div class="Note"> +      <h2>Note</h2> + +      <p>The IORE submodel is not well tested (yet). When using this model for metabolites,  +  you may want to read the second note in the help page to  +  <code>mkinfit</code>.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +      <p>NAFTA Technical Working Group on Pesticides (not dated) Guidance for +  Evaluating and Calculating Degradation Kinetics in Environmental  +  Media</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'># Specify the SFO model (this is not needed any more, as we can now mkinfit("SFO", ...)</span> +<span class='no'>SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>)) + +<span class='co'># One parent compound, one metabolite, both single first order</span> +<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), +  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'> +<span class='co'>## Not run: ------------------------------------</span> +<span class='co'># # The above model used to be specified like this, before the advent of mkinsub()</span> +<span class='co'># SFO_SFO <- mkinmod(</span> +<span class='co'>#   parent = list(type = "SFO", to = "m1"),</span> +<span class='co'>#   m1 = list(type = "SFO"))</span> +<span class='co'># </span> +<span class='co'># # Show details of creating the C function</span> +<span class='co'># SFO_SFO <- mkinmod(</span> +<span class='co'>#   parent = mkinsub("SFO", "m1"),</span> +<span class='co'>#   m1 = mkinsub("SFO"), verbose = TRUE)</span> +<span class='co'># </span> +<span class='co'># # If we have several parallel metabolites </span> +<span class='co'># # (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span> +<span class='co'># m_synth_DFOP_par <- mkinmod(parent = mkinsub("DFOP", c("M1", "M2")),</span> +<span class='co'>#                            M1 = mkinsub("SFO"),</span> +<span class='co'>#                            M2 = mkinsub("SFO"),</span> +<span class='co'>#                            use_of_ff = "max", quiet = TRUE)</span> +<span class='co'># </span> +<span class='co'># fit_DFOP_par_c <- mkinfit(m_synth_DFOP_par, </span> +<span class='co'>#                           synthetic_data_for_UBA_2014[[12]]$data,</span> +<span class='co'>#                           quiet = TRUE)</span> +<span class='co'>## ---------------------------------------------</span></div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinparplot.html b/docs/reference/mkinparplot.html new file mode 100644 index 00000000..f2fae22d --- /dev/null +++ b/docs/reference/mkinparplot.html @@ -0,0 +1,122 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinparplot. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function plots the confidence intervals for the parameters +  fitted using <code>mkinfit</code>.</p> +     + +    <pre><span class='fu'>mkinparplot</span>(<span class='no'>object</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>object</dt> +      <dd> +    A fit represented in an <code>mkinfit</code> object. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>Nothing is returned by this function, as it is called for its side effect, namely to produce a plot.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>model</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"phenol"</span>), <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>), +  <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"anisole"</span>)), +  <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>model</span>, <span class='fu'>subset</span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>mkinparplot</span>(<span class='no'>fit</span>)</div><img src='unknown-4.png' alt='' width='540' height='400' /></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinplot.html b/docs/reference/mkinplot.html new file mode 100644 index 00000000..51ca3992 --- /dev/null +++ b/docs/reference/mkinplot.html @@ -0,0 +1,118 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinplot. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Deprecated function. It now only calls the plot method <code>plot.mkinfit</code>.</p> +     + +    <pre><span class='fu'>mkinplot</span>(<span class='no'>fit</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>fit</dt> +      <dd> +    an object of class <code>mkinfit</code>. +  </dd> +      <dt>&#8230;</dt> +      <dd> +   further arguments passed to <code>plot.mkinfit</code>. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The function is called for its side effect.</p> +    </div> +      </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html new file mode 100644 index 00000000..730792c1 --- /dev/null +++ b/docs/reference/mkinpredict.html @@ -0,0 +1,318 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinpredict. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function produces a time series for all the observed variables in a +  kinetic model as specified by <code>mkinmod</code>, using a specific set of +  kinetic parameters and initial values for the state variables.</p> +     + +    <pre><span class='fu'>mkinpredict</span>(<span class='no'>mkinmod</span>, <span class='no'>odeparms</span>, <span class='no'>odeini</span>, <span class='no'>outtimes</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, +              <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, +        <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>mkinmod</dt> +      <dd> +    A kinetic model as produced by <code>mkinmod</code>. +  </dd> +      <dt>odeparms</dt> +      <dd> +    A numeric vector specifying the parameters used in the kinetic model, which +    is generally defined as a set of ordinary differential equations. +  </dd> +      <dt>odeini</dt> +      <dd> +    A numeric vectory containing the initial values of the state variables of +    the model. Note that the state variables can differ from the observed +    variables, for example in the case of the SFORB model. +  </dd> +      <dt>outtimes</dt> +      <dd> +    A numeric vector specifying the time points for which model predictions +    should be generated. +  </dd> +      <dt>solution_type</dt> +      <dd> +    The method that should be used for producing the predictions. This should +    generally be "analytical" if there is only one observed variable, and +    usually "deSolve" in the case of several observed variables. The third +    possibility "eigen" is faster but not applicable to some models e.g. +    using FOMC for the parent compound. +  </dd> +      <dt>method.ode</dt> +      <dd> +    The solution method passed via <code>mkinpredict</code> to +    <code>ode</code> in case the solution type is "deSolve". The default +    "lsoda" is performant, but sometimes fails to converge. +  </dd> +      <dt>use_compiled</dt> +      <dd> +    If set to <code>FALSE</code>, no compiled version of the <code>mkinmod</code>  +    model is used, even if is present.  +  </dd> +      <dt>atol</dt> +      <dd> +    Absolute error tolerance, passed to <code>ode</code>. Default is 1e-8, +    lower than in <code>lsoda</code>. +  </dd> +      <dt>rtol</dt> +      <dd> +    Absolute error tolerance, passed to <code>ode</code>. Default is 1e-10, +    much lower than in <code>lsoda</code>. +  </dd> +      <dt>map_output</dt> +      <dd> +    Boolean to specify if the output should list values for the observed +    variables (default) or for all state variables (if set to FALSE).  +  </dd> +      <dt>&#8230;</dt> +      <dd> +    Further arguments passed to the ode solver in case such a solver is used. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A matrix in the same format as the output of <code>ode</code>.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='no'>SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>)) +  <span class='co'># Compare solution types</span> +  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)</div><div class='output co'>#>    time  degradinol +#> 1     0 100.0000000 +#> 2     1  74.0818221 +#> 3     2  54.8811636 +#> 4     3  40.6569660 +#> 5     4  30.1194212 +#> 6     5  22.3130160 +#> 7     6  16.5298888 +#> 8     7  12.2456428 +#> 9     8   9.0717953 +#> 10    9   6.7205513 +#> 11   10   4.9787068 +#> 12   11   3.6883167 +#> 13   12   2.7323722 +#> 14   13   2.0241911 +#> 15   14   1.4995577 +#> 16   15   1.1108997 +#> 17   16   0.8229747 +#> 18   17   0.6096747 +#> 19   18   0.4516581 +#> 20   19   0.3345965 +#> 21   20   0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)</div><div class='output co'>#>    time  degradinol +#> 1     0 100.0000000 +#> 2     1  74.0818221 +#> 3     2  54.8811636 +#> 4     3  40.6569660 +#> 5     4  30.1194212 +#> 6     5  22.3130160 +#> 7     6  16.5298888 +#> 8     7  12.2456428 +#> 9     8   9.0717953 +#> 10    9   6.7205513 +#> 11   10   4.9787068 +#> 12   11   3.6883167 +#> 13   12   2.7323722 +#> 14   13   2.0241911 +#> 15   14   1.4995577 +#> 16   15   1.1108996 +#> 17   16   0.8229747 +#> 18   17   0.6096747 +#> 19   18   0.4516581 +#> 20   19   0.3345965 +#> 21   20   0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#>    time  degradinol +#> 1     0 100.0000000 +#> 2     1  74.0818221 +#> 3     2  54.8811636 +#> 4     3  40.6569660 +#> 5     4  30.1194212 +#> 6     5  22.3130160 +#> 7     6  16.5298888 +#> 8     7  12.2456428 +#> 9     8   9.0717953 +#> 10    9   6.7205513 +#> 11   10   4.9787068 +#> 12   11   3.6883167 +#> 13   12   2.7323722 +#> 14   13   2.0241911 +#> 15   14   1.4995577 +#> 16   15   1.1108996 +#> 17   16   0.8229747 +#> 18   17   0.6096747 +#> 19   18   0.4516581 +#> 20   19   0.3345965 +#> 21   20   0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)</div><div class='output co'>#>    time  degradinol +#> 1     0 100.0000000 +#> 2     1  74.0818221 +#> 3     2  54.8811636 +#> 4     3  40.6569660 +#> 5     4  30.1194212 +#> 6     5  22.3130160 +#> 7     6  16.5298888 +#> 8     7  12.2456428 +#> 9     8   9.0717953 +#> 10    9   6.7205513 +#> 11   10   4.9787068 +#> 12   11   3.6883167 +#> 13   12   2.7323722 +#> 14   13   2.0241911 +#> 15   14   1.4995577 +#> 16   15   1.1108997 +#> 17   16   0.8229747 +#> 18   17   0.6096747 +#> 19   18   0.4516581 +#> 20   19   0.3345965 +#> 21   20   0.2478752 +#> </div><div class='input'> + +  <span class='co'># Compare integration methods to analytical solution</span> +  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#>    time degradinol +#> 21   20  0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#>    time degradinol +#> 21   20  0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"ode45"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#>    time degradinol +#> 21   20  0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, +              <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"rk4"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#>    time degradinol +#> 21   20  0.2480043 +#> </div><div class='input'> <span class='co'># rk4 is not as precise here</span> + +  <span class='co'># The number of output times used to make a lot of difference until the</span> +  <span class='co'># default for atol was adjusted</span> +  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), +              <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>))[<span class='fl'>201</span>,]</div><div class='output co'>#>     time degradinol +#> 201   20  0.2478752 +#> </div><div class='input'>  <span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'>c</span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), +              <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.01</span>))[<span class='fl'>2001</span>,]</div><div class='output co'>#>      time degradinol +#> 2001   20  0.2478752 +#> </div><div class='input'> +  <span class='co'># Check compiled model versions - they are faster than the eigenvalue based solutions!</span> +  <span class='no'>SFO_SFO</span> <span class='kw'>=</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), +                    <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'>  <span class='fu'>system.time</span>( +    <span class='fu'>print</span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), +                <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), +                <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#>     time   parent       m1 +#> 201   20 4.978707 27.46227 +#> </div><div class='output co'>#>    user  system elapsed  +#>   0.000   0.028   0.004  +#> </div><div class='input'>  <span class='fu'>system.time</span>( +    <span class='fu'>print</span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), +                <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), +                <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#>     time   parent       m1 +#> 201   20 4.978707 27.46227 +#> </div><div class='output co'>#>    user  system elapsed  +#>   0.016   0.004   0.002  +#> </div><div class='input'>  <span class='fu'>system.time</span>( +    <span class='fu'>print</span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), +                <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), +                <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#>     time   parent       m1 +#> 201   20 4.978707 27.46227 +#> </div><div class='output co'>#>    user  system elapsed  +#>   0.036   0.000   0.035  +#> </div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinresplot.html b/docs/reference/mkinresplot.html new file mode 100644 index 00000000..fb9ab40d --- /dev/null +++ b/docs/reference/mkinresplot.html @@ -0,0 +1,166 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinresplot. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function plots the residuals for the specified subset of the  +  observed variables from an mkinfit object. A combined plot of the fitted +  model and the residuals can be obtained using <code>plot.mkinfit</code> +  using the argument <code>show_residuals = TRUE</code>.</p> +     + +    <pre><span class='fu'>mkinresplot</span>(<span class='no'>object</span>, +    <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'>names</span>(<span class='no'>object</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>), +    <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>1.1</span> * <span class='fu'>max</span>(<span class='no'>object</span>$<span class='no'>data</span>$<span class='no'>time</span>)), +    <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Residual"</span>, +    <span class='kw'>maxabs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>object</dt> +      <dd> +    A fit represented in an <code>mkinfit</code> object. +</dd> +      <dt>obs_vars</dt> +      <dd> +    A character vector of names of the observed variables for which residuals +    should be plotted. Defaults to all observed variables in the model +</dd> +      <dt>xlim</dt> +      <dd> +    plot range in x direction. +  </dd> +      <dt>xlab</dt> +      <dd> +    Label for the x axis. Defaults to "Time [days]". +</dd> +      <dt>ylab</dt> +      <dd> +    Label for the y axis. Defaults to "Residual [% of applied radioactivity]". +</dd> +      <dt>maxabs</dt> +      <dd> +    Maximum absolute value of the residuals. This is used for the scaling of +    the y axis and defaults to "auto". +</dd> +      <dt>legend</dt> +      <dd> +    Should a legend be plotted? Defaults to "TRUE". +</dd> +      <dt>lpos</dt> +      <dd>  +    Where should the legend be placed? Default is "topright". Will be passed on to +		<code>legend</code>. </dd> +      <dt>&#8230;</dt> +      <dd> +   further arguments passed to <code>plot</code>. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>Nothing is returned by this function, as it is called for its side effect, namely to produce a plot.</p> +    </div> + +    <div class="See also"> +      <h2>See also</h2> + +      <p><code>mkinplot</code>, for a way to plot the data and the fitted lines of the + mkinfit object.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>model</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>mkinresplot</span>(<span class='no'>fit</span>, <span class='st'>"m1"</span>)</div><img src='unknown-4.png' alt='' width='540' height='400' /></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mkinsub.html b/docs/reference/mkinsub.html new file mode 100644 index 00000000..6b079c40 --- /dev/null +++ b/docs/reference/mkinsub.html @@ -0,0 +1,147 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mkinsub. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This is a convenience function to set up the lists used as arguments for  +  <code>mkinmod</code>.</p> +     + +    <pre><span class='fu'>mkinsub</span>(<span class='no'>submodel</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>submodel</dt> +      <dd> +    Character vector of length one to specify the submodel type. See  +    <code>mkinmod</code> for the list of allowed submodel names. +  </dd> +      <dt>to</dt> +      <dd> +    Vector of the names of the state variable to which a transformation  +    shall be included in the model. +  </dd> +      <dt>sink</dt> +      <dd> +    Should a pathway to sink be included in the model in addition to the  +    pathways to other state variables? +  </dd> +      <dt>full_name</dt> +      <dd> +    An optional name to be used e.g. for plotting fits performed with the model. +    You can use non-ASCII characters here, but then your R code will not be +    portable, <em>i.e.</em> may produce unintended plot results on other +    operating systems or system configurations. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A list for use with <code>mkinmod</code>.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'># One parent compound, one metabolite, both single first order.</span> +<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), +  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'> +<span class='co'># The same model using mkinsub</span> +<span class='no'>SFO_SFO.2</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), +  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'> +<span class='co'># Now supplying full names</span> +<span class='no'>SFO_SFO.2</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='st'>"Test compound"</span>), +  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html new file mode 100644 index 00000000..5b624893 --- /dev/null +++ b/docs/reference/mmkin.html @@ -0,0 +1,178 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>mmkin. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This function calls <code>mkinfit</code> on all combinations of models and datasets +  specified in its first two arguments.</p> +     + +    <pre><span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, +      <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'>round</span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>), <span class='kw'>cluster</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>models</dt> +      <dd> +    Either a character vector of shorthand names ("SFO", "FOMC", "DFOP", +    "HS", "SFORB"), or an optionally named list of <code>mkinmod</code> +    objects. +  </dd> +      <dt>datasets</dt> +      <dd> +    An optionally named list of datasets suitable as observed data for +    <code>mkinfit</code>. +  </dd> +      <dt>cores</dt> +      <dd> +    The number of cores to be used for multicore processing. This is only +    used when the <code>cluster</code> argument is <code>NULL</code>. +  </dd> +      <dt>cluster</dt> +      <dd> +    A cluster as returned by <code>makeCluster</code> to be used for parallel  +    execution. +  </dd> +      <dt>&#8230;</dt> +      <dd> +    Further arguments that will be passed to <code>mkinfit</code>.  +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A matrix of <code>mkinfit</code> objects that can be indexed using the model +  and dataset names as row and column indices.</p> +    </div> + +    <div class="See also"> +      <h2>See also</h2> + +      <p><code>[.mmkin</code> for subsetting, <code>plot.mmkin</code> for plotting.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'>## Not run: ------------------------------------</span> +<span class='co'># m_synth_SFO_lin <- mkinmod(parent = mkinsub("SFO", "M1"),</span> +<span class='co'>#                            M1 = mkinsub("SFO", "M2"),</span> +<span class='co'>#                            M2 = mkinsub("SFO"), use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># m_synth_FOMC_lin <- mkinmod(parent = mkinsub("FOMC", "M1"),</span> +<span class='co'>#                             M1 = mkinsub("SFO", "M2"),</span> +<span class='co'>#                             M2 = mkinsub("SFO"), use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># models <- list(SFO_lin = m_synth_SFO_lin, FOMC_lin = m_synth_FOMC_lin)</span> +<span class='co'># datasets <- lapply(synthetic_data_for_UBA_2014[1:3], function(x) x$data)</span> +<span class='co'># names(datasets) <- paste("Dataset", 1:3)</span> +<span class='co'># </span> +<span class='co'># time_default <- system.time(fits.0 <- mmkin(models, datasets))</span> +<span class='co'># time_1 <- system.time(fits.1 <- mmkin(models, datasets, cores = 1))</span> +<span class='co'># </span> +<span class='co'># time_default</span> +<span class='co'># time_1</span> +<span class='co'># </span> +<span class='co'># endpoints(fits[["SFO_lin", 2]])</span> +<span class='co'># </span> +<span class='co'># # Plot.mkinfit handles rows or columns of mmkin result objects</span> +<span class='co'># plot(fits.0[1, ])</span> +<span class='co'># plot(fits.0[1, ], obs_var = c("M1", "M2"))</span> +<span class='co'># plot(fits.0[, 1])</span> +<span class='co'># # Use double brackets to extract a single mkinfit object, which will be plotted</span> +<span class='co'># # by plot.mkinfit</span> +<span class='co'># plot(fits.0[[1, 1]], sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE)</span> +<span class='co'># # Plotting with mmkin (single brackets, extracting an mmkin object) does not</span> +<span class='co'># # allow to plot the observed variables separately</span> +<span class='co'># plot(fits.0[1, 1])</span> +<span class='co'>## ---------------------------------------------</span></div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html new file mode 100644 index 00000000..94aebf63 --- /dev/null +++ b/docs/reference/plot.mkinfit.html @@ -0,0 +1,231 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>plot.mkinfit. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Solves the differential equations with the optimised and fixed parameters +  from a previous successful call to <code>mkinfit</code> and plots  +  the observed data together with the solution of the fitted model.</p> +     + +    <pre># S3 method for mkinfit +plot(x, fit = x, +  obs_vars = names(fit$mkinmod$map), +  xlab = "Time", ylab = "Observed",  +  xlim = range(fit$data$time), +  ylim = "default", +  col_obs = 1:length(obs_vars), pch_obs = col_obs,  +  lty_obs = rep(1, length(obs_vars)), +  add = FALSE, legend = !add, +  show_residuals = FALSE, maxabs = "auto", +  sep_obs = FALSE, rel.height.middle = 0.9, +  lpos = "topright", inset = c(0.05, 0.05),  +  show_errmin = FALSE, errmin_digits = 3, …) +plot_sep(fit, sep_obs = TRUE,  show_residuals = TRUE, show_errmin = TRUE, …)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd> +    Alias for fit introduced for compatibility with the generic S3 method.   +  </dd> +      <dt>fit</dt> +      <dd> +    An object of class <code>mkinfit</code>. +  </dd> +      <dt>obs_vars</dt> +      <dd> +    A character vector of names of the observed variables for which the  +    data and the model should be plotted. Defauls to all observed variables +    in the model. +  </dd> +      <dt>xlab</dt> +      <dd> +    Label for the x axis. +  </dd> +      <dt>ylab</dt> +      <dd> +    Label for the y axis. +  </dd> +      <dt>xlim</dt> +      <dd> +    Plot range in x direction. +  </dd> +      <dt>ylim</dt> +      <dd> +    Plot range in y direction. +  </dd> +      <dt>col_obs</dt> +      <dd> +    Colors used for plotting the observed data and the corresponding model prediction lines. +  </dd> +      <dt>pch_obs</dt> +      <dd> +    Symbols to be used for plotting the data. +  </dd> +      <dt>lty_obs</dt> +      <dd> +    Line types to be used for the model predictions. +  </dd> +      <dt>add</dt> +      <dd> +    Should the plot be added to an existing plot? +  </dd> +      <dt>legend</dt> +      <dd> +    Should a legend be added to the plot? +  </dd> +      <dt>show_residuals</dt> +      <dd> +    Should residuals be shown? If only one plot of the fits is shown, the +    residual plot is in the lower third of the plot? Otherwise, i.e. if +    "sep_obs" is given, the residual plots will be located to the right of  +    the plots of the fitted curves. +  </dd> +      <dt>maxabs</dt> +      <dd> +    Maximum absolute value of the residuals. This is used for the scaling of +    the y axis and defaults to "auto". +  </dd> +      <dt>sep_obs</dt> +      <dd> +    Should the observed variables be shown in separate subplots? If yes, residual plots +    requested by "show_residuals" will be shown next to, not below the plot of the fits. +  </dd> +      <dt>rel.height.middle</dt> +      <dd> +    The relative height of the middle plot, if more than two rows of plots are shown. +  </dd> +      <dt>lpos</dt> +      <dd> +    Position(s) of the legend(s). Passed to <code>legend</code> as the first argument. +    If not length one, this should be of the same length as the obs_var argument. +  </dd> +      <dt>inset</dt> +      <dd> +    Passed to <code>legend</code> if applicable. +  </dd> +      <dt>show_errmin</dt> +      <dd> +    Should the FOCUS chi2 error value be shown in the upper margin of the plot? +  </dd> +      <dt>errmin_digits</dt> +      <dd> +    The number of significant digits for rounding the FOCUS chi2 error percentage. +  </dd> +      <dt>&#8230;</dt> +      <dd> +    Further arguments passed to <code>plot</code>. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The function is called for its side effect.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'># One parent compound, one metabolite, both single first order, path from</span> +<span class='co'># parent to sink included, use Levenberg-Marquardt for speed</span> +<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Parent"</span>), +                   <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span> ))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>method.modFit</span> <span class='kw'>=</span> <span class='st'>"Marq"</span>) +<span class='fu'>plot</span>(<span class='no'>fit</span>)</div><img src='unknown-4.png' alt='' width='540' height='400' /><div class='input'><span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><img src='unknown-6.png' alt='' width='540' height='400' /><div class='input'> +<span class='co'># Show the observed variables separately</span> +<span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><img src='unknown-8.png' alt='' width='540' height='400' /><div class='input'> +<span class='co'># Show the observed variables separately, with residuals</span> +<span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>), +     <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><img src='unknown-10.png' alt='' width='540' height='400' /><div class='input'> +<span class='co'># The same can be obtained with less typing, using the convenience function plot_sep</span> +<span class='fu'>plot_sep</span>(<span class='no'>fit</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html new file mode 100644 index 00000000..358da679 --- /dev/null +++ b/docs/reference/plot.mmkin.html @@ -0,0 +1,156 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>plot.mmkin. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>When x is a row selected from an mmkin object (<code>[.mmkin</code>), the same model +  fitted for at least one dataset is shown. When it is a column, the fit of at least one model  +  to the same dataset is shown.</p> +     + +    <pre><span class='co'># S3 method for mmkin</span> +<span class='fu'>plot</span>(<span class='no'>x</span>, <span class='kw'>main</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, <span class='kw'>legends</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>errmin_var</span> <span class='kw'>=</span> <span class='st'>"All data"</span>, <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, +              <span class='kw'>cex</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd> +    An object of class <code>mmkin</code>, with either one row or one column. +</dd> +      <dt>main</dt> +      <dd> +    The main title placed on the outer margin of the plot. +</dd> +      <dt>legends</dt> +      <dd> +    An index for the fits for which legends should be shown. +</dd> +      <dt>errmin_var</dt> +      <dd> +    The variable for which the FOCUS chi2 error value should be shown. +</dd> +      <dt>errmin_digits</dt> +      <dd> +    The number of significant digits for rounding the FOCUS chi2 error percentage. +</dd> +      <dt>cex</dt> +      <dd> +    Passed to the plot functions and <code>mtext</code>. +</dd> +      <dt>rel.height.middle</dt> +      <dd> +    The relative height of the middle plot, if more than two rows of plots are shown. +</dd> +      <dt>&#8230;</dt> +      <dd> +    Further arguments passed to <code>plot.mkinfit</code> and <code>mkinresplot</code>. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The function is called for its side effect.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='co'># Only use one core not to offend CRAN checks, use Levenberg-Marquardt for speed</span> +  <span class='no'>fits</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='fu'>c</span>(<span class='st'>"FOMC"</span>, <span class='st'>"HS"</span>), <span class='fu'>list</span>(<span class='st'>"FOCUS B"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_B</span>, <span class='st'>"FOCUS C"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</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>, <span class='kw'>method.modFit</span> <span class='kw'>=</span> <span class='st'>"Marq"</span>) +  <span class='fu'>plot</span>(<span class='no'>fits</span>[, <span class='st'>"FOCUS C"</span>])</div><img src='unknown-2.png' alt='' width='540' height='400' /><div class='input'>  <span class='fu'>plot</span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ])</div><img src='unknown-4.png' alt='' width='540' height='400' /><div class='input'> +  <span class='co'># We can also plot a single fit, if we like the way mmkin works, but then the plot </span> +  <span class='co'># height should be smaller than the plot width (this is not possible for the html pages</span> +  <span class='co'># generated by staticdocs, as far as I know).</span> +  <span class='fu'>plot</span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, <span class='st'>"FOCUS C"</span>]) <span class='co'># same as plot(fits[1, 2])</span></div><img src='unknown-6.png' alt='' width='540' height='400' /></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/print.mkinds.html b/docs/reference/print.mkinds.html new file mode 100644 index 00000000..dea5f75c --- /dev/null +++ b/docs/reference/print.mkinds.html @@ -0,0 +1,109 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>print.mkinds. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Print mkinds objects.</p> +     + +    <pre><span class='co'># S3 method for mkinds</span> +<span class='fu'>print</span>(<span class='no'>x</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd> +    An <code>mkinds</code> object. +  </dd> +      <dt>&#8230;</dt> +      <dd> +    Not used. +  </dd> +    </dl> +          </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/print.mkinmod.html b/docs/reference/print.mkinmod.html new file mode 100644 index 00000000..38663f8f --- /dev/null +++ b/docs/reference/print.mkinmod.html @@ -0,0 +1,109 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>print.mkinmod. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Print mkinmod objects in a way that the user finds his way to get to its components.</p> +     + +    <pre><span class='co'># S3 method for mkinmod</span> +<span class='fu'>print</span>(<span class='no'>x</span>, <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>x</dt> +      <dd> +    An <code>mkinmod</code> object. +  </dd> +      <dt>&#8230;</dt> +      <dd> +    Not used. +  </dd> +    </dl> +          </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/schaefer07_complex_case.html b/docs/reference/schaefer07_complex_case.html new file mode 100644 index 00000000..12776c74 --- /dev/null +++ b/docs/reference/schaefer07_complex_case.html @@ -0,0 +1,131 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>schaefer07_complex_case. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>This dataset was used for a comparison of KinGUI and ModelMaker to check the +  software quality of KinGUI in the original publication (Schäfer et al., 2007). +  The results from the fitting are also included.</p> +     + +    <pre><span class='fu'>data</span>(<span class='no'>schaefer07_complex_case</span>)</pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>The data set is a data frame with 8 observations on the following 6 variables. +  <dl class='dl-horizontal'> +    <dt><code>time</code></dt><dd>a numeric vector</dd> +    <dt><code>parent</code></dt><dd>a numeric vector</dd> +    <dt><code>A1</code></dt><dd>a numeric vector</dd> +    <dt><code>B1</code></dt><dd>a numeric vector</dd> +    <dt><code>C1</code></dt><dd>a numeric vector</dd> +    <dt><code>A2</code></dt><dd>a numeric vector</dd> +  </dl></p> +      <p>The results are a data frame with 14 results for different parameter values</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>Schäfer D, Mikolasch B, Rainbird P and Harvey B (2007). KinGUI: a new kinetic +  software tool for evaluations according to FOCUS degradation kinetics. In: Del +  Re AAM, Capri E, Fragoulis G and Trevisan M (Eds.). Proceedings of the XIII +  Symposium Pesticide Chemistry, Piacenza, 2007, p. 916-923.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>data</span> <span class='kw'><-</span> <span class='fu'>mkin_wide_to_long</span>(<span class='no'>schaefer07_complex_case</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>) +<span class='no'>model</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"A1"</span>, <span class='st'>"B1"</span>, <span class='st'>"C1"</span>), <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>), +  <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A2"</span>), +  <span class='kw'>B1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), +  <span class='kw'>C1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), +  <span class='kw'>A2</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'><span class='co'>## Not run: mkinfit(model, data, plot=TRUE)</span></div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html new file mode 100644 index 00000000..e0cdfe23 --- /dev/null +++ b/docs/reference/summary.mkinfit.html @@ -0,0 +1,229 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>summary.mkinfit. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>Lists model equations, the summary as returned by <code>summary.modFit</code>, +  the chi2 error levels calculated according to FOCUS guidance (2006) as far +  as defined therein, and optionally the data, consisting of observed, predicted +  and residual values.</p> +     + +    <pre><span class='co'># S3 method for mkinfit</span> +<span class='fu'>summary</span>(<span class='no'>object</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>distimes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='no'>...</span>) +<span class='co'># S3 method for summary.mkinfit</span> +<span class='fu'>print</span>(<span class='no'>x</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fu'>max</span>(<span class='fl'>3</span>, <span class='fu'>getOption</span>(<span class='st'>"digits"</span>) - <span class='fl'>3</span>), <span class='no'>...</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>object</dt> +      <dd> +  an object of class <code>mkinfit</code>. +</dd> +      <dt>x</dt> +      <dd> +  an object of class <code>summary.mkinfit</code>. +</dd> +      <dt>data</dt> +      <dd> +  logical, indicating whether the data should be included in the summary.  +</dd> +      <dt>distimes</dt> +      <dd> +  logical, indicating whether DT50 and DT90 values should be included. +</dd> +      <dt>alpha</dt> +      <dd> +  error level for confidence interval estimation from t distribution +</dd> +      <dt>digits</dt> +      <dd> +  Number of digits to use for printing +</dd> +      <dt>&#8230;</dt> +      <dd> +  optional arguments passed to methods like <code>print</code>. +</dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>The summary function returns a list derived from +  <code>summary.modFit</code>, with components, among others</p> +      <p>The print method is called for its side effect, i.e. printing the summary.</p> +    </div> + +    <div class="References"> +      <h2>References</h2> + +      <p>FOCUS (2006) “Guidance Document on Estimating Persistence and +  Degradation Kinetics from Environmental Fate Studies on Pesticides in EU +  Registration” Report of the FOCUS Work Group on Degradation Kinetics, +  EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, +  <a href = 'http://focus.jrc.ec.europa.eu/dk'>http://focus.jrc.ec.europa.eu/dk</a></p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'>  <span class='fu'>summary</span>(<span class='fu'>mkinfit</span>(<span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> mkin version:    0.9.44.9000  +#> R version:       3.3.1  +#> Date of fit:     Thu Oct  6 09:18:07 2016  +#> Date of summary: Thu Oct  6 09:18:07 2016  +#>  +#> Equations: +#> d_parent = - k_parent_sink * parent +#>  +#> Model predictions using solution type analytical  +#>  +#> Fitted with method Port using 35 model solutions performed in 0.079 s +#>  +#> Weighting: none +#>  +#> Starting values for parameters to be optimised: +#>                value   type +#> parent_0      101.24  state +#> k_parent_sink   0.10 deparm +#>  +#> Starting values for the transformed parameters actually optimised: +#>                        value lower upper +#> parent_0          101.240000  -Inf   Inf +#> log_k_parent_sink  -2.302585  -Inf   Inf +#>  +#> Fixed parameter values: +#> None +#>  +#> Optimised, transformed parameters with symmetric confidence intervals: +#>                   Estimate Std. Error  Lower   Upper +#> parent_0           109.200     4.3910 98.410 119.900 +#> log_k_parent_sink   -3.291     0.1152 -3.573  -3.009 +#>  +#> Parameter correlation: +#>                   parent_0 log_k_parent_sink +#> parent_0             1.000             0.575 +#> log_k_parent_sink    0.575             1.000 +#>  +#> Residual standard error: 6.08 on 6 degrees of freedom +#>  +#> Backtransformed parameters: +#> Confidence intervals for internally transformed parameters are asymmetric. +#> t-test (unrealistically) based on the assumption of normal distribution +#> for estimators of untransformed parameters. +#>                Estimate t value    Pr(>t)    Lower     Upper +#> parent_0      109.20000  24.860 1.394e-07 98.41000 119.90000 +#> k_parent_sink   0.03722   8.679 6.457e-05  0.02807   0.04934 +#>  +#> Chi2 error levels in percent: +#>          err.min n.optim df +#> All data   8.385       2  6 +#> parent     8.385       2  6 +#>  +#> Resulting formation fractions: +#>             ff +#> parent_sink  1 +#>  +#> Estimated disappearance times: +#>         DT50  DT90 +#> parent 18.62 61.87 +#>  +#> Data: +#>  time variable observed predicted residual +#>     0   parent   101.24   109.153  -7.9132 +#>     3   parent    99.27    97.622   1.6484 +#>     7   parent    90.11    84.119   5.9913 +#>    14   parent    72.19    64.826   7.3641 +#>    30   parent    29.71    35.738  -6.0283 +#>    62   parent     5.98    10.862  -4.8818 +#>    90   parent     1.54     3.831  -2.2911 +#>   118   parent     0.39     1.351  -0.9613 +#> </div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/synthetic_data_for_UBA.html b/docs/reference/synthetic_data_for_UBA.html new file mode 100644 index 00000000..04550199 --- /dev/null +++ b/docs/reference/synthetic_data_for_UBA.html @@ -0,0 +1,157 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>synthetic_data_for_UBA_2014. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>The 12 datasets were generated using four different models and three different + variance components. The four models are either the SFO or the DFOP model with either + two sequential or two parallel metabolites.</p> + +    <p>Variance component 'a' is based on a normal distribution with standard deviation of 3, + Variance component 'b' is also based on a normal distribution, but with a standard deviation of 7. + Variance component 'c' is based on the error model from Rocke and Lorenzato (1995), with the  + minimum standard deviation (for small y values) of 0.5, and a proportionality constant of 0.07 + for the increase of the standard deviation with y.</p> + +    <p>Initial concentrations for metabolites and all values where adding the variance component resulted + in a value below the assumed limit of detection of 0.1 were set to <code>NA</code>.</p> + +    <p>As an example, the first dataset has the title <code>SFO_lin_a</code> and is based on the SFO model + with two sequential metabolites (linear pathway), with added variance component 'a'.</p> + +    <p>Compare also the code in the example section to see the degradation models.</p> +     + +    <pre><span class='no'>synthetic_data_for_UBA_2014</span></pre> +         +    <div class="Format"> +      <h2>Format</h2> + +      <p>A list containing datasets in the form internally used by the 'gmkin' package. +  The list has twelfe components. Each of the components is one dataset that has, +  among others, the following components +  <dl class='dl-horizontal'> +    <dt><code>title</code></dt><dd>The name of the dataset, e.g. <code>SFO_lin_a</code></dd> +    <dt><code>data</code></dt><dd>A data frame with the data in the form expected by <code>mkinfit</code></dd> +  </dl></p> +    </div> + +    <div class="Source"> +      <h2>Source</h2> + +      <p>Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative +  zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452</p> +      <p>Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for +  measurement error in analytical chemistry. Technometrics 37(2), 176-184.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='co'>## Not run: ------------------------------------</span> +<span class='co'># m_synth_SFO_lin <- mkinmod(parent = list(type = "SFO", to = "M1"),</span> +<span class='co'>#                            M1 = list(type = "SFO", to = "M2"),</span> +<span class='co'>#                            M2 = list(type = "SFO"), use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># </span> +<span class='co'># m_synth_SFO_par <- mkinmod(parent = list(type = "SFO", to = c("M1", "M2"),</span> +<span class='co'>#                                          sink = FALSE),</span> +<span class='co'>#                            M1 = list(type = "SFO"),</span> +<span class='co'>#                            M2 = list(type = "SFO"), use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># m_synth_DFOP_lin <- mkinmod(parent = list(type = "DFOP", to = "M1"),</span> +<span class='co'>#                             M1 = list(type = "SFO", to = "M2"),</span> +<span class='co'>#                             M2 = list(type = "SFO"), use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># m_synth_DFOP_par <- mkinmod(parent = list(type = "DFOP", to = c("M1", "M2"),</span> +<span class='co'>#                                           sink = FALSE),</span> +<span class='co'>#                             M1 = list(type = "SFO"),</span> +<span class='co'>#                             M2 = list(type = "SFO"), use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># mkinfit(m_synth_SFO_lin, synthetic_data_for_UBA_2014[[1]]$data)</span> +<span class='co'>## ---------------------------------------------</span></div></pre> +  </div> +  <div class="col-md-3"> +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html new file mode 100644 index 00000000..3b8be856 --- /dev/null +++ b/docs/reference/transform_odeparms.html @@ -0,0 +1,276 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> +  <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>transform_odeparms. mkin</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> + +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + +<!-- mathjax --> +<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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"> +      <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"> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +        <span class="icon-bar"></span> +      </button> +      <a class="navbar-brand" href="../index.html">mkin</a> +    </div> +    <div id="navbar" class="navbar-collapse collapse"> +      <ul class="nav navbar-nav"> +        <li> +  <a href="../index.html">Home</a> +</li> +<li> +  <a href="../reference/index.html">Reference</a> +</li> +      </ul> +      <ul class="nav navbar-nav navbar-right"> +        <li> +  <a href="https://github.com/jranke/mkin"> +    <span class="fa fa-github fa-lg"></span> +      +  </a> +</li> +      </ul> +    </div><!--/.nav-collapse --> +  </div><!--/.container --> +</div><!--/.navbar --> +       +      </header> + +      <div class="page-header"> +  <h1> +</h1> +</div> + +<div class="row"> +  <div class="col-md-9"> +     +    <p>The transformations are intended to map parameters that should only take  +  on restricted values to the full scale of real numbers. For kinetic rate +  constants and other paramters that can only take on positive values, a +  simple log transformation is used. For compositional parameters, such as +  the formations fractions that should always sum up to 1 and can not be +  negative, the <code>ilr</code> transformation is used.</p> + +    <p>The transformation of sets of formation fractions is fragile, as it supposes +  the same ordering of the components in forward and backward transformation. +  This is no problem for the internal use in <code>mkinfit</code>.</p> +     + +    <pre><span class='fu'>transform_odeparms</span>(<span class='no'>parms</span>, <span class='no'>mkinmod</span>, +                   <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>backtransform_odeparms</span>(<span class='no'>transparms</span>, <span class='no'>mkinmod</span>, +                       <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre> +     +    <h2>Arguments</h2> +    <dl class="dl-horizontal"> +      <dt>parms</dt> +      <dd> +    Parameters of kinetic models as used in the differential equations. +  </dd> +      <dt>transparms</dt> +      <dd> +    Transformed parameters of kinetic models as used in the fitting procedure. +  </dd> +      <dt>mkinmod</dt> +      <dd> +    The kinetic model of class <code>mkinmod</code>, containing the names of +    the model variables that are needed for grouping the formation fractions +    before <code>ilr</code> transformation, the parameter names and  +    the information if the pathway to sink is included in the model.  +  </dd> +      <dt>transform_rates</dt> +      <dd> +    Boolean specifying if kinetic rate constants should be transformed in the +    model specification used in the fitting for better compliance with the +    assumption of normal distribution of the estimator. If TRUE, also  +    alpha and beta parameters of the FOMC model are log-transformed, as well  +    as k1 and k2 rate constants for the DFOP and HS models and the break point tb +    of the HS model. +  </dd> +      <dt>transform_fractions</dt> +      <dd> +    Boolean specifying if formation fractions constants should be transformed in the +    model specification used in the fitting for better compliance with the +    assumption of normal distribution of the estimator. The default (TRUE) is  +    to do transformations. The g parameter of the DFOP and HS models are also  +    transformed, as they can also be seen as compositional data. The +    transformation used for these transformations is the <code>ilr</code> +    transformation. +  </dd> +    </dl> +     +    <div class="Value"> +      <h2>Value</h2> + +      <p>A vector of transformed or backtransformed parameters with the same names +  as the original parameters.</p> +    </div> +     +    <h2 id="examples">Examples</h2> +    <pre class="examples"><div class='input'><span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( +  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), +  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output'><strong class='text-info'>Successfully compiled differential equation model from auto-generated C code.</strong></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> +<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>summary</span>(<span class='no'>fit</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>) <span class='co'># See transformed and backtransformed parameters</span></div><div class='output co'>#> mkin version:    0.9.44.9000  +#> R version:       3.3.1  +#> Date of fit:     Thu Oct  6 09:18:08 2016  +#> Date of summary: Thu Oct  6 09:18:08 2016  +#>  +#> Equations: +#> d_parent = - k_parent_sink * parent - k_parent_m1 * parent +#> d_m1 = + k_parent_m1 * parent - k_m1_sink * m1 +#>  +#> Model predictions using solution type deSolve  +#>  +#> Fitted with method Port using 153 model solutions performed in 0.636 s +#>  +#> Weighting: none +#>  +#> Starting values for parameters to be optimised: +#>                  value   type +#> parent_0      100.7500  state +#> k_parent_sink   0.1000 deparm +#> k_parent_m1     0.1001 deparm +#> k_m1_sink       0.1002 deparm +#>  +#> Starting values for the transformed parameters actually optimised: +#>                        value lower upper +#> parent_0          100.750000  -Inf   Inf +#> log_k_parent_sink  -2.302585  -Inf   Inf +#> log_k_parent_m1    -2.301586  -Inf   Inf +#> log_k_m1_sink      -2.300587  -Inf   Inf +#>  +#> Fixed parameter values: +#>      value  type +#> m1_0     0 state +#>  +#> Optimised, transformed parameters with symmetric confidence intervals: +#>                   Estimate Std. Error  Lower   Upper +#> parent_0            99.600    1.61400 96.330 102.900 +#> log_k_parent_sink   -3.038    0.07826 -3.197  -2.879 +#> log_k_parent_m1     -2.980    0.04124 -3.064  -2.897 +#> log_k_m1_sink       -5.248    0.13610 -5.523  -4.972 +#>  +#> Parameter correlation: +#>                   parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> parent_0           1.00000            0.6075        -0.06625       -0.1701 +#> log_k_parent_sink  0.60752            1.0000        -0.08740       -0.6253 +#> log_k_parent_m1   -0.06625           -0.0874         1.00000        0.4716 +#> log_k_m1_sink     -0.17006           -0.6253         0.47163        1.0000 +#>  +#> Residual standard error: 3.211 on 36 degrees of freedom +#>  +#> Backtransformed parameters: +#> Confidence intervals for internally transformed parameters are asymmetric. +#> t-test (unrealistically) based on the assumption of normal distribution +#> for estimators of untransformed parameters. +#>                Estimate t value    Pr(>t)     Lower     Upper +#> parent_0      99.600000  61.720 2.024e-38 96.330000 1.029e+02 +#> k_parent_sink  0.047920  12.780 3.050e-15  0.040890 5.616e-02 +#> k_parent_m1    0.050780  24.250 3.407e-24  0.046700 5.521e-02 +#> k_m1_sink      0.005261   7.349 5.758e-09  0.003992 6.933e-03 +#>  +#> Chi2 error levels in percent: +#>          err.min n.optim df +#> All data   6.398       4 15 +#> parent     6.827       3  6 +#> m1         4.490       1  9 +#>  +#> Resulting formation fractions: +#>                 ff +#> parent_sink 0.4855 +#> parent_m1   0.5145 +#> m1_sink     1.0000 +#>  +#> Estimated disappearance times: +#>           DT50   DT90 +#> parent   7.023  23.33 +#> m1     131.761 437.70 +#> </div><div class='input'> +<span class='co'>## Not run: ------------------------------------</span> +<span class='co'># fit.2 <- mkinfit(SFO_SFO, FOCUS_2006_D, transform_rates = FALSE)</span> +<span class='co'># summary(fit.2, data=FALSE) </span> +<span class='co'>## ---------------------------------------------</span> + +<span class='no'>initials</span> <span class='kw'><-</span> <span class='no'>fit</span>$<span class='no'>start</span>$<span class='no'>value</span> +<span class='fu'>names</span>(<span class='no'>initials</span>) <span class='kw'><-</span> <span class='fu'>rownames</span>(<span class='no'>fit</span>$<span class='no'>start</span>) +<span class='no'>transformed</span> <span class='kw'><-</span> <span class='no'>fit</span>$<span class='no'>start_transformed</span>$<span class='no'>value</span> +<span class='fu'>names</span>(<span class='no'>transformed</span>) <span class='kw'><-</span> <span class='fu'>rownames</span>(<span class='no'>fit</span>$<span class='no'>start_transformed</span>) +<span class='fu'>transform_odeparms</span>(<span class='no'>initials</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#>          parent_0 log_k_parent_sink   log_k_parent_m1     log_k_m1_sink  +#>        100.750000         -2.302585         -2.301586         -2.300587  +#> </div><div class='input'><span class='fu'>backtransform_odeparms</span>(<span class='no'>transformed</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#>      parent_0 k_parent_sink   k_parent_m1     k_m1_sink  +#>      100.7500        0.1000        0.1001        0.1002  +#> </div><div class='input'> +<span class='co'>## Not run: ------------------------------------</span> +<span class='co'># # The case of formation fractions</span> +<span class='co'># SFO_SFO.ff <- mkinmod(</span> +<span class='co'>#   parent = list(type = "SFO", to = "m1", sink = TRUE),</span> +<span class='co'>#   m1 = list(type = "SFO"),</span> +<span class='co'>#   use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># fit.ff <- mkinfit(SFO_SFO.ff, FOCUS_2006_D)</span> +<span class='co'># summary(fit.ff, data = FALSE)</span> +<span class='co'># initials <- c("f_parent_to_m1" = 0.5)</span> +<span class='co'># transformed <- transform_odeparms(initials, SFO_SFO.ff)</span> +<span class='co'># backtransform_odeparms(transformed, SFO_SFO.ff)</span> +<span class='co'># </span> +<span class='co'># # And without sink</span> +<span class='co'># SFO_SFO.ff.2 <- mkinmod(</span> +<span class='co'>#   parent = list(type = "SFO", to = "m1", sink = FALSE),</span> +<span class='co'>#   m1 = list(type = "SFO"),</span> +<span class='co'>#   use_of_ff = "max")</span> +<span class='co'># </span> +<span class='co'># </span> +<span class='co'># fit.ff.2 <- mkinfit(SFO_SFO.ff.2, FOCUS_2006_D)</span> +<span class='co'># summary(fit.ff.2, data = FALSE)</span> +<span class='co'>## ---------------------------------------------</span></div></pre> +  </div> +  <div class="col-md-3"> +    <h2>Author</h2> +     +  Johannes Ranke + +  </div> +</div> + +      <footer> +      <p>Built by <a href="http://hadley.github.io/pkgdown/">pkgdown</a>. Styled with <a href="http://getbootstrap.com">Bootstrap 3</a>.</p> +      </footer> +   </div> + +  </body> +</html> diff --git a/docs/reference/unknown-10.png b/docs/reference/unknown-10.pngBinary files differ new file mode 100644 index 00000000..09bb687c --- /dev/null +++ b/docs/reference/unknown-10.png diff --git a/docs/reference/unknown-2.png b/docs/reference/unknown-2.pngBinary files differ new file mode 100644 index 00000000..a26e413f --- /dev/null +++ b/docs/reference/unknown-2.png diff --git a/docs/reference/unknown-4.png b/docs/reference/unknown-4.pngBinary files differ new file mode 100644 index 00000000..f23ed172 --- /dev/null +++ b/docs/reference/unknown-4.png diff --git a/docs/reference/unknown-6.png b/docs/reference/unknown-6.pngBinary files differ new file mode 100644 index 00000000..dc24d92f --- /dev/null +++ b/docs/reference/unknown-6.png diff --git a/docs/reference/unknown-8.png b/docs/reference/unknown-8.pngBinary files differ new file mode 100644 index 00000000..e4ab674a --- /dev/null +++ b/docs/reference/unknown-8.png | 
