diff options
Diffstat (limited to 'docs/reference/synthetic_data_for_UBA_2014.html')
-rw-r--r-- | docs/reference/synthetic_data_for_UBA_2014.html | 229 |
1 files changed, 119 insertions, 110 deletions
diff --git a/docs/reference/synthetic_data_for_UBA_2014.html b/docs/reference/synthetic_data_for_UBA_2014.html index 1444be76..af8bdcb2 100644 --- a/docs/reference/synthetic_data_for_UBA_2014.html +++ b/docs/reference/synthetic_data_for_UBA_2014.html @@ -87,7 +87,7 @@ Compare also the code in the example section to see the degradation models." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.0.0</span> </span> </div> @@ -124,6 +124,9 @@ Compare also the code in the example section to see the degradation models." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -132,8 +135,8 @@ Compare also the code in the example section to see the degradation models." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> - <span class="fab fa fab fa-github fa-lg"></span> + <a href="https://github.com/jranke/mkin/"> + <span class="fab fa-github fa-lg"></span> </a> </li> @@ -174,13 +177,13 @@ Compare also the code in the example section to see the degradation models." /> <p>Compare also the code in the example section to see the degradation models.</p> </div> - <pre class="usage"><span class='no'>synthetic_data_for_UBA_2014</span></pre> + <pre class="usage"><span class='va'>synthetic_data_for_UBA_2014</span></pre> <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> <p>A list containing twelve datasets as an R6 class defined by <code><a href='mkinds.html'>mkinds</a></code>, - each containing, among others, the following components</p><dl'> + each containing, among others, the following components</p><dl> <dt><code>title</code></dt><dd><p>The name of the dataset, e.g. <code>SFO_lin_a</code></p></dd> <dt><code>data</code></dt><dd><p>A data frame with the data in the form expected by <code><a href='mkinfit.html'>mkinfit</a></code></p></dd> @@ -196,55 +199,59 @@ Compare also the code in the example section to see the degradation models." /> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='co'># \dontrun{</span> <span class='co'># The data have been generated using the following kinetic models</span> -<span class='no'>m_synth_SFO_lin</span> <span class='kw'><-</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='https://rdrr.io/r/base/list.html'>list</a></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'><a href='https://rdrr.io/r/base/list.html'>list</a></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'>"M2"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></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 co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> - -<span class='no'>m_synth_SFO_par</span> <span class='kw'><-</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='https://rdrr.io/r/base/list.html'>list</a></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'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>), - <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></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 co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> -<span class='no'>m_synth_DFOP_lin</span> <span class='kw'><-</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='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"DFOP"</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'><a href='https://rdrr.io/r/base/list.html'>list</a></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'>"M2"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></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 co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> -<span class='no'>m_synth_DFOP_par</span> <span class='kw'><-</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='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"DFOP"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>), - <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></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 co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>m_synth_SFO_lin</span> <span class='op'><-</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='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"M1"</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"M2"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'> + +<span class='va'>m_synth_SFO_par</span> <span class='op'><-</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='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <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='st'>"M1"</span>, <span class='st'>"M2"</span><span class='op'>)</span>, + sink <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'> +<span class='va'>m_synth_DFOP_lin</span> <span class='op'><-</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='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"DFOP"</span>, to <span class='op'>=</span> <span class='st'>"M1"</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"M2"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'> +<span class='va'>m_synth_DFOP_par</span> <span class='op'><-</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='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"DFOP"</span>, to <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='st'>"M1"</span>, <span class='st'>"M2"</span><span class='op'>)</span>, + sink <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'> <span class='co'># The model predictions without intentional error were generated as follows</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'>d_synth_SFO_lin</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_SFO_lin</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.8</span>, - <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.3</span>, <span class='kw'>f_M1_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, - <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.02</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='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='no'>sampling_times</span>) - -<span class='no'>d_synth_DFOP_lin</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_DFOP_lin</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k1</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, <span class='kw'>k2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>, <span class='kw'>g</span> <span class='kw'>=</span> <span class='fl'>0.5</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='fl'>0.3</span>, - <span class='kw'>f_M1_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.02</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='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='no'>sampling_times</span>) - -<span class='no'>d_synth_SFO_par</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_SFO_par</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, - <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.8</span>, <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, - <span class='kw'>f_parent_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.02</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='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='no'>sampling_times</span>) - -<span class='no'>d_synth_DFOP_par</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_DFOP_par</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k1</span> <span class='kw'>=</span> <span class='fl'>0.3</span>, <span class='kw'>k2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>, <span class='kw'>g</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, - <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.6</span>, <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.04</span>, - <span class='kw'>f_parent_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.4</span>, <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.01</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='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='no'>sampling_times</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'>d_synth_SFO_lin</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_synth_SFO_lin</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.7</span>, f_parent_to_M1 <span class='op'>=</span> <span class='fl'>0.8</span>, + k_M1 <span class='op'>=</span> <span class='fl'>0.3</span>, f_M1_to_M2 <span class='op'>=</span> <span class='fl'>0.7</span>, + k_M2 <span class='op'>=</span> <span class='fl'>0.02</span><span class='op'>)</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>, M1 <span class='op'>=</span> <span class='fl'>0</span>, M2 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> + +<span class='va'>d_synth_DFOP_lin</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_synth_DFOP_lin</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k1 <span class='op'>=</span> <span class='fl'>0.2</span>, k2 <span class='op'>=</span> <span class='fl'>0.02</span>, g <span class='op'>=</span> <span class='fl'>0.5</span>, + f_parent_to_M1 <span class='op'>=</span> <span class='fl'>0.5</span>, k_M1 <span class='op'>=</span> <span class='fl'>0.3</span>, + f_M1_to_M2 <span class='op'>=</span> <span class='fl'>0.7</span>, k_M2 <span class='op'>=</span> <span class='fl'>0.02</span><span class='op'>)</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>, M1 <span class='op'>=</span> <span class='fl'>0</span>, M2 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> + +<span class='va'>d_synth_SFO_par</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_synth_SFO_par</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.2</span>, + f_parent_to_M1 <span class='op'>=</span> <span class='fl'>0.8</span>, k_M1 <span class='op'>=</span> <span class='fl'>0.01</span>, + f_parent_to_M2 <span class='op'>=</span> <span class='fl'>0.2</span>, k_M2 <span class='op'>=</span> <span class='fl'>0.02</span><span class='op'>)</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>, M1 <span class='op'>=</span> <span class='fl'>0</span>, M2 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> + +<span class='va'>d_synth_DFOP_par</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_synth_DFOP_par</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k1 <span class='op'>=</span> <span class='fl'>0.3</span>, k2 <span class='op'>=</span> <span class='fl'>0.02</span>, g <span class='op'>=</span> <span class='fl'>0.7</span>, + f_parent_to_M1 <span class='op'>=</span> <span class='fl'>0.6</span>, k_M1 <span class='op'>=</span> <span class='fl'>0.04</span>, + f_parent_to_M2 <span class='op'>=</span> <span class='fl'>0.4</span>, k_M2 <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</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>, M1 <span class='op'>=</span> <span class='fl'>0</span>, M2 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> <span class='co'># Construct names for datasets with errors</span> -<span class='no'>d_synth_names</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='st'>"d_synth_"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO_lin"</span>, <span class='st'>"SFO_par"</span>, - <span class='st'>"DFOP_lin"</span>, <span class='st'>"DFOP_par"</span>)) +<span class='va'>d_synth_names</span> <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'>"d_synth_"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO_lin"</span>, <span class='st'>"SFO_par"</span>, + <span class='st'>"DFOP_lin"</span>, <span class='st'>"DFOP_par"</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># Original function used or adding errors. The add_err function now published</span> <span class='co'># with this package is a slightly generalised version where the names of</span> @@ -265,33 +272,35 @@ Compare also the code in the example section to see the degradation models." /> <span class='co'># The following is the simplified version of the two-component model of Rocke</span> <span class='co'># and Lorenzato (1995)</span> -<span class='no'>sdfunc_twocomp</span> <span class='kw'>=</span> <span class='kw'>function</span>(<span class='no'>value</span>, <span class='no'>sd_low</span>, <span class='no'>rsd_high</span>) { - <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>sqrt</a></span>(<span class='no'>sd_low</span>^<span class='fl'>2</span> + <span class='no'>value</span>^<span class='fl'>2</span> * <span class='no'>rsd_high</span>^<span class='fl'>2</span>) -} +<span class='va'>sdfunc_twocomp</span> <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span>, <span class='va'>sd_low</span>, <span class='va'>rsd_high</span><span class='op'>)</span> <span class='op'>{</span> + <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>sqrt</a></span><span class='op'>(</span><span class='va'>sd_low</span><span class='op'>^</span><span class='fl'>2</span> <span class='op'>+</span> <span class='va'>value</span><span class='op'>^</span><span class='fl'>2</span> <span class='op'>*</span> <span class='va'>rsd_high</span><span class='op'>^</span><span class='fl'>2</span><span class='op'>)</span> +<span class='op'>}</span> <span class='co'># Add the errors.</span> -<span class='kw'>for</span> (<span class='no'>d_synth_name</span> <span class='kw'>in</span> <span class='no'>d_synth_names</span>) -{ - <span class='no'>d_synth</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/get.html'>get</a></span>(<span class='no'>d_synth_name</span>) - <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='no'>d_synth_name</span>, <span class='st'>"_a"</span>), <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_synth</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>3</span>)) - <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='no'>d_synth_name</span>, <span class='st'>"_b"</span>), <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_synth</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>7</span>)) - <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='no'>d_synth_name</span>, <span class='st'>"_c"</span>), <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_synth</span>, - <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fu'>sdfunc_twocomp</span>(<span class='no'>value</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span>))) +<span class='kw'>for</span> <span class='op'>(</span><span class='va'>d_synth_name</span> <span class='kw'>in</span> <span class='va'>d_synth_names</span><span class='op'>)</span> +<span class='op'>{</span> + <span class='va'>d_synth</span> <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/get.html'>get</a></span><span class='op'>(</span><span class='va'>d_synth_name</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span><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='va'>d_synth_name</span>, <span class='st'>"_a"</span><span class='op'>)</span>, <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_synth</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fl'>3</span><span class='op'>)</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span><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='va'>d_synth_name</span>, <span class='st'>"_b"</span><span class='op'>)</span>, <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_synth</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fl'>7</span><span class='op'>)</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span><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='va'>d_synth_name</span>, <span class='st'>"_c"</span><span class='op'>)</span>, <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_synth</span>, + <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fu'>sdfunc_twocomp</span><span class='op'>(</span><span class='va'>value</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span> -} +<span class='op'>}</span> -<span class='no'>d_synth_err_names</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>( - <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='no'>d_synth_names</span>, <span class='kw'>each</span> <span class='kw'>=</span> <span class='fl'>3</span>), <span class='no'>letters</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>"_"</span>) -) +<span class='va'>d_synth_err_names</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='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span><span class='op'>(</span><span class='va'>d_synth_names</span>, each <span class='op'>=</span> <span class='fl'>3</span><span class='op'>)</span>, <span class='va'>letters</span><span class='op'>[</span><span class='fl'>1</span><span class='op'>:</span><span class='fl'>3</span><span class='op'>]</span>, sep <span class='op'>=</span> <span class='st'>"_"</span><span class='op'>)</span> +<span class='op'>)</span> <span class='co'># This is just one example of an evaluation using the kinetic model used for</span> <span class='co'># the generation of the data</span> - <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_SFO_lin</span>, <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>1</span>]]$<span class='no'>data</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'>fit</span>)</div><div class='img'><img src='synthetic_data_for_UBA_2014-1.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'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 -#> R version used for fitting: 4.0.0 -#> Date of fit: Wed May 27 07:05:27 2020 -#> Date of summary: Wed May 27 07:05:27 2020 + <span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>m_synth_SFO_lin</span>, <span class='va'>synthetic_data_for_UBA_2014</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span><span class='op'>$</span><span class='va'>data</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'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='synthetic_data_for_UBA_2014-1.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'>fit</span><span class='op'>)</span> +</div><div class='output co'>#> mkin version used for fitting: 1.0.0 +#> R version used for fitting: 4.0.3 +#> Date of fit: Wed Feb 3 17:32:06 2021 +#> Date of summary: Wed Feb 3 17:32:06 2021 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -300,7 +309,7 @@ Compare also the code in the example section to see the degradation models." /> #> #> Model predictions using solution type deSolve #> -#> Fitted using 817 model solutions performed in 0.627 s +#> Fitted using 822 model solutions performed in 0.645 s #> #> Error model: Constant variance #> @@ -316,13 +325,13 @@ Compare also the code in the example section to see the degradation models." /> #> f_M1_to_M2 0.5000 deparm #> #> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 101.350000 -Inf Inf -#> log_k_parent -2.302585 -Inf Inf -#> log_k_M1 -2.301586 -Inf Inf -#> log_k_M2 -2.300587 -Inf Inf -#> f_parent_ilr_1 0.000000 -Inf Inf -#> f_M1_ilr_1 0.000000 -Inf Inf +#> value lower upper +#> parent_0 101.350000 -Inf Inf +#> log_k_parent -2.302585 -Inf Inf +#> log_k_M1 -2.301586 -Inf Inf +#> log_k_M2 -2.300587 -Inf Inf +#> f_parent_qlogis 0.000000 -Inf Inf +#> f_M1_qlogis 0.000000 -Inf Inf #> #> Fixed parameter values: #> value type @@ -335,32 +344,32 @@ Compare also the code in the example section to see the degradation models." /> #> 188.7274 200.3723 -87.36368 #> #> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 102.1000 1.57000 98.8600 105.3000 -#> log_k_parent -0.3020 0.03885 -0.3812 -0.2229 -#> log_k_M1 -1.2070 0.07123 -1.3520 -1.0620 -#> log_k_M2 -3.9010 0.06571 -4.0350 -3.7670 -#> f_parent_ilr_1 0.8492 0.16640 0.5103 1.1880 -#> f_M1_ilr_1 0.6780 0.17600 0.3196 1.0360 -#> sigma 2.2730 0.25740 1.7490 2.7970 +#> Estimate Std. Error Lower Upper +#> parent_0 102.1000 1.57000 98.8600 105.3000 +#> log_k_parent -0.3020 0.03885 -0.3812 -0.2229 +#> log_k_M1 -1.2070 0.07123 -1.3520 -1.0620 +#> log_k_M2 -3.9010 0.06571 -4.0350 -3.7670 +#> f_parent_qlogis 1.2010 0.23530 0.7216 1.6800 +#> f_M1_qlogis 0.9589 0.24890 0.4520 1.4660 +#> sigma 2.2730 0.25740 1.7490 2.7970 #> #> Parameter correlation: -#> parent_0 log_k_parent log_k_M1 log_k_M2 f_parent_ilr_1 -#> parent_0 1.000e+00 3.933e-01 -1.605e-01 2.819e-02 -4.624e-01 -#> log_k_parent 3.933e-01 1.000e+00 -4.082e-01 7.166e-02 -5.682e-01 -#> log_k_M1 -1.605e-01 -4.082e-01 1.000e+00 -3.929e-01 7.478e-01 -#> log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01 -#> f_parent_ilr_1 -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00 -#> f_M1_ilr_1 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01 -#> sigma -1.384e-07 -2.581e-07 9.499e-08 1.518e-07 1.236e-07 -#> f_M1_ilr_1 sigma -#> parent_0 1.614e-01 -1.384e-07 -#> log_k_parent 4.102e-01 -2.581e-07 -#> log_k_M1 -8.109e-01 9.499e-08 -#> log_k_M2 5.419e-01 1.518e-07 -#> f_parent_ilr_1 -8.605e-01 1.236e-07 -#> f_M1_ilr_1 1.000e+00 8.795e-09 -#> sigma 8.795e-09 1.000e+00 +#> parent_0 log_k_parent log_k_M1 log_k_M2 f_parent_qlogis +#> parent_0 1.000e+00 3.933e-01 -1.605e-01 2.819e-02 -4.624e-01 +#> log_k_parent 3.933e-01 1.000e+00 -4.082e-01 7.166e-02 -5.682e-01 +#> log_k_M1 -1.605e-01 -4.082e-01 1.000e+00 -3.929e-01 7.478e-01 +#> log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01 +#> f_parent_qlogis -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00 +#> f_M1_qlogis 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01 +#> sigma -7.941e-08 -9.143e-09 -1.268e-08 5.947e-08 5.657e-08 +#> f_M1_qlogis sigma +#> parent_0 1.614e-01 -7.941e-08 +#> log_k_parent 4.102e-01 -9.143e-09 +#> log_k_M1 -8.109e-01 -1.268e-08 +#> log_k_M2 5.419e-01 5.947e-08 +#> f_parent_qlogis -8.605e-01 5.657e-08 +#> f_M1_qlogis 1.000e+00 -2.382e-10 +#> sigma -2.382e-10 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -407,8 +416,8 @@ Compare also the code in the example section to see the degradation models." /> #> 7 parent 0.3 5.772e-01 -0.27717 #> 14 parent 3.5 3.264e-03 3.49674 #> 28 parent 3.2 1.045e-07 3.20000 -#> 90 parent 0.6 9.535e-10 0.60000 -#> 120 parent 3.5 -5.941e-10 3.50000 +#> 90 parent 0.6 9.532e-10 0.60000 +#> 120 parent 3.5 -5.940e-10 3.50000 #> 1 M1 36.4 3.479e+01 1.61088 #> 1 M1 37.4 3.479e+01 2.61088 #> 3 M1 34.3 3.937e+01 -5.07027 @@ -418,9 +427,9 @@ Compare also the code in the example section to see the degradation models." /> #> 14 M1 5.8 1.995e+00 3.80469 #> 14 M1 1.2 1.995e+00 -0.79531 #> 60 M1 0.5 2.111e-06 0.50000 -#> 90 M1 3.2 -9.676e-10 3.20000 -#> 120 M1 1.5 7.671e-10 1.50000 -#> 120 M1 0.6 7.671e-10 0.60000 +#> 90 M1 3.2 -9.671e-10 3.20000 +#> 120 M1 1.5 7.670e-10 1.50000 +#> 120 M1 0.6 7.670e-10 0.60000 #> 1 M2 4.8 4.455e+00 0.34517 #> 3 M2 20.9 2.153e+01 -0.62527 #> 3 M2 19.3 2.153e+01 -2.22527 @@ -435,7 +444,7 @@ Compare also the code in the example section to see the degradation models." /> #> 90 M2 10.6 1.013e+01 0.47130 #> 90 M2 10.8 1.013e+01 0.67130 #> 120 M2 9.8 5.521e+00 4.27893 -#> 120 M2 3.3 5.521e+00 -2.22107</div><div class='input'># } +#> 120 M2 3.3 5.521e+00 -2.22107</div><div class='input'><span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -452,7 +461,7 @@ Compare also the code in the example section to see the degradation models." /> </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> |