aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/reference/logistic.solution.html
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-19 15:41:24 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-19 15:41:24 +0100
commitdb9ae6a0c9cecb92048fde6f06af1da183c09b5f (patch)
treef0ea97545549c71bd7aa3d13afed422fd402f0e6 /docs/dev/reference/logistic.solution.html
parent6441a9f35d66f2c4d38c0036f99cd8f509d76f3b (diff)
Depend on parallel, doc improvements
By depending on parallel instead of importing it, functions to set up and stop a cluster are always available when mkin is loaded. The use of multicore processing in mmkin on Windows is now documented in the help file, which brings mkin closer to a version 1.0 #9.
Diffstat (limited to 'docs/dev/reference/logistic.solution.html')
-rw-r--r--docs/dev/reference/logistic.solution.html67
1 files changed, 38 insertions, 29 deletions
diff --git a/docs/dev/reference/logistic.solution.html b/docs/dev/reference/logistic.solution.html
index 248edcda..86be11a7 100644
--- a/docs/dev/reference/logistic.solution.html
+++ b/docs/dev/reference/logistic.solution.html
@@ -73,7 +73,7 @@ an increasing rate constant, supposedly caused by microbial growth" />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span>
</span>
</div>
@@ -121,7 +121,7 @@ an increasing rate constant, supposedly caused by microbial growth" />
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
- <a href="http://github.com/jranke/mkin/">
+ <a href="https://github.com/jranke/mkin/">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
@@ -140,7 +140,7 @@ an increasing rate constant, supposedly caused by microbial growth" />
<div class="col-md-9 contents">
<div class="page-header">
<h1>Logistic kinetics</h1>
- <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
<div class="hidden name"><code>logistic.solution.Rd</code></div>
</div>
@@ -149,7 +149,7 @@ an increasing rate constant, supposedly caused by microbial growth" />
an increasing rate constant, supposedly caused by microbial growth</p>
</div>
- <pre class="usage"><span class='fu'>logistic.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>kmax</span>, <span class='no'>k0</span>, <span class='no'>r</span>)</pre>
+ <pre class="usage"><span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>kmax</span>, <span class='va'>k0</span>, <span class='va'>r</span><span class='op'>)</span></pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@@ -208,30 +208,38 @@ Version 1.1, 18 December 2014
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'>
<span class='co'># Reproduce the plot on page 57 of FOCUS (2014)</span>
- <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.2</span>),
- <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</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'>"Residue"</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.4</span>),
- <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.8</span>),
- <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>3</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.001</span>, <span class='fl'>0.2</span>),
- <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>4</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>4</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.08</span>, <span class='fl'>0.2</span>),
- <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>5</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></span>(<span class='st'>"topright"</span>, <span class='kw'>inset</span> <span class='kw'>=</span> <span class='fl'>0.05</span>,
- <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='st'>"k0 = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.001</span>, <span class='fl'>0.08</span>),
- <span class='st'>", r = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.2</span>, <span class='fl'>0.4</span>, <span class='fl'>0.8</span>, <span class='fl'>0.2</span>, <span class='fl'>0.2</span>)),
- <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>5</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>5</span>)</div><div class='img'><img src='logistic.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.2</span><span class='op'>)</span>,
+ from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, ylim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>100</span><span class='op'>)</span>,
+ xlab <span class='op'>=</span> <span class='st'>"Time"</span>, ylab <span class='op'>=</span> <span class='st'>"Residue"</span><span class='op'>)</span>
+</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.4</span><span class='op'>)</span>,
+ from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>2</span>, col <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span>
+</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.8</span><span class='op'>)</span>,
+ from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>3</span>, col <span class='op'>=</span> <span class='fl'>3</span><span class='op'>)</span>
+</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.001</span>, <span class='fl'>0.2</span><span class='op'>)</span>,
+ from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>4</span>, col <span class='op'>=</span> <span class='fl'>4</span><span class='op'>)</span>
+</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.08</span>, <span class='fl'>0.2</span><span class='op'>)</span>,
+ from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>5</span>, col <span class='op'>=</span> <span class='fl'>5</span><span class='op'>)</span>
+</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></span><span class='op'>(</span><span class='st'>"topright"</span>, inset <span class='op'>=</span> <span class='fl'>0.05</span>,
+ legend <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span><span class='op'>(</span><span class='st'>"k0 = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.001</span>, <span class='fl'>0.08</span><span class='op'>)</span>,
+ <span class='st'>", r = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.2</span>, <span class='fl'>0.4</span>, <span class='fl'>0.8</span>, <span class='fl'>0.2</span>, <span class='fl'>0.2</span><span class='op'>)</span><span class='op'>)</span>,
+ lty <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fl'>5</span>, col <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fl'>5</span><span class='op'>)</span>
+</div><div class='img'><img src='logistic.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='co'># Fit with synthetic data</span>
- <span class='no'>logistic</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"logistic"</span>))
-
- <span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></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='no'>parms_logistic</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>kmax</span> <span class='kw'>=</span> <span class='fl'>0.08</span>, <span class='kw'>k0</span> <span class='kw'>=</span> <span class='fl'>0.0001</span>, <span class='kw'>r</span> <span class='kw'>=</span> <span class='fl'>0.2</span>)
- <span class='no'>d_logistic</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>logistic</span>,
- <span class='no'>parms_logistic</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>),
- <span class='no'>sampling_times</span>)
- <span class='no'>d_2_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_logistic</span>,
- <span class='kw'>sdfunc</span> <span class='kw'>=</span> <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='sigma_twocomp.html'>sigma_twocomp</a></span>(<span class='no'>x</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span>),
- <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>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'>5</span>, <span class='kw'>LOD</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>)<span class='kw'>[[</span><span class='fl'>1</span>]]
-
- <span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"logistic"</span>, <span class='no'>d_2_1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
- <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>m</span>)</div><div class='img'><img src='logistic.solution-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m</span>)$<span class='no'>bpar</span></div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower
+ <span class='va'>logistic</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"logistic"</span><span class='op'>)</span><span class='op'>)</span>
+
+ <span class='va'>sampling_times</span> <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</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='op'>)</span>
+ <span class='va'>parms_logistic</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>kmax <span class='op'>=</span> <span class='fl'>0.08</span>, k0 <span class='op'>=</span> <span class='fl'>0.0001</span>, r <span class='op'>=</span> <span class='fl'>0.2</span><span class='op'>)</span>
+ <span class='va'>d_logistic</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>logistic</span>,
+ <span class='va'>parms_logistic</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>,
+ <span class='va'>sampling_times</span><span class='op'>)</span>
+ <span class='va'>d_2_1</span> <span class='op'>&lt;-</span> <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_logistic</span>,
+ sdfunc <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='sigma_twocomp.html'>sigma_twocomp</a></span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span><span class='op'>)</span>,
+ n <span class='op'>=</span> <span class='fl'>1</span>, reps <span class='op'>=</span> <span class='fl'>2</span>, digits <span class='op'>=</span> <span class='fl'>5</span>, LOD <span class='op'>=</span> <span class='fl'>0.1</span>, seed <span class='op'>=</span> <span class='fl'>123456</span><span class='op'>)</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span>
+
+ <span class='va'>m</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"logistic"</span>, <span class='va'>d_2_1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+ <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span>
+</div><div class='img'><img src='logistic.solution-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span><span class='op'>$</span><span class='va'>bpar</span>
+</div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower
#&gt; parent_0 1.057896e+02 1.9023449703 55.610119 3.768361e-16 1.016451e+02
#&gt; kmax 6.398190e-02 0.0143201031 4.467978 3.841829e-04 3.929235e-02
#&gt; k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846688e-08
@@ -242,7 +250,8 @@ Version 1.1, 18 December 2014
#&gt; kmax 0.1041853
#&gt; k0 0.4448749
#&gt; r 1.1821120
-#&gt; sigma 7.3256566</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>m</span>)$<span class='no'>distimes</span></div><div class='output co'>#&gt; DT50 DT90 DT50_k0 DT50_kmax
+#&gt; sigma 7.3256566</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span><span class='op'>$</span><span class='va'>distimes</span>
+</div><div class='output co'>#&gt; DT50 DT90 DT50_k0 DT50_kmax
#&gt; parent 36.86533 62.41511 4297.853 10.83349</div><div class='input'>
</div></pre>
</div>
@@ -260,7 +269,7 @@ Version 1.1, 18 December 2014
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>
</footer>

Contact - Imprint