diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-05-08 20:57:48 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-05-08 20:57:48 +0200 |
commit | c6079a807e2b400fe0c772603392aeacd887da2f (patch) | |
tree | 5b590e06de87ce9cd5c776fccfabc8a629a10cad /docs/reference | |
parent | c322a8102a399cbb1fe38c4c4ca4485cea8bc4e8 (diff) |
Add functionality to plot the error model
by plotting squared residuals against predicted values, and
showing the variance function used in the fitted error model.
Rebuild docs
Diffstat (limited to 'docs/reference')
-rw-r--r-- | docs/reference/mkinerrplot-1.png | bin | 0 -> 35936 bytes | |||
-rw-r--r-- | docs/reference/mkinerrplot.html | 250 | ||||
-rw-r--r-- | docs/reference/mkinfit.html | 28 | ||||
-rw-r--r-- | docs/reference/mkinmod.html | 2 | ||||
-rw-r--r-- | docs/reference/mkinpredict.html | 6 | ||||
-rw-r--r-- | docs/reference/mmkin.html | 4 | ||||
-rw-r--r-- | docs/reference/plot.mkinfit-1.png | bin | 45182 -> 45207 bytes | |||
-rw-r--r-- | docs/reference/plot.mkinfit-2.png | bin | 52916 -> 52884 bytes | |||
-rw-r--r-- | docs/reference/plot.mkinfit-3.png | bin | 43718 -> 51737 bytes | |||
-rw-r--r-- | docs/reference/plot.mkinfit-4.png | bin | 59800 -> 43712 bytes | |||
-rw-r--r-- | docs/reference/plot.mkinfit-5.png | bin | 0 -> 59934 bytes | |||
-rw-r--r-- | docs/reference/plot.mkinfit-6.png | bin | 0 -> 65811 bytes | |||
-rw-r--r-- | docs/reference/plot.mkinfit.html | 29 | ||||
-rw-r--r-- | docs/reference/plot.mmkin-2.png | bin | 34829 -> 34725 bytes | |||
-rw-r--r-- | docs/reference/plot.mmkin-4.png | bin | 0 -> 37126 bytes | |||
-rw-r--r-- | docs/reference/plot.mmkin.html | 19 | ||||
-rw-r--r-- | docs/reference/summary.mkinfit.html | 6 |
17 files changed, 308 insertions, 36 deletions
diff --git a/docs/reference/mkinerrplot-1.png b/docs/reference/mkinerrplot-1.png Binary files differnew file mode 100644 index 00000000..9c663646 --- /dev/null +++ b/docs/reference/mkinerrplot-1.png diff --git a/docs/reference/mkinerrplot.html b/docs/reference/mkinerrplot.html new file mode 100644 index 00000000..66da40b5 --- /dev/null +++ b/docs/reference/mkinerrplot.html @@ -0,0 +1,250 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<title>Function to plot squared residuals and the error model for an mkin object — mkinerrplot • mkin</title> + +<!-- jquery --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> +<!-- Bootstrap --> + +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" /> +<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" /> + +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script> + +<!-- sticky kit --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script> + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../pkgdown.js"></script> + + + +<meta property="og:title" content="Function to plot squared residuals and the error model for an mkin object — mkinerrplot" /> + +<meta property="og:description" content="This function plots the squared residuals for the specified subset of the + observed variables from an mkinfit object. In addition, one or more + dashed line(s) show the fitted error model. + A combined plot of the fitted model and this error model plot can be + obtained with plot.mkinfit + using the argument show_errplot = TRUE." /> +<meta name="twitter:card" content="summary" /> + + + +<!-- mathjax --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script> + +<!--[if lt IE 9]> +<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> +<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> +<![endif]--> + + + </head> + + <body> + <div class="container template-reference-topic"> + <header> + <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <span class="navbar-brand"> + <a class="navbar-link" href="../index.html">mkin</a> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.49.4</span> + </span> + </div> + + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li> + <a href="../reference/index.html">Functions and data</a> +</li> +<li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> + Articles + + <span class="caret"></span> + </a> + <ul class="dropdown-menu" role="menu"> + <li> + <a href="../articles/mkin.html">Introduction to mkin</a> + </li> + <li> + <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a> + </li> + <li> + <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> + </li> + <li> + <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> + <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> + </li> + <li> + <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a> + </li> + <li> + <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> + </li> + </ul> +</li> +<li> + <a href="../news/index.html">News</a> +</li> + </ul> + + <ul class="nav navbar-nav navbar-right"> + + </ul> + + </div><!--/.nav-collapse --> + </div><!--/.container --> +</div><!--/.navbar --> + + + </header> + +<div class="row"> + <div class="col-md-9 contents"> + <div class="page-header"> + <h1>Function to plot squared residuals and the error model for an mkin object</h1> + + <div class="hidden name"><code>mkinerrplot.Rd</code></div> + </div> + + <div class="ref-description"> + + <p>This function plots the squared residuals for the specified subset of the + observed variables from an mkinfit object. In addition, one or more + dashed line(s) show the fitted error model. + A combined plot of the fitted model and this error model plot can be + obtained with <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code> + using the argument <code>show_errplot = TRUE</code>.</p> + + </div> + + <pre class="usage"><span class='fu'>mkinerrplot</span>(<span class='no'>object</span>, + <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/names'>names</a></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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1.1</span> * <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Extremes'>max</a></span>(<span class='no'>object</span>$<span class='no'>data</span>$<span class='no'>predicted</span>)), + <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Predicted"</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Squared residual"</span>, + <span class='kw'>maxy</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='kw'>col_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, + <span class='no'>...</span>)</pre> + + <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> + <table class="ref-arguments"> + <colgroup><col class="name" /><col class="desc" /></colgroup> + <tr> + <th>object</th> + <td><p>A fit represented in an <code><a href='mkinfit.html'>mkinfit</a></code> object.</p></td> + </tr> + <tr> + <th>obs_vars</th> + <td><p>A character vector of names of the observed variables for which residuals + should be plotted. Defaults to all observed variables in the model</p></td> + </tr> + <tr> + <th>xlim</th> + <td><p>plot range in x direction.</p></td> + </tr> + <tr> + <th>xlab</th> + <td><p>Label for the x axis.</p></td> + </tr> + <tr> + <th>ylab</th> + <td><p>Label for the y axis.</p></td> + </tr> + <tr> + <th>maxy</th> + <td><p>Maximum value of the residuals. This is used for the scaling of + the y axis and defaults to "auto".</p></td> + </tr> + <tr> + <th>legend</th> + <td><p>Should a legend be plotted?</p></td> + </tr> + <tr> + <th>lpos</th> + <td><p>Where should the legend be placed? Default is "topright". Will be passed on to + <code><a href='https://www.rdocumentation.org/packages/graphics/topics/legend'>legend</a></code>.</p></td> + </tr> + <tr> + <th>col_obs</th> + <td><p>Colors for the observed variables.</p></td> + </tr> + <tr> + <th>pch_obs</th> + <td><p>Symbols to be used for the observed variables.</p></td> + </tr> + <tr> + <th>…</th> + <td><p>further arguments passed to <code><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></code>.</p></td> + </tr> + </table> + + <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> + + <p>Nothing is returned by this function, as it is called for its side effect, namely to produce a plot.</p> + + <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> + + <div class='dont-index'><p><code><a href='mkinplot.html'>mkinplot</a></code>, for a way to plot the data and the fitted lines of the + mkinfit object.</p></div> + + + <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> + <pre class="examples"><div class='input'><span class='no'>model</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='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</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'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinerrplot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='mkinerrplot-1.png' alt='' width='700' height='433' /></div></pre> + </div> + <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> + <h2>Contents</h2> + <ul class="nav nav-pills nav-stacked"> + <li><a href="#arguments">Arguments</a></li> + + <li><a href="#value">Value</a></li> + + <li><a href="#see-also">See also</a></li> + + <li><a href="#examples">Examples</a></li> + </ul> + + <h2>Author</h2> + <p>Johannes Ranke</p> + </div> +</div> + + <footer> + <div class="copyright"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown"> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.9000.</p> +</div> + </footer> + </div> + + + + </body> +</html> + diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 09329a86..bfca44fc 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -362,15 +362,15 @@ Per default, parameters in the kinetic models are internally transformed in <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'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Tue May 7 08:36:16 2019 -#> Date of summary: Tue May 7 08:36:16 2019 +#> Date of fit: Wed May 8 20:50:50 2019 +#> Date of summary: Wed May 8 20:50:50 2019 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 222 model solutions performed in 0.89 s +#> Fitted using 222 model solutions performed in 0.456 s #> #> Error model: #> Constant variance @@ -443,7 +443,7 @@ Per default, parameters in the kinetic models are internally transformed in <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</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='co'># Fit the model to the FOCUS example dataset D using defaults</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></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'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> User System verstrichen -#> 2.251 0.000 2.253 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff +#> 1.488 0.000 1.488 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -515,7 +515,7 @@ Per default, parameters in the kinetic models are internally transformed in #> Sum of squared residuals at call 126: 371.2134 #> Sum of squared residuals at call 135: 371.2134 #> Negative log-likelihood at call 145: 97.22429</div><div class='output co'>#> <span class='message'>Optimisation successfully terminated.</span></div><div class='output co'>#> User System verstrichen -#> 1.151 0.000 1.152 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> $ff +#> 1.086 0.000 1.087 </div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/coef'>coef</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> NULL</div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -547,8 +547,8 @@ Per default, parameters in the kinetic models are internally transformed in <span class='no'>SFO_SFO.ff</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='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</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'>f.noweight</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Tue May 7 08:36:33 2019 -#> Date of summary: Tue May 7 08:36:33 2019 +#> Date of fit: Wed May 8 20:51:06 2019 +#> Date of summary: Wed May 8 20:51:06 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -556,7 +556,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 421 model solutions performed in 1.1 s +#> Fitted using 421 model solutions performed in 1.082 s #> #> Error model: #> Constant variance @@ -665,8 +665,8 @@ Per default, parameters in the kinetic models are internally transformed in #> 120 m1 25.15 28.78984 -3.640e+00 #> 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.obs</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>f.obs</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Tue May 7 08:36:35 2019 -#> Date of summary: Tue May 7 08:36:35 2019 +#> Date of fit: Wed May 8 20:51:08 2019 +#> Date of summary: Wed May 8 20:51:08 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -674,7 +674,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 758 model solutions performed in 1.991 s +#> Fitted using 758 model solutions performed in 1.971 s #> #> Error model: #> Variance unique to each observed variable @@ -795,8 +795,8 @@ Per default, parameters in the kinetic models are internally transformed in #> 120 m1 25.15 28.80430 -3.654e+00 #> 120 m1 33.31 28.80430 4.506e+00</div><div class='input'><span class='no'>f.tc</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='no'>f.tc</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Tue May 7 08:36:39 2019 -#> Date of summary: Tue May 7 08:36:39 2019 +#> Date of fit: Wed May 8 20:51:11 2019 +#> Date of summary: Wed May 8 20:51:11 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -804,7 +804,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 821 model solutions performed in 3.304 s +#> Fitted using 821 model solutions performed in 3.29 s #> #> Error model: #> Two-component variance function diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index d0b2a0eb..51be5465 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -234,7 +234,7 @@ For the definition of model types and their parameters, the equations given <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'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB fileb5a1e31297a.c 2> fileb5a1e31297a.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file4bbd307f8763.c 2> file4bbd307f8763.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 522cbbfe..8e2e307b 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -328,17 +328,17 @@ <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>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='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></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 verstrichen -#> 0.003 0.000 0.003 </div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>( +#> 0.003 0.000 0.004 </div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>( <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>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='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></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 verstrichen -#> 0.001 0.000 0.002 </div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>( +#> 0.002 0.000 0.001 </div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>( <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/print'>print</a></span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>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='fu'><a href='https://www.rdocumentation.org/packages/base/topics/seq'>seq</a></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 verstrichen -#> 0.021 0.000 0.022 </div><div class='input'> +#> 0.021 0.000 0.021 </div><div class='input'> </div><div class='input'> <span class='co'># Predict from a fitted model</span> <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>)</div><div class='output co'>#> <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#> Sum of squared residuals at call 1: 552.5739 #> Sum of squared residuals at call 3: 552.5739 diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index d0cd748c..3e297eb3 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -194,8 +194,8 @@ <span class='no'>time_1</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/system.time'>system.time</a></span>(<span class='no'>fits.4</span> <span class='kw'><-</span> <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='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='no'>time_default</span></div><div class='output co'>#> User System verstrichen -#> 0.047 0.033 5.463 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> User System verstrichen -#> 19.909 0.004 19.967 </div><div class='input'> +#> 0.048 0.024 5.085 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> User System verstrichen +#> 19.074 0.004 19.089 </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340481 0.2659519 0.7505684 0.2494316 diff --git a/docs/reference/plot.mkinfit-1.png b/docs/reference/plot.mkinfit-1.png Binary files differindex e7b3bac7..f70e9e31 100644 --- a/docs/reference/plot.mkinfit-1.png +++ b/docs/reference/plot.mkinfit-1.png diff --git a/docs/reference/plot.mkinfit-2.png b/docs/reference/plot.mkinfit-2.png Binary files differindex 15bdba55..6facce0f 100644 --- a/docs/reference/plot.mkinfit-2.png +++ b/docs/reference/plot.mkinfit-2.png diff --git a/docs/reference/plot.mkinfit-3.png b/docs/reference/plot.mkinfit-3.png Binary files differindex 52de09bd..b53b3134 100644 --- a/docs/reference/plot.mkinfit-3.png +++ b/docs/reference/plot.mkinfit-3.png diff --git a/docs/reference/plot.mkinfit-4.png b/docs/reference/plot.mkinfit-4.png Binary files differindex a832ede2..70a936ee 100644 --- a/docs/reference/plot.mkinfit-4.png +++ b/docs/reference/plot.mkinfit-4.png diff --git a/docs/reference/plot.mkinfit-5.png b/docs/reference/plot.mkinfit-5.png Binary files differnew file mode 100644 index 00000000..2e208996 --- /dev/null +++ b/docs/reference/plot.mkinfit-5.png diff --git a/docs/reference/plot.mkinfit-6.png b/docs/reference/plot.mkinfit-6.png Binary files differnew file mode 100644 index 00000000..1da876b4 --- /dev/null +++ b/docs/reference/plot.mkinfit-6.png diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index 525200ff..7bfc17f6 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -36,7 +36,7 @@ from a previous successful call to mkinfit and plots the observed data together with the solution of the fitted model. If the current plot device is a tikz device, - then latex is being used for the formatting of the chi2 error level, + then latex is being used for the formatting of the chi2 error level, if show_errmin = TRUE." /> <meta name="twitter:card" content="summary" /> @@ -137,7 +137,7 @@ If the current plot device is a tikz device, from a previous successful call to <code><a href='mkinfit.html'>mkinfit</a></code> and plots the observed data together with the solution of the fitted model.</p> <p>If the current plot device is a <code><a href='https://www.rdocumentation.org/packages/tikzDevice/topics/tikz'>tikz</a></code> device, - then latex is being used for the formatting of the chi2 error level, + then latex is being used for the formatting of the chi2 error level, if <code>show_errmin = TRUE</code>.</p> </div> @@ -151,7 +151,9 @@ plot(x, fit = x, 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", + show_residuals = FALSE, + show_errplot = 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, …) @@ -213,11 +215,18 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, … <tr> <th>show_residuals</th> <td><p>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 + 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.</p></td> </tr> <tr> + <th>show_errplot</th> + <td><p>Should squared residuals and the error model be shown? If only one plot of + the fits is shown, this 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.</p></td> + </tr> + <tr> <th>maxabs</th> <td><p>Maximum absolute value of the residuals. This is used for the scaling of the y axis and defaults to "auto".</p></td> @@ -263,14 +272,18 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, … <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</span> <span class='no'>SFO_SFO</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='mkinsub.html'>mkinsub</a></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'><a href='mkinsub.html'>mkinsub</a></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 co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></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>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</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'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></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'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the observed variables separately</span> -<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the observed variables separately, with residuals</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></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><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-5.png' alt='' width='700' height='433' /></div><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'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div></pre> +<span class='fu'>plot_sep</span>(<span class='no'>fit</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>)) + +<span class='co'># Show the observed variables separately, with the error model</span> +<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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_errplot</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></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><div class='img'><img src='plot.mkinfit-6.png' alt='' width='700' height='433' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/plot.mmkin-2.png b/docs/reference/plot.mmkin-2.png Binary files differindex 555cb7d6..25ed01cc 100644 --- a/docs/reference/plot.mmkin-2.png +++ b/docs/reference/plot.mmkin-2.png diff --git a/docs/reference/plot.mmkin-4.png b/docs/reference/plot.mmkin-4.png Binary files differnew file mode 100644 index 00000000..b03dffb2 --- /dev/null +++ b/docs/reference/plot.mmkin-4.png diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html index b3f2de66..3037ca24 100644 --- a/docs/reference/plot.mmkin.html +++ b/docs/reference/plot.mmkin.html @@ -141,8 +141,9 @@ If the current plot device is a tikz device, </div> <pre class="usage"><span class='co'># S3 method for mmkin</span> -<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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> +<span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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'>resplot</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"time"</span>, <span class='st'>"errmod"</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 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -160,6 +161,12 @@ If the current plot device is a tikz device, <td><p>An index for the fits for which legends should be shown.</p></td> </tr> <tr> + <th>resplot</th> + <td><p>Should the residuals plotted against time, using <code><a href='mkinresplot.html'>mkinresplot</a></code>, + or as squared residuals against predicted values, with the error model, + using <code><a href='mkinerrplot.html'>mkinerrplot</a></code>.</p></td> + </tr> + <tr> <th>errmin_var</th> <td><p>The variable for which the FOCUS chi2 error value should be shown.</p></td> </tr> @@ -187,15 +194,17 @@ If the current plot device is a tikz device, <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'> <span class='co'># Only use one core not to offend CRAN checks</span> + <pre class="examples"><div class='input'> </div><div class='input'> <span class='co'># Only use one core not to offend CRAN checks</span> <span class='no'>fits</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"HS"</span>), <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/list'>list</a></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='co'># named list for titles</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'>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'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>) <span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fits</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='img'><img src='plot.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ])</div><div class='img'><img src='plot.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># We can also plot a single fit, if we like the way plot.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 pkgdown, as far as I know).</span> - <span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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><div class='img'><img src='plot.mmkin-3.png' alt='' width='700' height='433' /></div></pre> + <span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></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><div class='img'><img src='plot.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='co'># Show the error models</span> + <span class='fu'><a href='https://www.rdocumentation.org/packages/graphics/topics/plot'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ], <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='st'>"errmod"</span>)</div><div class='img'><img src='plot.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 9c4a21a9..b3151da1 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -211,15 +211,15 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/summary'>summary</a></span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='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 used for fitting: 0.9.49.4 #> R version used for fitting: 3.6.0 -#> Date of fit: Tue May 7 08:37:31 2019 -#> Date of summary: Tue May 7 08:37:31 2019 +#> Date of fit: Wed May 8 20:52:12 2019 +#> Date of summary: Wed May 8 20:52:12 2019 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 131 model solutions performed in 0.277 s +#> Fitted using 131 model solutions performed in 0.266 s #> #> Error model: #> Constant variance |