diff options
Diffstat (limited to 'docs')
26 files changed, 1120 insertions, 2024 deletions
diff --git a/docs/404.html b/docs/404.html index 2fb6573..9ea600b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,66 +1,27 @@ -<!-- Generated by pkgdown: do not edit by hand --> <!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<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>Page not found (404) • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="bootstrap-toc.css"> -<script src="bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="pkgdown.css" rel="stylesheet"> -<script src="pkgdown.js"></script> - - - - -<meta property="og:title" content="Page not found (404)" /> - - - - -<!-- 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]> +<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> +<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"> +<script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"> +<script src="pkgdown.js"></script><meta property="og:title" content="Page not found (404)"> +<!-- 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 data-spy="scroll" data-target="#toc"> + - - - </head> - - <body data-spy="scroll" data-target="#toc"> <div class="container template-title-body"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -71,18 +32,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> - <li> - <a href="index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> <li> <a href="articles/chemCal.html">Get started</a> </li> @@ -93,24 +48,24 @@ <a href="news/index.html">Changelog</a> </li> </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> +<ul class="nav navbar-nav navbar-right"> +<li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> </ul> - - </div><!--/.nav-collapse --> - </div><!--/.container --> -</div><!--/.navbar --> +</div> +<!--/.nav-collapse --> + </div> +<!--/.container --> +</div> +<!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="contents col-md-9"> <div class="page-header"> <h1>Page not found (404)</h1> @@ -121,31 +76,31 @@ Content not found. Please use links in the navbar. </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> </nav> - </div> +</div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p> +<p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p> +<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> </footer> - </div> +</div> + + </body> </html> - - diff --git a/docs/articles/chemCal.html b/docs/articles/chemCal.html index 8d18c3a..4e145bf 100644 --- a/docs/articles/chemCal.html +++ b/docs/articles/chemCal.html @@ -19,6 +19,8 @@ <![endif]--> </head> <body data-spy="scroll" data-target="#toc"> + + <div class="container template-article"> <header><div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> @@ -31,19 +33,13 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -55,7 +51,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="https://github.com/jranke/chemCal/"> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> @@ -70,88 +66,87 @@ - </header><script src="chemCal_files/header-attrs-2.7/header-attrs.js"></script><script src="chemCal_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row"> + </header><script src="chemCal_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row"> <div class="col-md-9 contents"> <div class="page-header toc-ignore"> <h1 data-toc-skip>Introduction to chemCal</h1> - <h4 class="author">Johannes Ranke</h4> + <h4 data-toc-skip class="author">Johannes Ranke</h4> - <h4 class="date">2021-04-17</h4> + <h4 data-toc-skip class="date">2022-03-31</h4> - <small class="dont-index">Source: <a href="https://github.com/jranke/chemCal/blob/master/vignettes/chemCal.Rmd"><code>vignettes/chemCal.Rmd</code></a></small> + <small class="dont-index">Source: <a href="https://github.com/jranke/chemCal/blob/HEAD/vignettes/chemCal.Rmd" class="external-link"><code>vignettes/chemCal.Rmd</code></a></small> <div class="hidden name"><code>chemCal.Rmd</code></div> </div> -<div id="basic-calibration-functions" class="section level1"> -<h1 class="hasAnchor"> -<a href="#basic-calibration-functions" class="anchor"></a>Basic calibration functions</h1> +<div class="section level2"> +<h2 id="basic-calibration-functions">Basic calibration functions<a class="anchor" aria-label="anchor" href="#basic-calibration-functions"></a> +</h2> <p>The <code>chemCal</code> package was first designed in the course of a lecture and lab course on “Analytics of Organic Trace Contaminants” at the University of Bremen from October to December 2004. In the fall 2005, an email exchange with Ron Wehrens led to the belief that it would be desirable to implement the inverse prediction method given in <span class="citation">Massart et al. (1997)</span> since it also covers the case of weighted regression. Studies of the IUPAC orange book and of DIN 32645 (equivalent to ISO 11843), publications by <span class="citation">Currie (1997)</span> and the Analytical Method Committee of the Royal Society of Chemistry <span class="citation">(Analytical Methods Committee 1989)</span> and a nice paper by Castells and Castillo <span class="citation">(Castells and Castillo 2000)</span> provided some further understanding of the matter.</p> -<p>At the moment, the package consists of four functions (<a href="https://pkgdown.jrwb.de/chemCal/reference/calplot.lm.html">calplot</a>, <a href="https://pkgdown.jrwb.de/chemCal/reference/lod.html">lod</a>, <a href="https://pkgdown.jrwb.de/chemCal/reference/loq.html">loq</a> and <a href="https://pkgdown.jrwb.de/chemCal/reference/inverse.predict.html">inverse.predict</a>), working on univariate linear models of class <code>lm</code> or <code>rlm</code>, plus several datasets for validation.</p> -<p>A <a href="https://bugs.r-project.org/bugzilla/show_bug.cgi?id=8877">bug report</a> and the following e-mail exchange on the r-devel mailing list about prediction intervals from weighted regression entailed some further studies on this subject. However, I did not encounter any proof or explanation of the formula cited below yet, so I can’t really confirm that Massart’s method is correct.</p> +<p>At the moment, the package consists of four functions (<a href="https://pkgdown.jrwb.de/chemCal/reference/calplot.lm.html" class="external-link">calplot</a>, <a href="https://pkgdown.jrwb.de/chemCal/reference/lod.html" class="external-link">lod</a>, <a href="https://pkgdown.jrwb.de/chemCal/reference/loq.html" class="external-link">loq</a> and <a href="https://pkgdown.jrwb.de/chemCal/reference/inverse.predict.html" class="external-link">inverse.predict</a>), working on univariate linear models of class <code>lm</code> or <code>rlm</code>, plus several datasets for validation.</p> +<p>A <a href="https://bugs.r-project.org/show_bug.cgi?id=8877" class="external-link">bug report</a> and the following e-mail exchange on the r-devel mailing list about prediction intervals from weighted regression entailed some further studies on this subject. However, I did not encounter any proof or explanation of the formula cited below yet, so I can’t really confirm that Massart’s method is correct.</p> <p>In fact, in June 2018 I was made aware of the fact that the inverse prediction method implemented in chemCal version 0.1.37 and before did not take the variance of replicate calibration standards about their means into account, nor the number of replicates when calculating the degrees of freedom. Thanks to PhD student Anna Burniol Figols for reporting this issue!</p> <p>As a consequence, I rewrote <code>inverse.predict</code> not to automatically work with the mean responses for each calibration standard any more. The example calculations from <span class="citation">Massart et al. (1997)</span> can still be reproduced when the regression model is calculated using the means of the calibration data as shown below.</p> </div> -<div id="usage" class="section level1"> -<h1 class="hasAnchor"> -<a href="#usage" class="anchor"></a>Usage</h1> +<div class="section level2"> +<h2 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a> +</h2> <p>When calibrating an analytical method, the first task is to generate a suitable model. If we want to use the <code>chemCal</code> functions, we have to restrict ourselves to univariate, possibly weighted, linear regression so far.</p> <p>Once such a model has been created, the calibration can be graphically shown by using the <code>calplot</code> function:</p> <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r"> -<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/chemCal/">chemCal</a></span><span class="op">)</span> -<span class="va">m0</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex3</span><span class="op">)</span> -<span class="fu"><a href="../reference/calplot.html">calplot</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span></code></pre></div> +<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/chemCal/" class="external-link">chemCal</a></span><span class="op">)</span> +<span class="va">m0</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex3</span><span class="op">)</span> +<span class="fu"><a href="../reference/calplot.lm.html">calplot</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span></code></pre></div> <p><img src="chemCal_files/figure-html/unnamed-chunk-1-1.png" width="700"></p> <p>As we can see, the scatter increases with increasing x. This is also illustrated by one of the diagnostic plots for linear models provided by R:</p> <div class="sourceCode" id="cb2"><pre class="downlit sourceCode r"> -<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html">plot</a></span><span class="op">(</span><span class="va">m0</span>, which<span class="op">=</span><span class="fl">3</span><span class="op">)</span></code></pre></div> +<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">m0</span>, which<span class="op">=</span><span class="fl">3</span><span class="op">)</span></code></pre></div> <p><img src="chemCal_files/figure-html/unnamed-chunk-2-1.png" width="700"></p> <p>Therefore, in Example 8 in <span class="citation">Massart et al. (1997)</span>, weighted regression is proposed which can be reproduced by the following code. Note that we are building the model on the mean values for each standard in order to be able to reproduce the results given in the book with the current version of chemCal.</p> <div class="sourceCode" id="cb3"><pre class="downlit sourceCode r"> -<code class="sourceCode R"><span class="va">weights</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html">with</a></span><span class="op">(</span><span class="va">massart97ex3</span>, <span class="op">{</span> - <span class="va">yx</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/split.html">split</a></span><span class="op">(</span><span class="va">y</span>, <span class="va">x</span><span class="op">)</span> - <span class="va">ybar</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">mean</span><span class="op">)</span> - <span class="va">s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/lapply.html">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">sd</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> - <span class="va">w</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op">(</span><span class="fl">1</span> <span class="op">/</span> <span class="op">(</span><span class="va">s</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> +<code class="sourceCode R"><span class="va">weights</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html" class="external-link">with</a></span><span class="op">(</span><span class="va">massart97ex3</span>, <span class="op">{</span> + <span class="va">yx</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/split.html" class="external-link">split</a></span><span class="op">(</span><span class="va">y</span>, <span class="va">x</span><span class="op">)</span> + <span class="va">ybar</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">mean</span><span class="op">)</span> + <span class="va">s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">sd</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> + <span class="va">w</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fl">1</span> <span class="op">/</span> <span class="op">(</span><span class="va">s</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">3</span><span class="op">)</span> <span class="op">}</span><span class="op">)</span> -<span class="va">massart97ex3.means</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/aggregate.html">aggregate</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, <span class="va">massart97ex3</span>, <span class="va">mean</span><span class="op">)</span> +<span class="va">massart97ex3.means</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/aggregate.html" class="external-link">aggregate</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, <span class="va">massart97ex3</span>, <span class="va">mean</span><span class="op">)</span> -<span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, w <span class="op">=</span> <span class="va">weights</span>, data <span class="op">=</span> <span class="va">massart97ex3.means</span><span class="op">)</span></code></pre></div> +<span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, w <span class="op">=</span> <span class="va">weights</span>, data <span class="op">=</span> <span class="va">massart97ex3.means</span><span class="op">)</span></code></pre></div> <p>If we now want to predict a new x value from measured y values, we use the <code>inverse.predict</code> function:</p> <div class="sourceCode" id="cb4"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span class="fu"><a href="../reference/inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m</span>, <span class="fl">15</span>, ws<span class="op">=</span><span class="fl">1.67</span><span class="op">)</span></code></pre></div> -<pre><code>## $Prediction -## [1] 5.865367 -## -## $`Standard Error` -## [1] 0.8926109 -## -## $Confidence -## [1] 2.478285 -## -## $`Confidence Limits` -## [1] 3.387082 8.343652</code></pre> +<pre><code><span class="co">## $Prediction</span> +<span class="co">## [1] 5.865367</span> +<span class="co">## </span> +<span class="co">## $`Standard Error`</span> +<span class="co">## [1] 0.8926109</span> +<span class="co">## </span> +<span class="co">## $Confidence</span> +<span class="co">## [1] 2.478285</span> +<span class="co">## </span> +<span class="co">## $`Confidence Limits`</span> +<span class="co">## [1] 3.387082 8.343652</span></code></pre> <div class="sourceCode" id="cb6"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span class="fu"><a href="../reference/inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m</span>, <span class="fl">90</span>, ws <span class="op">=</span> <span class="fl">0.145</span><span class="op">)</span></code></pre></div> -<pre><code>## $Prediction -## [1] 44.06025 -## -## $`Standard Error` -## [1] 2.829162 -## -## $Confidence -## [1] 7.855012 -## -## $`Confidence Limits` -## [1] 36.20523 51.91526</code></pre> +<pre><code><span class="co">## $Prediction</span> +<span class="co">## [1] 44.06025</span> +<span class="co">## </span> +<span class="co">## $`Standard Error`</span> +<span class="co">## [1] 2.829162</span> +<span class="co">## </span> +<span class="co">## $Confidence</span> +<span class="co">## [1] 7.855012</span> +<span class="co">## </span> +<span class="co">## $`Confidence Limits`</span> +<span class="co">## [1] 36.20523 51.91526</span></code></pre> <p>The weight <code>ws</code> assigned to the measured y value has to be given by the user in the case of weighted regression, or alternatively, the approximate variance <code>var.s</code> at this location.</p> </div> -<div id="background-for-inverse-predict" class="section level1"> -<h1 class="hasAnchor"> -<a href="#background-for-inverse-predict" class="anchor"></a>Background for <code>inverse.predict</code> -</h1> +<div class="section level2"> +<h2 id="background-for-inverse-predict">Background for <code>inverse.predict</code><a class="anchor" aria-label="anchor" href="#background-for-inverse-predict"></a> +</h2> <p>Equation 8.28 in <span class="citation">Massart et al. (1997)</span> gives a general equation for predicting the standard error <span class="math inline">\(s_{\hat{x_s}}\)</span> for an <span class="math inline">\(x\)</span> value predicted from measurements of <span class="math inline">\(y\)</span> according to the linear calibration function <span class="math inline">\(y = b_0 + b_1 \cdot x\)</span>:</p> <p><span class="math display">\[\begin{equation} s_{\hat{x_s}} = \frac{s_e}{b_1} \sqrt{\frac{1}{w_s m} + \frac{1}{\sum{w_i}} + @@ -203,11 +198,13 @@ s_{\hat{x_s}} = \frac{1}{b_1} \sqrt{\frac{{s_s}^2}{w_s m} + <footer><div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <p></p> +<p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p> +<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> </footer> @@ -216,5 +213,7 @@ s_{\hat{x_s}} = \frac{1}{b_1} \sqrt{\frac{{s_s}^2}{w_s m} + + + </body> </html> diff --git a/docs/articles/chemCal_files/figure-html/unnamed-chunk-1-1.png b/docs/articles/chemCal_files/figure-html/unnamed-chunk-1-1.png Binary files differindex fc76c68..51f854a 100644 --- a/docs/articles/chemCal_files/figure-html/unnamed-chunk-1-1.png +++ b/docs/articles/chemCal_files/figure-html/unnamed-chunk-1-1.png diff --git a/docs/articles/chemCal_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/chemCal_files/figure-html/unnamed-chunk-2-1.png Binary files differindex 605137b..f30d115 100644 --- a/docs/articles/chemCal_files/figure-html/unnamed-chunk-2-1.png +++ b/docs/articles/chemCal_files/figure-html/unnamed-chunk-2-1.png diff --git a/docs/articles/index.html b/docs/articles/index.html index 48a4eca..3e53fde 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,66 +1,12 @@ -<!-- 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>Articles • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Articles" /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Articles • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Articles"><!-- 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]--> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - - - </head> - - <body data-spy="scroll" data-target="#toc"> <div class="container template-article-index"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -71,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -92,25 +31,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Articles</h1> @@ -120,31 +53,27 @@ <h3>All vignettes</h3> <p class="section-desc"></p> - <dl> - <dt><a href="chemCal.html">Introduction to chemCal</a></dt> - <dd></dt> - </dl> - </div> + <dl><dt><a href="chemCal.html">Introduction to chemCal</a></dt> + <dd> + </dd></dl></div> </div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/authors.html b/docs/authors.html index 476cf5e..694eb5b 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,66 +1,12 @@ -<!-- 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>Authors • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="bootstrap-toc.css"> -<script src="bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="pkgdown.css" rel="stylesheet"> -<script src="pkgdown.js"></script> - - - - -<meta property="og:title" content="Authors" /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Authors and Citation • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="bootstrap-toc.css"><script src="bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"><script src="pkgdown.js"></script><meta property="og:title" content="Authors and Citation"><!-- 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]--> - - +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - </head> - - <body data-spy="scroll" data-target="#toc"> - <div class="container template-authors"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container template-citation-authors"> + <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"> @@ -71,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="articles/chemCal.html">Get started</a> </li> <li> @@ -92,36 +31,49 @@ <li> <a href="news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="contents col-md-9"> - <div class="page-header"> - <h1>Authors</h1> + <div class="section level2 authors-section"> + <div class="page-header"> + <h1>Authors</h1> + </div> + + + <ul class="list-unstyled"><li> + <p><strong>Johannes Ranke</strong>. Author, maintainer, copyright holder. <a href="https://orcid.org/0000-0003-4371-6538" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> + </p> + </li> + </ul></div> + <div class="section level2 citation-section"> + <div> + <h1 id="citation">Citation</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/chemCal/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small> + </div> </div> - <ul class="list-unstyled"> - <li> - <p><strong>Johannes Ranke</strong>. Author, maintainer, copyright holder. <a href='https://orcid.org/0000-0003-4371-6538' target='orcid.widget' aria-label='ORCID'><span class='fab fa-orcid orcid' aria-hidden='true'></span></a> - </p> - </li> - </ul> + + <p>Ranke J (2022). +<em>chemCal: Calibration Functions for Analytical Chemistry</em>. +https://pkgdown.jrwb.de/chemCal/, https://cgit.jrwb.de/chemCal/about. +</p> + <pre>@Manual{, + title = {chemCal: Calibration Functions for Analytical Chemistry}, + author = {Johannes Ranke}, + year = {2022}, + note = {https://pkgdown.jrwb.de/chemCal/, https://cgit.jrwb.de/chemCal/about}, +}</pre> </div> @@ -129,22 +81,20 @@ - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/index.html b/docs/index.html index a724173..4019484 100644 --- a/docs/index.html +++ b/docs/index.html @@ -25,6 +25,8 @@ <![endif]--> </head> <body data-spy="scroll" data-target="#toc"> + + <div class="container template-home"> <header><div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> @@ -37,19 +39,13 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li> - <a href="index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> <a href="articles/chemCal.html">Get started</a> </li> <li> @@ -61,7 +57,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="https://github.com/jranke/chemCal/"> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> @@ -78,58 +74,159 @@ </header><div class="row"> <div class="contents col-md-9"> -<div id="chemcal---calibration-functions-for-analytical-chemistry" class="section level1"> -<div class="page-header"><h1 class="hasAnchor"> -<a href="#chemcal---calibration-functions-for-analytical-chemistry" class="anchor"></a>chemCal - Calibration functions for analytical chemistry</h1></div> +<div class="section level1"> +<div class="page-header"><h1 id="chemcal---calibration-functions-for-analytical-chemistry">chemCal - Calibration functions for analytical chemistry<a class="anchor" aria-label="anchor" href="#chemcal---calibration-functions-for-analytical-chemistry"></a> +</h1></div> <!-- badges: start --> -<p>Static documentation of this R package can be found at <a href="https://pkgdown.jrwb.de/chemCal" class="uri">https://pkgdown.jrwb.de/chemCal</a></p> +<div class="section level2"> +<h2 id="overview">Overview<a class="anchor" aria-label="anchor" href="#overview"></a> +</h2> +<p>chemCal is an R package providing some basic functions for conveniently working with linear calibration curves with one explanatory variable.</p> +</div> +<div class="section level2"> +<h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a> +</h2> +<p>From within <a href="https://r-project.org" class="external-link">R</a>, get the official chemCal release using</p> +<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"chemCal"</span><span class="op">)</span></code></pre></div> +</div> +<div class="section level2"> +<h2 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a> +</h2> +<p>chemCal works with univariate linear models of class <code>lm</code>. Working with one of the datasets coming with chemCal, we can produce a calibration plot using the <code>calplot</code> function:</p> +<div class="section level3"> +<h3 id="plotting-a-calibration">Plotting a calibration<a class="anchor" aria-label="anchor" href="#plotting-a-calibration"></a> +</h3> +<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/chemCal/" class="external-link">chemCal</a></span><span class="op">)</span> +<span class="va">m0</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex3</span><span class="op">)</span> +<span class="fu"><a href="reference/calplot.lm.html">calplot</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span></code></pre></div> +<p><img src="reference/figures/README-calplot-1.png"><!-- --></p> +</div> +<div class="section level3"> +<h3 id="lod-and-loq">LOD and LOQ<a class="anchor" aria-label="anchor" href="#lod-and-loq"></a> +</h3> +<p>If you use unweighted regression, as in the above example, we can calculate a Limit Of Detection (LOD) from the calibration data.</p> +<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="fu"><a href="reference/lod.html">lod</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span> +<span class="co">#> $x</span> +<span class="co">#> [1] 5.407085</span> +<span class="co">#> </span> +<span class="co">#> $y</span> +<span class="co">#> [1] 13.63911</span></code></pre></div> +<p>This is the minimum detectable value (German: Erfassungsgrenze), i.e. the value where the probability that the signal is not detected although the analyte is present is below a specified error tolerance beta (default is 0.05 following the IUPAC recommendation).</p> +<p>You can also calculate the decision limit (German: Nachweisgrenze), i.e. the value that is significantly different from the blank signal with an error tolerance alpha (default is 0.05, again following IUPAC recommendations) by setting beta to 0.5.</p> +<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="fu"><a href="reference/lod.html">lod</a></span><span class="op">(</span><span class="va">m0</span>, beta <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span> +<span class="co">#> $x</span> +<span class="co">#> [1] 2.720388</span> +<span class="co">#> </span> +<span class="co">#> $y</span> +<span class="co">#> [1] 8.314841</span></code></pre></div> +<p>Furthermore, you can calculate the Limit Of Quantification (LOQ), being defined as the value where the relative error of the quantification given the calibration model reaches a prespecified value (default is 1/3).</p> +<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="fu"><a href="reference/loq.html">loq</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span> +<span class="co">#> $x</span> +<span class="co">#> [1] 9.627349</span> +<span class="co">#> </span> +<span class="co">#> $y</span> +<span class="co">#> [1] 22.00246</span></code></pre></div> +</div> +<div class="section level3"> +<h3 id="confidence-intervals-for-measured-values">Confidence intervals for measured values<a class="anchor" aria-label="anchor" href="#confidence-intervals-for-measured-values"></a> +</h3> +<p>Finally, you can get a confidence interval for the values measured using the calibration curve, i.e. for the inverse predictions using the function <code>inverse.predict</code>.</p> +<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="fu"><a href="reference/inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m0</span>, <span class="fl">90</span><span class="op">)</span> +<span class="co">#> $Prediction</span> +<span class="co">#> [1] 43.93983</span> +<span class="co">#> </span> +<span class="co">#> $`Standard Error`</span> +<span class="co">#> [1] 1.576985</span> +<span class="co">#> </span> +<span class="co">#> $Confidence</span> +<span class="co">#> [1] 3.230307</span> +<span class="co">#> </span> +<span class="co">#> $`Confidence Limits`</span> +<span class="co">#> [1] 40.70952 47.17014</span></code></pre></div> +<p>If you have replicate measurements of the same sample, you can also give a vector of numbers.</p> +<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span class="fu"><a href="reference/inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m0</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">91</span>, <span class="fl">89</span>, <span class="fl">87</span>, <span class="fl">93</span>, <span class="fl">90</span><span class="op">)</span><span class="op">)</span> +<span class="co">#> $Prediction</span> +<span class="co">#> [1] 43.93983</span> +<span class="co">#> </span> +<span class="co">#> $`Standard Error`</span> +<span class="co">#> [1] 0.796884</span> +<span class="co">#> </span> +<span class="co">#> $Confidence</span> +<span class="co">#> [1] 1.632343</span> +<span class="co">#> </span> +<span class="co">#> $`Confidence Limits`</span> +<span class="co">#> [1] 42.30749 45.57217</span></code></pre></div> +</div> +</div> +<div class="section level2"> +<h2 id="reference">Reference<a class="anchor" aria-label="anchor" href="#reference"></a> +</h2> +<p>You can use the R help system to view documentation, or you can have a look at the <a href="https://pkgdown.jrwb.de/chemCal" class="external-link">online documentation</a>.</p> +</div> </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <div class="links"> -<h2>Links</h2> +<h2 data-toc-skip>Links</h2> <ul class="list-unstyled"> -<li>Download from CRAN at <br><a href="https://cloud.r-project.org/package=chemCal">https://cloud.r-project.org/package=chemCal</a> -</li> -<li>Browse source code at <br><a href="https://github.com/jranke/chemCal/">https://github.com/jranke/chemCal/</a> -</li> -<li>Report a bug at <br><a href="https://github.com/jranke/chemCal/issues">https://github.com/jranke/chemCal/issues</a> -</li> +<li><a href="https://cloud.r-project.org/package=chemCal" class="external-link">View on CRAN</a></li> +<li><a href="https://github.com/jranke/chemCal/" class="external-link">Browse source code</a></li> +<li><a href="https://github.com/jranke/chemCal/issues" class="external-link">Report a bug</a></li> </ul> </div> + <div class="license"> -<h2>License</h2> +<h2 data-toc-skip>License</h2> <ul class="list-unstyled"> <li>GPL (>= 2)</li> </ul> </div> -<div class="developers"> -<h2>Developers</h2> + + +<div class="citation"> +<h2 data-toc-skip>Citation</h2> <ul class="list-unstyled"> -<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> <a href="https://orcid.org/0000-0003-4371-6538" target="orcid.widget" aria-label="ORCID"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li> +<li><a href="authors.html#citation">Citing chemCal</a></li> </ul> </div> - <div class="dev-status"> -<h2>Dev status</h2> +<div class="developers"> +<h2 data-toc-skip>Developers</h2> <ul class="list-unstyled"> -<li><a href="https://cran.r-project.org/package=chemCal"><img src="https://www.r-pkg.org/badges/version/chemCal"></a></li> -<li><a href="https://travis-ci.com/jranke/chemCal"><img src="https://travis-ci.com/jranke/chemCal.svg?branch=master" alt="Build Status"></a></li> -<li><a href="https://codecov.io/github/jranke/chemCal"><img src="https://codecov.io/github/jranke/chemCal/branch/master/graphs/badge.svg" alt="codecov"></a></li> +<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> <a href="https://orcid.org/0000-0003-4371-6538" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li> </ul> </div> + +<div class="dev-status"> +<h2 data-toc-skip>Dev status</h2> +<ul class="list-unstyled"> +<li><a href="https://cran.r-project.org/package=chemCal" class="external-link"><img src="https://www.r-pkg.org/badges/version/chemCal"></a></li> +<li><a href="https://app.travis-ci.com/github/jranke/chemCal" class="external-link"><img src="https://travis-ci.com/jranke/chemCal.svg?branch=master" alt="Build Status"></a></li> +<li><a href="https://codecov.io/github/jranke/chemCal" class="external-link"><img src="https://codecov.io/github/jranke/chemCal/branch/master/graphs/badge.svg" alt="codecov"></a></li> +</ul> </div> + + </div> </div> <footer><div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <p></p> +<p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p> +<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> </footer> @@ -138,5 +235,7 @@ + + </body> </html> diff --git a/docs/news/index.html b/docs/news/index.html index d3ddaa8..f422331 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,66 +1,12 @@ -<!-- 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>Changelog • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Changelog" /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Changelog • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Changelog"><!-- 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]--> - - +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - </head> - - <body data-spy="scroll" data-target="#toc"> <div class="container template-news"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -71,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -92,98 +31,76 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1 data-toc-skip>Changelog <small></small></h1> - <small>Source: <a href='https://github.com/jranke/chemCal/blob/master/NEWS.md'><code>NEWS.md</code></a></small> + <small>Source: <a href="https://github.com/jranke/chemCal/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small> </div> - <div id="chemcal-022" class="section level1"> -<h1 class="page-header" data-toc-text="0.2.2"> -<a href="#chemcal-022" class="anchor"></a>chemCal 0.2.2<small> Unreleased </small> -</h1> -<ul> -<li><p>‘calplot’ gains an argument ‘legend_x’ for better control of the legend position</p></li> + <div class="section level2"> +<h2 class="page-header" data-toc-text="0.2.3" id="chemcal-023">chemCal 0.2.3<a class="anchor" aria-label="anchor" href="#chemcal-023"></a></h2> +<ul><li>Make the use of the ‘investr’ package conditional in testthat tests, update maintainer e-mail address</li> +</ul></div> + <div class="section level2"> +<h2 class="page-header" data-toc-text="0.2.2" id="chemcal-022">chemCal 0.2.2<small>2021-04-17</small><a class="anchor" aria-label="anchor" href="#chemcal-022"></a></h2> +<ul><li><p>‘calplot’ gains an argument ‘legend_x’ for better control of the legend position</p></li> <li><p>Added the cadmium dataset from Rocke and Lorenzato (1995)</p></li> <li><p>Suggest: rmarkdown as it is not a dependency of knitr any more, as pointed out by Kurt Hornik</p></li> -</ul> -</div> - <div id="chemcal-021" class="section level1"> -<h1 class="page-header" data-toc-text="0.2.1"> -<a href="#chemcal-021" class="anchor"></a>chemCal 0.2.1<small> 2018-07-17 </small> -</h1> -<ul> -<li><p>‘inverse.predict’: Do not work on the means of the calibration standards any more, as this ignores the variability of y values about the means. Thanks to Anna Burniol Figols for pointing out this issue</p></li> +</ul></div> + <div class="section level2"> +<h2 class="page-header" data-toc-text="0.2.1" id="chemcal-021">chemCal 0.2.1<small>2018-07-17</small><a class="anchor" aria-label="anchor" href="#chemcal-021"></a></h2> +<ul><li><p>‘inverse.predict’: Do not work on the means of the calibration standards any more, as this ignores the variability of y values about the means. Thanks to Anna Burniol Figols for pointing out this issue</p></li> <li><p>Use testthat for tests to simplify development. Adapt the tests using data with replicate standard measurements to work on the means in order to show the relation to ‘inverse.predict’ from earlier versions. Include comparisons with investr::calibrate(method = ‘Wald’) for unweighted regressions. Include tests with more precision to check for changes in numerical output across versions.</p></li> <li><p>‘lod’ and ‘loq’: In the lists that are returned, return the list component ‘y’ without names, because we always only have a single element in ‘y’ (previously the name ‘1’ was returned).</p></li> <li><p>Convert vignette to html and explain the changes to ‘inverse.predict’</p></li> <li><p>Add two example dataset, one from an online course at the University of Toronto, one from Rocke and Lorenzato (1995)</p></li> <li><p>Update static documentation</p></li> -</ul> -</div> - <div id="chemcal-01-37" class="section level1"> -<h1 class="page-header" data-toc-text="0.1-37"> -<a href="#chemcal-01-37" class="anchor"></a>chemCal 0.1-37<small> 2015-10-08 </small> -</h1> -<ul> -<li>Maintenance release</li> -</ul> -</div> - <div id="chemcal-01-34" class="section level1"> -<h1 class="page-header" data-toc-text="0.1-34"> -<a href="#chemcal-01-34" class="anchor"></a>chemCal 0.1-34<small> 2014-04-25 </small> -</h1> -<ul> -<li>Bugfix in lod() and loq(): In the case of small absolute x values (e.g. on the order of 1e-4 and smaller), the lod or loq calculated using the default method could produce inaccurate results as the default tolerance that was used in the internal call to optimize is inappropriate in such cases. Now a reasonable default is used which can be overriden by the user. Thanks to Jérôme Ambroise for reporting the bug.</li> -</ul> -<p>For a detailed list of changes to the chemCal source please consult the commit history on <a href="https://cgit.jrwb.de/chemCal" class="uri">https://cgit.jrwb.de/chemCal</a></p> +</ul></div> + <div class="section level2"> +<h2 class="page-header" data-toc-text="0.1-37" id="chemcal-01-37">chemCal 0.1-37<small>2015-10-08</small><a class="anchor" aria-label="anchor" href="#chemcal-01-37"></a></h2> +<ul><li>Maintenance release</li> +</ul></div> + <div class="section level2"> +<h2 class="page-header" data-toc-text="0.1-34" id="chemcal-01-34">chemCal 0.1-34<small>2014-04-25</small><a class="anchor" aria-label="anchor" href="#chemcal-01-34"></a></h2> +<ul><li>Bugfix in lod() and loq(): In the case of small absolute x values (e.g. on the order of 1e-4 and smaller), the lod or loq calculated using the default method could produce inaccurate results as the default tolerance that was used in the internal call to optimize is inappropriate in such cases. Now a reasonable default is used which can be overriden by the user. Thanks to Jérôme Ambroise for reporting the bug.</li> +</ul><p>For a detailed list of changes to the chemCal source please consult the commit history on <a href="https://cgit.jrwb.de/chemCal" class="external-link uri">https://cgit.jrwb.de/chemCal</a></p> </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 1273238..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 7e7048f..6f0eee4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -80,7 +80,7 @@ $(document).ready(function() { var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-label='Copy to clipboard' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy'></i></button>"; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -91,7 +91,7 @@ // Initialize clipboard: var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 6279661..dc4cced 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,7 +1,7 @@ pandoc: 2.9.2.1 -pkgdown: 1.6.1 +pkgdown: 2.0.2 pkgdown_sha: ~ articles: chemCal: chemCal.html -last_built: 2021-04-17T05:19Z +last_built: 2022-03-31T16:32Z diff --git a/docs/reference/calplot.lm-1.png b/docs/reference/calplot.lm-1.png Binary files differindex 5d4c4d9..c2deae8 100644 --- a/docs/reference/calplot.lm-1.png +++ b/docs/reference/calplot.lm-1.png diff --git a/docs/reference/calplot.lm.html b/docs/reference/calplot.lm.html index b041a8d..7865a66 100644 --- a/docs/reference/calplot.lm.html +++ b/docs/reference/calplot.lm.html @@ -1,68 +1,13 @@ -<!-- 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>Plot calibration graphs from univariate linear models — calplot • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Plot calibration graphs from univariate linear models — calplot" /> -<meta property="og:description" content="Produce graphics of calibration data, the fitted model as well - as confidence, and, for unweighted regression, prediction bands." /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Plot calibration graphs from univariate linear models — calplot • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Plot calibration graphs from univariate linear models — calplot"><meta property="og:description" content="Produce graphics of calibration data, the fitted model as well + as confidence, and, for unweighted regression, prediction bands."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -73,19 +18,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -94,25 +32,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Plot calibration graphs from univariate linear models</h1> @@ -125,102 +57,88 @@ as confidence, and, for unweighted regression, prediction bands.</p> </div> - <pre class="usage"><span class='fu'>calplot</span><span class='op'>(</span><span class='va'>object</span>, xlim <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'>"auto"</span>, <span class='st'>"auto"</span><span class='op'>)</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='st'>"auto"</span>, <span class='st'>"auto"</span><span class='op'>)</span>, - xlab <span class='op'>=</span> <span class='st'>"Concentration"</span>, ylab <span class='op'>=</span> <span class='st'>"Response"</span>, legend_x <span class='op'>=</span> <span class='st'>"auto"</span>, - alpha<span class='op'>=</span><span class='fl'>0.05</span>, varfunc <span class='op'>=</span> <span class='cn'>NULL</span><span class='op'>)</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 univariate model object of class <code><a href='https://rdrr.io/r/stats/lm.html'>lm</a></code> or - <code><a href='https://rdrr.io/pkg/MASS/man/rlm.html'>rlm</a></code> - with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>.</p></td> - </tr> - <tr> - <th>xlim</th> - <td><p>The limits of the plot on the x axis.</p></td> - </tr> - <tr> - <th>ylim</th> - <td><p>The limits of the plot on the y axis.</p></td> - </tr> - <tr> - <th>xlab</th> - <td><p>The label of the x axis.</p></td> - </tr> - <tr> - <th>ylab</th> - <td><p>The label of the y axis.</p></td> - </tr> - <tr> - <th>legend_x</th> - <td><p>An optional numeric value for adjusting the x coordinate of the legend.</p></td> - </tr> - <tr> - <th>alpha</th> - <td><p>The error tolerance level for the confidence and prediction bands. Note that this - includes both tails of the Gaussian distribution, unlike the alpha and beta parameters - used in <code><a href='lod.html'>lod</a></code> (see note below).</p></td> - </tr> - <tr> - <th>varfunc</th> - <td><p>The variance function for generating the weights in the model. - Currently, this argument is ignored (see note below).</p></td> - </tr> - </table> - - <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">calplot</span><span class="op">(</span><span class="va">object</span>, xlim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"auto"</span>, <span class="st">"auto"</span><span class="op">)</span>, ylim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"auto"</span>, <span class="st">"auto"</span><span class="op">)</span>, + xlab <span class="op">=</span> <span class="st">"Concentration"</span>, ylab <span class="op">=</span> <span class="st">"Response"</span>, legend_x <span class="op">=</span> <span class="st">"auto"</span>, + alpha<span class="op">=</span><span class="fl">0.05</span>, varfunc <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></code></pre></div> + </div> + <div id="arguments"> + <h2>Arguments</h2> + <dl><dt>object</dt> +<dd><p>A univariate model object of class <code><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></code> or + <code><a href="https://rdrr.io/pkg/MASS/man/rlm.html" class="external-link">rlm</a></code> + with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>.</p></dd> +<dt>xlim</dt> +<dd><p>The limits of the plot on the x axis.</p></dd> +<dt>ylim</dt> +<dd><p>The limits of the plot on the y axis.</p></dd> +<dt>xlab</dt> +<dd><p>The label of the x axis.</p></dd> +<dt>ylab</dt> +<dd><p>The label of the y axis.</p></dd> +<dt>legend_x</dt> +<dd><p>An optional numeric value for adjusting the x coordinate of the legend.</p></dd> +<dt>alpha</dt> +<dd><p>The error tolerance level for the confidence and prediction bands. Note that this + includes both tails of the Gaussian distribution, unlike the alpha and beta parameters + used in <code><a href="lod.html">lod</a></code> (see note below).</p></dd> +<dt>varfunc</dt> +<dd><p>The variance function for generating the weights in the model. + Currently, this argument is ignored (see note below).</p></dd> +</dl></div> + <div id="value"> + <h2>Value</h2> <p>A plot of the calibration data, of your fitted model as well as lines showing the confidence limits. Prediction limits are only shown for models from unweighted regression.</p> - <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> - + </div> + <div id="note"> + <h2>Note</h2> <p>Prediction bands for models from weighted linear regression require weights for the data, for which responses should be predicted. Prediction intervals using weights e.g. from a variance function are currently not supported by - the internally used function <code><a href='https://rdrr.io/r/stats/predict.lm.html'>predict.lm</a></code>, therefore, + the internally used function <code><a href="https://rdrr.io/r/stats/predict.lm.html" class="external-link">predict.lm</a></code>, therefore, <code>calplot</code> does not draw prediction bands for such models.</p> <p>It is possible to compare the <code>calplot</code> prediction bands with the - <code><a href='lod.html'>lod</a></code> values if the <code><a href='lod.html'>lod()</a></code> alpha and beta parameters are + <code><a href="lod.html">lod</a></code> values if the <code><a href="lod.html">lod()</a></code> alpha and beta parameters are half the value of the <code>calplot()</code> alpha parameter.</p> - <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> - + </div> + <div id="author"> + <h2>Author</h2> <p>Johannes Ranke - <a href='mailto:jranke@uni-bremen.de'>jranke@uni-bremen.de</a></p> + <a href="mailto:jranke@uni-bremen.de">jranke@uni-bremen.de</a></p> + </div> - <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://rdrr.io/r/utils/data.html'>data</a></span><span class='op'>(</span><span class='va'>massart97ex3</span><span class='op'>)</span> -<span class='va'>m</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, data <span class='op'>=</span> <span class='va'>massart97ex3</span><span class='op'>)</span> -<span class='fu'>calplot</span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span> -</div><div class='img'><img src='calplot.lm-1.png' alt='' width='700' height='433' /></div></pre> + <div id="ref-examples"> + <h2>Examples</h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">massart97ex3</span><span class="op">)</span></span> +<span class="r-in"><span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex3</span><span class="op">)</span></span> +<span class="r-in"><span class="fu">calplot</span><span class="op">(</span><span class="va">m</span><span class="op">)</span></span> +<span class="r-plt img"><img src="calplot.lm-1.png" alt="" width="700" height="433"></span> +</code></pre></div> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/din32645-1.png b/docs/reference/din32645-1.png Binary files differindex 27914e8..170a9ae 100644 --- a/docs/reference/din32645-1.png +++ b/docs/reference/din32645-1.png diff --git a/docs/reference/din32645.html b/docs/reference/din32645.html index b46103c..1c02f36 100644 --- a/docs/reference/din32645.html +++ b/docs/reference/din32645.html @@ -1,67 +1,12 @@ -<!-- 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>Calibration data from DIN 32645 — din32645 • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Calibration data from DIN 32645 — din32645" /> -<meta property="og:description" content="Sample dataset to test the package." /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Calibration data from DIN 32645 — din32645 • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Calibration data from DIN 32645 — din32645"><meta property="og:description" content="Sample dataset to test the package."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -72,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -93,25 +31,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Calibration data from DIN 32645</h1> @@ -123,14 +55,16 @@ <p>Sample dataset to test the package.</p> </div> - <pre class="usage"><span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span><span class='op'>(</span><span class='va'>din32645</span><span class='op'>)</span></pre> - - - <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">din32645</span><span class="op">)</span></code></pre></div> + </div> + <div id="format"> + <h2>Format</h2> <p>A dataframe containing 10 rows of x and y values.</p> - <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> - + </div> + <div id="references"> + <h2>References</h2> <p>DIN 32645 (equivalent to ISO 11843), Beuth Verlag, Berlin, 1994</p> <p>Dintest. Plugin for MS Excel for evaluations of calibration data. Written by Georg Schmitt, University of Heidelberg. Formerly available from @@ -138,69 +72,75 @@ <p>Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including detection and quantification capabilities (IUPAC Recommendations 1995). Analytica Chimica Acta 391, 105 - 126.</p> + </div> - <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='va'>m</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, data <span class='op'>=</span> <span class='va'>din32645</span><span class='op'>)</span> -<span class='fu'><a href='calplot.html'>calplot</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span> -</div><div class='img'><img src='din32645-1.png' alt='' width='700' height='433' /></div><div class='input'> -<span class='co'>## Prediction of x with confidence interval</span> -<span class='va'>prediction</span> <span class='op'><-</span> <span class='fu'><a href='inverse.predict.html'>inverse.predict</a></span><span class='op'>(</span><span class='va'>m</span>, <span class='fl'>3500</span>, alpha <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span> - -<span class='co'># This should give 0.07434 according to test data from Dintest, which </span> -<span class='co'># was collected from Procontrol 3.1 (isomehr GmbH) in this case</span> -<span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='va'>prediction</span><span class='op'>$</span><span class='va'>Confidence</span>, <span class='fl'>5</span><span class='op'>)</span> -</div><div class='output co'>#> [1] 0.07434</div><div class='input'> -<span class='co'>## Critical value:</span> -<span class='va'>crit</span> <span class='op'><-</span> <span class='fu'><a href='lod.html'>lod</a></span><span class='op'>(</span><span class='va'>m</span>, alpha <span class='op'>=</span> <span class='fl'>0.01</span>, beta <span class='op'>=</span> <span class='fl'>0.5</span><span class='op'>)</span> - -<span class='co'># According to DIN 32645, we should get 0.07 for the critical value</span> -<span class='co'># (decision limit, "Nachweisgrenze")</span> -<span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='va'>crit</span><span class='op'>$</span><span class='va'>x</span>, <span class='fl'>2</span><span class='op'>)</span> -</div><div class='output co'>#> [1] 0.07</div><div class='input'><span class='co'># and according to Dintest test data, we should get 0.0698 from</span> -<span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='va'>crit</span><span class='op'>$</span><span class='va'>x</span>, <span class='fl'>4</span><span class='op'>)</span> -</div><div class='output co'>#> [1] 0.0698</div><div class='input'> -<span class='co'>## Limit of detection (smallest detectable value given alpha and beta)</span> -<span class='co'># In German, the smallest detectable value is the "Erfassungsgrenze", and we</span> -<span class='co'># should get 0.14 according to DIN, which we achieve by using the method </span> -<span class='co'># described in it:</span> -<span class='va'>lod.din</span> <span class='op'><-</span> <span class='fu'><a href='lod.html'>lod</a></span><span class='op'>(</span><span class='va'>m</span>, alpha <span class='op'>=</span> <span class='fl'>0.01</span>, beta <span class='op'>=</span> <span class='fl'>0.01</span>, method <span class='op'>=</span> <span class='st'>"din"</span><span class='op'>)</span> -<span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='va'>lod.din</span><span class='op'>$</span><span class='va'>x</span>, <span class='fl'>2</span><span class='op'>)</span> -</div><div class='output co'>#> [1] 0.14</div><div class='input'> -<span class='co'>## Limit of quantification</span> -<span class='co'># This accords to the test data coming with the test data from Dintest again, </span> -<span class='co'># except for the last digits of the value cited for Procontrol 3.1 (0.2121)</span> -<span class='va'>loq</span> <span class='op'><-</span> <span class='fu'><a href='loq.html'>loq</a></span><span class='op'>(</span><span class='va'>m</span>, alpha <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span> -<span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='va'>loq</span><span class='op'>$</span><span class='va'>x</span>, <span class='fl'>4</span><span class='op'>)</span> -</div><div class='output co'>#> [1] 0.212</div><div class='input'> -<span class='co'># A similar value is obtained using the approximation </span> -<span class='co'># LQ = 3.04 * LC (Currie 1999, p. 120)</span> -<span class='fl'>3.04</span> <span class='op'>*</span> <span class='fu'><a href='lod.html'>lod</a></span><span class='op'>(</span><span class='va'>m</span>, alpha <span class='op'>=</span> <span class='fl'>0.01</span>, beta <span class='op'>=</span> <span class='fl'>0.5</span><span class='op'>)</span><span class='op'>$</span><span class='va'>x</span> -</div><div class='output co'>#> [1] 0.2122306</div></pre> + <div id="ref-examples"> + <h2>Examples</h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">din32645</span><span class="op">)</span></span> +<span class="r-in"><span class="fu"><a href="calplot.lm.html">calplot</a></span><span class="op">(</span><span class="va">m</span><span class="op">)</span></span> +<span class="r-plt img"><img src="din32645-1.png" alt="" width="700" height="433"></span> +<span class="r-in"></span> +<span class="r-in"><span class="co">## Prediction of x with confidence interval</span></span> +<span class="r-in"><span class="va">prediction</span> <span class="op"><-</span> <span class="fu"><a href="inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m</span>, <span class="fl">3500</span>, alpha <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># This should give 0.07434 according to test data from Dintest, which </span></span> +<span class="r-in"><span class="co"># was collected from Procontrol 3.1 (isomehr GmbH) in this case</span></span> +<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">prediction</span><span class="op">$</span><span class="va">Confidence</span>, <span class="fl">5</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.07434</span> +<span class="r-in"></span> +<span class="r-in"><span class="co">## Critical value:</span></span> +<span class="r-in"><span class="va">crit</span> <span class="op"><-</span> <span class="fu"><a href="lod.html">lod</a></span><span class="op">(</span><span class="va">m</span>, alpha <span class="op">=</span> <span class="fl">0.01</span>, beta <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># According to DIN 32645, we should get 0.07 for the critical value</span></span> +<span class="r-in"><span class="co"># (decision limit, "Nachweisgrenze")</span></span> +<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">crit</span><span class="op">$</span><span class="va">x</span>, <span class="fl">2</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.07</span> +<span class="r-in"><span class="co"># and according to Dintest test data, we should get 0.0698 from</span></span> +<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">crit</span><span class="op">$</span><span class="va">x</span>, <span class="fl">4</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.0698</span> +<span class="r-in"></span> +<span class="r-in"><span class="co">## Limit of detection (smallest detectable value given alpha and beta)</span></span> +<span class="r-in"><span class="co"># In German, the smallest detectable value is the "Erfassungsgrenze", and we</span></span> +<span class="r-in"><span class="co"># should get 0.14 according to DIN, which we achieve by using the method </span></span> +<span class="r-in"><span class="co"># described in it:</span></span> +<span class="r-in"><span class="va">lod.din</span> <span class="op"><-</span> <span class="fu"><a href="lod.html">lod</a></span><span class="op">(</span><span class="va">m</span>, alpha <span class="op">=</span> <span class="fl">0.01</span>, beta <span class="op">=</span> <span class="fl">0.01</span>, method <span class="op">=</span> <span class="st">"din"</span><span class="op">)</span></span> +<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">lod.din</span><span class="op">$</span><span class="va">x</span>, <span class="fl">2</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.14</span> +<span class="r-in"></span> +<span class="r-in"><span class="co">## Limit of quantification</span></span> +<span class="r-in"><span class="co"># This accords to the test data coming with the test data from Dintest again, </span></span> +<span class="r-in"><span class="co"># except for the last digits of the value cited for Procontrol 3.1 (0.2121)</span></span> +<span class="r-in"><span class="va">loq</span> <span class="op"><-</span> <span class="fu"><a href="loq.html">loq</a></span><span class="op">(</span><span class="va">m</span>, alpha <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span></span> +<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="va">loq</span><span class="op">$</span><span class="va">x</span>, <span class="fl">4</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.212</span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># A similar value is obtained using the approximation </span></span> +<span class="r-in"><span class="co"># LQ = 3.04 * LC (Currie 1999, p. 120)</span></span> +<span class="r-in"><span class="fl">3.04</span> <span class="op">*</span> <span class="fu"><a href="lod.html">lod</a></span><span class="op">(</span><span class="va">m</span>, alpha <span class="op">=</span> <span class="fl">0.01</span>, beta <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span><span class="op">$</span><span class="va">x</span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.2122306</span> +</code></pre></div> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/figures/README-calplot-1.png b/docs/reference/figures/README-calplot-1.png Binary files differnew file mode 100644 index 0000000..b71d326 --- /dev/null +++ b/docs/reference/figures/README-calplot-1.png diff --git a/docs/reference/index.html b/docs/reference/index.html index 8549a1d..3685007 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,66 +1,12 @@ -<!-- 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 reference • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Function reference" /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Function reference • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Function reference"><!-- 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]--> - - +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - </head> - - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-index"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -71,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -92,139 +31,90 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="contents col-md-9"> <div class="page-header"> <h1>Reference</h1> </div> - <table class="ref-index"> - - <colgroup> - - <col class="alias" /> - <col class="title" /> - </colgroup> - - <tbody> - <tr> - <th colspan="2"> - <h2 id="section-all-functions" class="hasAnchor"><a href="#section-all-functions" class="anchor"></a>All functions</h2> + <table class="ref-index"><colgroup><col class="alias"><col class="title"></colgroup><tbody><tr><th colspan="2"> + <h2 id="all-functions">All functions <a href="#all-functions" class="anchor" aria-hidden="true"></a></h2> <p class="section-desc"></p> </th> - </tr> - - - </tbody><tbody> - - - <tr> - - <td> + </tr></tbody><tbody><tr><td> <p><code><a href="calplot.lm.html">calplot()</a></code> </p> </td> <td><p>Plot calibration graphs from univariate linear models</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="din32645.html">din32645</a></code> </p> </td> <td><p>Calibration data from DIN 32645</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="inverse.predict.html">inverse.predict()</a></code> </p> </td> <td><p>Predict x from y for a linear calibration</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="lod.html">lod()</a></code> </p> </td> <td><p>Estimate a limit of detection (LOD)</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="loq.html">loq()</a></code> </p> </td> <td><p>Estimate a limit of quantification (LOQ)</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="massart97ex1.html">massart97ex1</a></code> </p> </td> <td><p>Calibration data from Massart et al. (1997), example 1</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="massart97ex3.html">massart97ex3</a></code> </p> </td> <td><p>Calibration data from Massart et al. (1997), example 3</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="rl95_cadmium.html">rl95_cadmium</a></code> </p> </td> <td><p>Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995)</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="rl95_toluene.html">rl95_toluene</a></code> </p> </td> <td><p>Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995)</p></td> - </tr><tr> - - <td> + </tr><tr><td> <p><code><a href="utstats14.html">utstats14</a></code> </p> </td> <td><p>Example data for calibration with replicates from University of Toronto</p></td> - </tr> - </tbody> - </table> - </div> + </tr></tbody></table></div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/inverse.predict.html b/docs/reference/inverse.predict.html index aece430..cb9fe98 100644 --- a/docs/reference/inverse.predict.html +++ b/docs/reference/inverse.predict.html @@ -1,46 +1,5 @@ -<!-- 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>Predict x from y for a linear calibration — inverse.predict • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Predict x from y for a linear calibration — inverse.predict" /> -<meta property="og:description" content="This function predicts x values using a univariate linear model that has been +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Predict x from y for a linear calibration — inverse.predict • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Predict x from y for a linear calibration — inverse.predict"><meta property="og:description" content="This function predicts x values using a univariate linear model that has been generated for the purpose of calibrating a measurement method. Prediction intervals are given at the specified confidence level. The calculation method was taken from Massart et al. (1997). In particular, @@ -49,28 +8,14 @@ weights that have been used to create the linear model, and at the same time providing the possibility to specify a precision in sample measurements differing from the precision in standard samples used for the calibration. - This is elaborated in the package vignette." /> - - - - -<!-- 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]> + This is elaborated in the package vignette."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -81,19 +26,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -102,25 +40,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Predict x from y for a linear calibration</h1> @@ -141,166 +73,160 @@ This is elaborated in the package vignette.</p> </div> - <pre class="usage"><span class='fu'>inverse.predict</span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>newdata</span>, <span class='va'>...</span>, - <span class='va'>ws</span>, alpha<span class='op'>=</span><span class='fl'>0.05</span>, var.s <span class='op'>=</span> <span class='st'>"auto"</span><span class='op'>)</span></pre> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">inverse.predict</span><span class="op">(</span><span class="va">object</span>, <span class="va">newdata</span>, <span class="va">...</span>, + <span class="va">ws</span>, alpha<span class="op">=</span><span class="fl">0.05</span>, var.s <span class="op">=</span> <span class="st">"auto"</span><span class="op">)</span></code></pre></div> + </div> - <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 univariate model object of class <code><a href='https://rdrr.io/r/stats/lm.html'>lm</a></code> or - <code><a href='https://rdrr.io/pkg/MASS/man/rlm.html'>rlm</a></code> - with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>.</p></td> - </tr> - <tr> - <th>newdata</th> - <td><p>A vector of observed y values for one sample.</p></td> - </tr> - <tr> - <th>...</th> - <td><p>Placeholder for further arguments that might be needed by - future implementations.</p></td> - </tr> - <tr> - <th>ws</th> - <td><p>The weight attributed to the sample. This argument is obligatory - if <code>object</code> has weights.</p></td> - </tr> - <tr> - <th>alpha</th> - <td><p>The error tolerance level for the confidence interval to be reported.</p></td> - </tr> - <tr> - <th>var.s</th> - <td><p>The estimated variance of the sample measurements. The default is to take + <div id="arguments"> + <h2>Arguments</h2> + <dl><dt>object</dt> +<dd><p>A univariate model object of class <code><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></code> or + <code><a href="https://rdrr.io/pkg/MASS/man/rlm.html" class="external-link">rlm</a></code> + with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>.</p></dd> +<dt>newdata</dt> +<dd><p>A vector of observed y values for one sample.</p></dd> +<dt>...</dt> +<dd><p>Placeholder for further arguments that might be needed by + future implementations.</p></dd> +<dt>ws</dt> +<dd><p>The weight attributed to the sample. This argument is obligatory + if <code>object</code> has weights.</p></dd> +<dt>alpha</dt> +<dd><p>The error tolerance level for the confidence interval to be reported.</p></dd> +<dt>var.s</dt> +<dd><p>The estimated variance of the sample measurements. The default is to take the residual standard error from the calibration and to adjust it using <code>ws</code>, if applicable. This means that <code>var.s</code> - overrides <code>ws</code>.</p></td> - </tr> - </table> - - <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - + overrides <code>ws</code>.</p></dd> +</dl></div> + <div id="value"> + <h2>Value</h2> <p>A list containing the predicted x value, its standard error and a confidence interval.</p> - <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> - + </div> + <div id="note"> + <h2>Note</h2> <p>The function was validated with examples 7 and 8 from Massart et al. (1997). Note that the behaviour of inverse.predict changed with chemCal version 0.2.1. Confidence intervals for x values obtained from calibrations with replicate measurements did not take the variation about the means into account. Please refer to the vignette for details.</p> - <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> - + </div> + <div id="references"> + <h2>References</h2> <p>Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J., Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, p. 200</p> + </div> - <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='co'># This is example 7 from Chapter 8 in Massart et al. (1997)</span> -<span class='va'>m</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, data <span class='op'>=</span> <span class='va'>massart97ex1</span><span class='op'>)</span> -<span class='fu'>inverse.predict</span><span class='op'>(</span><span class='va'>m</span>, <span class='fl'>15</span><span class='op'>)</span> <span class='co'># 6.1 +- 4.9</span> -</div><div class='output co'>#> $Prediction -#> [1] 6.09381 -#> -#> $`Standard Error` -#> [1] 1.767278 -#> -#> $Confidence -#> [1] 4.906751 -#> -#> $`Confidence Limits` -#> [1] 1.187059 11.000561 -#> </div><div class='input'><span class='fu'>inverse.predict</span><span class='op'>(</span><span class='va'>m</span>, <span class='fl'>90</span><span class='op'>)</span> <span class='co'># 43.9 +- 4.9</span> -</div><div class='output co'>#> $Prediction -#> [1] 43.93983 -#> -#> $`Standard Error` -#> [1] 1.767747 -#> -#> $Confidence -#> [1] 4.908053 -#> -#> $`Confidence Limits` -#> [1] 39.03178 48.84788 -#> </div><div class='input'><span class='fu'>inverse.predict</span><span class='op'>(</span><span class='va'>m</span>, <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span><span class='op'>(</span><span class='fl'>90</span>,<span class='fl'>5</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># 43.9 +- 3.2</span> -</div><div class='output co'>#> $Prediction -#> [1] 43.93983 -#> -#> $`Standard Error` -#> [1] 1.141204 -#> -#> $Confidence -#> [1] 3.168489 -#> -#> $`Confidence Limits` -#> [1] 40.77134 47.10832 -#> </div><div class='input'> -<span class='co'># For reproducing the results for replicate standard measurements in example 8,</span> -<span class='co'># we need to do the calibration on the means when using chemCal > 0.2</span> -<span class='va'>weights</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/with.html'>with</a></span><span class='op'>(</span><span class='va'>massart97ex3</span>, <span class='op'>{</span> - <span class='va'>yx</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/split.html'>split</a></span><span class='op'>(</span><span class='va'>y</span>, <span class='va'>x</span><span class='op'>)</span> - <span class='va'>ybar</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>sapply</a></span><span class='op'>(</span><span class='va'>yx</span>, <span class='va'>mean</span><span class='op'>)</span> - <span class='va'>s</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>sapply</a></span><span class='op'>(</span><span class='va'>yx</span>, <span class='va'>sd</span><span class='op'>)</span>, digits <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> - <span class='va'>w</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='fl'>1</span> <span class='op'>/</span> <span class='op'>(</span><span class='va'>s</span><span class='op'>^</span><span class='fl'>2</span><span class='op'>)</span>, digits <span class='op'>=</span> <span class='fl'>3</span><span class='op'>)</span> -<span class='op'>}</span><span class='op'>)</span> - -<span class='va'>massart97ex3.means</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/aggregate.html'>aggregate</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, <span class='va'>massart97ex3</span>, <span class='va'>mean</span><span class='op'>)</span> - -<span class='va'>m3.means</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, w <span class='op'>=</span> <span class='va'>weights</span>, data <span class='op'>=</span> <span class='va'>massart97ex3.means</span><span class='op'>)</span> - -<span class='fu'>inverse.predict</span><span class='op'>(</span><span class='va'>m3.means</span>, <span class='fl'>15</span>, ws <span class='op'>=</span> <span class='fl'>1.67</span><span class='op'>)</span> <span class='co'># 5.9 +- 2.5</span> -</div><div class='output co'>#> $Prediction -#> [1] 5.865367 -#> -#> $`Standard Error` -#> [1] 0.8926109 -#> -#> $Confidence -#> [1] 2.478285 -#> -#> $`Confidence Limits` -#> [1] 3.387082 8.343652 -#> </div><div class='input'><span class='fu'>inverse.predict</span><span class='op'>(</span><span class='va'>m3.means</span>, <span class='fl'>90</span>, ws <span class='op'>=</span> <span class='fl'>0.145</span><span class='op'>)</span> <span class='co'># 44.1 +- 7.9</span> -</div><div class='output co'>#> $Prediction -#> [1] 44.06025 -#> -#> $`Standard Error` -#> [1] 2.829162 -#> -#> $Confidence -#> [1] 7.855012 -#> -#> $`Confidence Limits` -#> [1] 36.20523 51.91526 -#> </div><div class='input'> -</div></pre> + <div id="ref-examples"> + <h2>Examples</h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="co"># This is example 7 from Chapter 8 in Massart et al. (1997)</span></span> +<span class="r-in"><span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex1</span><span class="op">)</span></span> +<span class="r-in"><span class="fu">inverse.predict</span><span class="op">(</span><span class="va">m</span>, <span class="fl">15</span><span class="op">)</span> <span class="co"># 6.1 +- 4.9</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 6.09381</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.767278</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 4.906751</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.187059 11.000561</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span class="fu">inverse.predict</span><span class="op">(</span><span class="va">m</span>, <span class="fl">90</span><span class="op">)</span> <span class="co"># 43.9 +- 4.9</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 43.93983</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.767747</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 4.908053</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 39.03178 48.84788</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span class="fu">inverse.predict</span><span class="op">(</span><span class="va">m</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">90</span>,<span class="fl">5</span><span class="op">)</span><span class="op">)</span> <span class="co"># 43.9 +- 3.2</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 43.93983</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.141204</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 3.168489</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 40.77134 47.10832</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># For reproducing the results for replicate standard measurements in example 8,</span></span> +<span class="r-in"><span class="co"># we need to do the calibration on the means when using chemCal > 0.2</span></span> +<span class="r-in"><span class="va">weights</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html" class="external-link">with</a></span><span class="op">(</span><span class="va">massart97ex3</span>, <span class="op">{</span></span> +<span class="r-in"> <span class="va">yx</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/split.html" class="external-link">split</a></span><span class="op">(</span><span class="va">y</span>, <span class="va">x</span><span class="op">)</span></span> +<span class="r-in"> <span class="va">ybar</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">mean</span><span class="op">)</span></span> +<span class="r-in"> <span class="va">s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">sd</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span> +<span class="r-in"> <span class="va">w</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fl">1</span> <span class="op">/</span> <span class="op">(</span><span class="va">s</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">3</span><span class="op">)</span></span> +<span class="r-in"><span class="op">}</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="va">massart97ex3.means</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/aggregate.html" class="external-link">aggregate</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, <span class="va">massart97ex3</span>, <span class="va">mean</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="va">m3.means</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, w <span class="op">=</span> <span class="va">weights</span>, data <span class="op">=</span> <span class="va">massart97ex3.means</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="fu">inverse.predict</span><span class="op">(</span><span class="va">m3.means</span>, <span class="fl">15</span>, ws <span class="op">=</span> <span class="fl">1.67</span><span class="op">)</span> <span class="co"># 5.9 +- 2.5</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 5.865367</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.8926109</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 2.478285</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 3.387082 8.343652</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span class="fu">inverse.predict</span><span class="op">(</span><span class="va">m3.means</span>, <span class="fl">90</span>, ws <span class="op">=</span> <span class="fl">0.145</span><span class="op">)</span> <span class="co"># 44.1 +- 7.9</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 44.06025</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 2.829162</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 7.855012</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 36.20523 51.91526</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +</code></pre></div> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/lod.html b/docs/reference/lod.html index 42fc533..a2d66ce 100644 --- a/docs/reference/lod.html +++ b/docs/reference/lod.html @@ -1,74 +1,19 @@ -<!-- 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>Estimate a limit of detection (LOD) — lod • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Estimate a limit of detection (LOD) — lod" /> -<meta property="og:description" content="The decision limit (German: Nachweisgrenze) is defined as the signal or +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Estimate a limit of detection (LOD) — lod • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Estimate a limit of detection (LOD) — lod"><meta property="og:description" content="The decision limit (German: Nachweisgrenze) is defined as the signal or analyte concentration that is significantly different from the blank signal with a first order error alpha (one-sided significance test). The detection limit, or more precise, the minimum detectable value (German: Erfassungsgrenze), is then defined as the signal or analyte concentration where the probability that the signal is not detected although the analyte is present (type II or false negative error), is beta (also a - one-sided significance test)." /> - - - - -<!-- 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]> + one-sided significance test)."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -79,19 +24,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -100,25 +38,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Estimate a limit of detection (LOD)</h1> @@ -137,62 +69,52 @@ one-sided significance test).</p> </div> - <pre class="usage"><span class='fu'>lod</span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span>, alpha <span class='op'>=</span> <span class='fl'>0.05</span>, beta <span class='op'>=</span> <span class='fl'>0.05</span>, method <span class='op'>=</span> <span class='st'>"default"</span>, tol <span class='op'>=</span> <span class='st'>"default"</span><span class='op'>)</span></pre> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">lod</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span>, alpha <span class="op">=</span> <span class="fl">0.05</span>, beta <span class="op">=</span> <span class="fl">0.05</span>, method <span class="op">=</span> <span class="st">"default"</span>, tol <span class="op">=</span> <span class="st">"default"</span><span class="op">)</span></code></pre></div> + </div> - <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 univariate model object of class <code><a href='https://rdrr.io/r/stats/lm.html'>lm</a></code> or - <code><a href='https://rdrr.io/pkg/MASS/man/rlm.html'>rlm</a></code> + <div id="arguments"> + <h2>Arguments</h2> + <dl><dt>object</dt> +<dd><p>A univariate model object of class <code><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></code> or + <code><a href="https://rdrr.io/pkg/MASS/man/rlm.html" class="external-link">rlm</a></code> with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>, - optionally from a weighted regression.</p></td> - </tr> - <tr> - <th>...</th> - <td><p>Placeholder for further arguments that might be needed by - future implementations.</p></td> - </tr> - <tr> - <th>alpha</th> - <td><p>The error tolerance for the decision limit (critical value).</p></td> - </tr> - <tr> - <th>beta</th> - <td><p>The error tolerance beta for the detection limit.</p></td> - </tr> - <tr> - <th>method</th> - <td><p>The “default” method uses a prediction interval at the LOD + optionally from a weighted regression.</p></dd> +<dt>...</dt> +<dd><p>Placeholder for further arguments that might be needed by + future implementations.</p></dd> +<dt>alpha</dt> +<dd><p>The error tolerance for the decision limit (critical value).</p></dd> +<dt>beta</dt> +<dd><p>The error tolerance beta for the detection limit.</p></dd> +<dt>method</dt> +<dd><p>The “default” method uses a prediction interval at the LOD for the estimation of the LOD, which obviously requires iteration. This is described for example in Massart, p. 432 ff. - The “din” method uses the prediction interval at - x = 0 as an approximation.</p></td> - </tr> - <tr> - <th>tol</th> - <td><p>When the “default” method is used, the default tolerance + The “din” method uses the prediction interval at + x = 0 as an approximation.</p></dd> +<dt>tol</dt> +<dd><p>When the “default” method is used, the default tolerance for the LOD on the x scale is the value of the smallest non-zero standard - divided by 1000. Can be set to a numeric value to override this.</p></td> - </tr> - </table> - - <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - + divided by 1000. Can be set to a numeric value to override this.</p></dd> +</dl></div> + <div id="value"> + <h2>Value</h2> <p>A list containig the corresponding x and y values of the estimated limit of detection of a model used for calibration.</p> - <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> - + </div> + <div id="note"> + <h2>Note</h2> <p>- The default values for alpha and beta are the ones recommended by IUPAC. - The estimation of the LOD in terms of the analyte amount/concentration xD from the LOD in the signal domain SD is done by simply inverting the calibration function (i.e. assuming a known calibration function). - The calculation of a LOD from weighted calibration models requires - a weights argument for the internally used <code><a href='https://rdrr.io/r/stats/predict.lm.html'>predict.lm</a></code> + a weights argument for the internally used <code><a href="https://rdrr.io/r/stats/predict.lm.html" class="external-link">predict.lm</a></code> function, which is currently not supported in R.</p> - <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> - + </div> + <div id="references"> + <h2>References</h2> <p>Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J., Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, Chapter 13.7.8</p> @@ -202,53 +124,55 @@ <p>Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including detection and quantification capabilities (IUPAC Recommendations 1995). Analytica Chimica Acta 391, 105 - 126.</p> - <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> - - <div class='dont-index'><p>Examples for <code><a href='din32645.html'>din32645</a></code></p></div> - - <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='va'>m</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, data <span class='op'>=</span> <span class='va'>din32645</span><span class='op'>)</span> -<span class='fu'>lod</span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 0.08655484 -#> -#> $y -#> [1] 3317.154 -#> </div><div class='input'> -<span class='co'># The critical value (decision limit, German Nachweisgrenze) can be obtained</span> -<span class='co'># by using beta = 0.5:</span> -<span class='fu'>lod</span><span class='op'>(</span><span class='va'>m</span>, alpha <span class='op'>=</span> <span class='fl'>0.01</span>, beta <span class='op'>=</span> <span class='fl'>0.5</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 0.0698127 -#> -#> $y -#> [1] 3155.393 -#> </div></pre> + </div> + <div id="see-also"> + <h2>See also</h2> + <div class="dont-index"><p>Examples for <code><a href="din32645.html">din32645</a></code></p></div> + </div> + + <div id="ref-examples"> + <h2>Examples</h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">din32645</span><span class="op">)</span></span> +<span class="r-in"><span class="fu">lod</span><span class="op">(</span><span class="va">m</span><span class="op">)</span> </span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.08655484</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 3317.154</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># The critical value (decision limit, German Nachweisgrenze) can be obtained</span></span> +<span class="r-in"><span class="co"># by using beta = 0.5:</span></span> +<span class="r-in"><span class="fu">lod</span><span class="op">(</span><span class="va">m</span>, alpha <span class="op">=</span> <span class="fl">0.01</span>, beta <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.0698127</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 3155.393</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +</code></pre></div> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/loq.html b/docs/reference/loq.html index 973b1ff..0960251 100644 --- a/docs/reference/loq.html +++ b/docs/reference/loq.html @@ -1,73 +1,18 @@ -<!-- 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>Estimate a limit of quantification (LOQ) — loq • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Estimate a limit of quantification (LOQ) — loq" /> -<meta property="og:description" content="The limit of quantification is the x value, where the relative error +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Estimate a limit of quantification (LOQ) — loq • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Estimate a limit of quantification (LOQ) — loq"><meta property="og:description" content="The limit of quantification is the x value, where the relative error of the quantification given the calibration model reaches a prespecified value 1/k. Thus, it is the solution of the equation $$L = k c(L)$$ where c(L) is half of the length of the confidence interval at the limit L (DIN 32645, equivalent to ISO 11843). c(L) is internally estimated by - inverse.predict, and L is obtained by iteration." /> - - - - -<!-- 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]> + inverse.predict, and L is obtained by iteration."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -78,19 +23,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -99,25 +37,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Estimate a limit of quantification (LOQ)</h1> @@ -132,119 +64,106 @@ $$L = k c(L)$$ where c(L) is half of the length of the confidence interval at the limit L (DIN 32645, equivalent to ISO 11843). c(L) is internally estimated by - <code><a href='inverse.predict.html'>inverse.predict</a></code>, and L is obtained by iteration.</p> + <code><a href="inverse.predict.html">inverse.predict</a></code>, and L is obtained by iteration.</p> </div> - <pre class="usage"><span class='fu'>loq</span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span>, alpha <span class='op'>=</span> <span class='fl'>0.05</span>, k <span class='op'>=</span> <span class='fl'>3</span>, n <span class='op'>=</span> <span class='fl'>1</span>, w.loq <span class='op'>=</span> <span class='st'>"auto"</span>, - var.loq <span class='op'>=</span> <span class='st'>"auto"</span>, tol <span class='op'>=</span> <span class='st'>"default"</span><span class='op'>)</span></pre> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">loq</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span>, alpha <span class="op">=</span> <span class="fl">0.05</span>, k <span class="op">=</span> <span class="fl">3</span>, n <span class="op">=</span> <span class="fl">1</span>, w.loq <span class="op">=</span> <span class="st">"auto"</span>, + var.loq <span class="op">=</span> <span class="st">"auto"</span>, tol <span class="op">=</span> <span class="st">"default"</span><span class="op">)</span></code></pre></div> + </div> - <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 univariate model object of class <code><a href='https://rdrr.io/r/stats/lm.html'>lm</a></code> or - <code><a href='https://rdrr.io/pkg/MASS/man/rlm.html'>rlm</a></code> + <div id="arguments"> + <h2>Arguments</h2> + <dl><dt>object</dt> +<dd><p>A univariate model object of class <code><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></code> or + <code><a href="https://rdrr.io/pkg/MASS/man/rlm.html" class="external-link">rlm</a></code> with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>, optionally from a weighted regression. If weights are specified in the model, either <code>w.loq</code> or <code>var.loq</code> have to - be specified.</p></td> - </tr> - <tr> - <th>alpha</th> - <td><p>The error tolerance for the prediction of x values in the calculation.</p></td> - </tr> - <tr> - <th>...</th> - <td><p>Placeholder for further arguments that might be needed by - future implementations.</p></td> - </tr> - <tr> - <th>k</th> - <td><p>The inverse of the maximum relative error tolerated at the - desired LOQ.</p></td> - </tr> - <tr> - <th>n</th> - <td><p>The number of replicate measurements for which the LOQ should be - specified.</p></td> - </tr> - <tr> - <th>w.loq</th> - <td><p>The weight that should be attributed to the LOQ. Defaults + be specified.</p></dd> +<dt>alpha</dt> +<dd><p>The error tolerance for the prediction of x values in the calculation.</p></dd> +<dt>...</dt> +<dd><p>Placeholder for further arguments that might be needed by + future implementations.</p></dd> +<dt>k</dt> +<dd><p>The inverse of the maximum relative error tolerated at the + desired LOQ.</p></dd> +<dt>n</dt> +<dd><p>The number of replicate measurements for which the LOQ should be + specified.</p></dd> +<dt>w.loq</dt> +<dd><p>The weight that should be attributed to the LOQ. Defaults to one for unweighted regression, and to the mean of the weights - for weighted regression. See <code><a href='massart97ex3.html'>massart97ex3</a></code> for + for weighted regression. See <code><a href="massart97ex3.html">massart97ex3</a></code> for an example how to take advantage of knowledge about the - variance function.</p></td> - </tr> - <tr> - <th>var.loq</th> - <td><p>The approximate variance at the LOQ. The default value is - calculated from the model.</p></td> - </tr> - <tr> - <th>tol</th> - <td><p>The default tolerance for the LOQ on the x scale is the value of the + variance function.</p></dd> +<dt>var.loq</dt> +<dd><p>The approximate variance at the LOQ. The default value is + calculated from the model.</p></dd> +<dt>tol</dt> +<dd><p>The default tolerance for the LOQ on the x scale is the value of the smallest non-zero standard divided by 1000. Can be set to a - numeric value to override this.</p></td> - </tr> - </table> - - <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - + numeric value to override this.</p></dd> +</dl></div> + <div id="value"> + <h2>Value</h2> <p>The estimated limit of quantification for a model used for calibration.</p> - <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> - + </div> + <div id="note"> + <h2>Note</h2> <p>- IUPAC recommends to base the LOQ on the standard deviation of the signal where x = 0. - The calculation of a LOQ based on weighted regression is non-standard and therefore not tested. Feedback is welcome.</p> - <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> - - <div class='dont-index'><p>Examples for <code><a href='din32645.html'>din32645</a></code></p></div> - - <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='va'>m</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, data <span class='op'>=</span> <span class='va'>massart97ex1</span><span class='op'>)</span> -<span class='fu'>loq</span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 13.97764 -#> -#> $y -#> [1] 30.6235 -#> </div><div class='input'> -<span class='co'># We can get better by using replicate measurements</span> -<span class='fu'>loq</span><span class='op'>(</span><span class='va'>m</span>, n <span class='op'>=</span> <span class='fl'>3</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 9.971963 -#> -#> $y -#> [1] 22.68539 -#> </div></pre> + </div> + <div id="see-also"> + <h2>See also</h2> + <div class="dont-index"><p>Examples for <code><a href="din32645.html">din32645</a></code></p></div> + </div> + + <div id="ref-examples"> + <h2>Examples</h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="va">m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex1</span><span class="op">)</span></span> +<span class="r-in"><span class="fu">loq</span><span class="op">(</span><span class="va">m</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 13.97764</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 30.6235</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># We can get better by using replicate measurements</span></span> +<span class="r-in"><span class="fu">loq</span><span class="op">(</span><span class="va">m</span>, n <span class="op">=</span> <span class="fl">3</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 9.971963</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 22.68539</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +</code></pre></div> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/massart97ex1.html b/docs/reference/massart97ex1.html index c82bf6f..e5dd85a 100644 --- a/docs/reference/massart97ex1.html +++ b/docs/reference/massart97ex1.html @@ -1,67 +1,12 @@ -<!-- 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>Calibration data from Massart et al. (1997), example 1 — massart97ex1 • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Calibration data from Massart et al. (1997), example 1 — massart97ex1" /> -<meta property="og:description" content="Sample dataset from p. 175 to test the package." /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Calibration data from Massart et al. (1997), example 1 — massart97ex1 • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Calibration data from Massart et al. (1997), example 1 — massart97ex1"><meta property="og:description" content="Sample dataset from p. 175 to test the package."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -72,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -93,25 +31,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Calibration data from Massart et al. (1997), example 1</h1> @@ -123,43 +55,42 @@ <p>Sample dataset from p. 175 to test the package.</p> </div> - <pre class="usage"><span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span><span class='op'>(</span><span class='va'>massart97ex1</span><span class='op'>)</span></pre> - - - <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">massart97ex1</span><span class="op">)</span></code></pre></div> + </div> + <div id="format"> + <h2>Format</h2> <p>A dataframe containing 6 observations of x and y data.</p> - <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2> - + </div> + <div id="source"> + <h2>Source</h2> <p>Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J., Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, Chapter 8.</p> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/massart97ex3.html b/docs/reference/massart97ex3.html index 4cbf7ce..4196882 100644 --- a/docs/reference/massart97ex3.html +++ b/docs/reference/massart97ex3.html @@ -1,67 +1,12 @@ -<!-- 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>Calibration data from Massart et al. (1997), example 3 — massart97ex3 • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Calibration data from Massart et al. (1997), example 3 — massart97ex3" /> -<meta property="og:description" content="Sample dataset from p. 188 to test the package." /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Calibration data from Massart et al. (1997), example 3 — massart97ex3 • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Calibration data from Massart et al. (1997), example 3 — massart97ex3"><meta property="og:description" content="Sample dataset from p. 188 to test the package."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -72,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -93,25 +31,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Calibration data from Massart et al. (1997), example 3</h1> @@ -123,117 +55,123 @@ <p>Sample dataset from p. 188 to test the package.</p> </div> - <pre class="usage"><span class='va'>massart97ex3</span></pre> - - - <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> + <div id="ref-usage"> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="va">massart97ex3</span></code></pre></div> + </div> + <div id="format"> + <h2>Format</h2> <p>A dataframe containing 6 levels of x values with 5 observations of y for each level.</p> - <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2> - + </div> + <div id="source"> + <h2>Source</h2> <p>Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J., Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, Chapter 8.</p> + </div> - <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='co'># For reproducing the results for replicate standard measurements in example 8,</span> -<span class='co'># we need to do the calibration on the means when using chemCal > 0.2</span> -<span class='va'>weights</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/with.html'>with</a></span><span class='op'>(</span><span class='va'>massart97ex3</span>, <span class='op'>{</span> - <span class='va'>yx</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/split.html'>split</a></span><span class='op'>(</span><span class='va'>y</span>, <span class='va'>x</span><span class='op'>)</span> - <span class='va'>ybar</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>sapply</a></span><span class='op'>(</span><span class='va'>yx</span>, <span class='va'>mean</span><span class='op'>)</span> - <span class='va'>s</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>sapply</a></span><span class='op'>(</span><span class='va'>yx</span>, <span class='va'>sd</span><span class='op'>)</span>, digits <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> - <span class='va'>w</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span><span class='op'>(</span><span class='fl'>1</span> <span class='op'>/</span> <span class='op'>(</span><span class='va'>s</span><span class='op'>^</span><span class='fl'>2</span><span class='op'>)</span>, digits <span class='op'>=</span> <span class='fl'>3</span><span class='op'>)</span> -<span class='op'>}</span><span class='op'>)</span> - -<span class='va'>massart97ex3.means</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/aggregate.html'>aggregate</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, <span class='va'>massart97ex3</span>, <span class='va'>mean</span><span class='op'>)</span> - -<span class='va'>m3.means</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, w <span class='op'>=</span> <span class='va'>weights</span>, data <span class='op'>=</span> <span class='va'>massart97ex3.means</span><span class='op'>)</span> - -<span class='co'># The following concords with the book p. 200</span> -<span class='fu'><a href='inverse.predict.html'>inverse.predict</a></span><span class='op'>(</span><span class='va'>m3.means</span>, <span class='fl'>15</span>, ws <span class='op'>=</span> <span class='fl'>1.67</span><span class='op'>)</span> <span class='co'># 5.9 +- 2.5</span> -</div><div class='output co'>#> $Prediction -#> [1] 5.865367 -#> -#> $`Standard Error` -#> [1] 0.8926109 -#> -#> $Confidence -#> [1] 2.478285 -#> -#> $`Confidence Limits` -#> [1] 3.387082 8.343652 -#> </div><div class='input'><span class='fu'><a href='inverse.predict.html'>inverse.predict</a></span><span class='op'>(</span><span class='va'>m3.means</span>, <span class='fl'>90</span>, ws <span class='op'>=</span> <span class='fl'>0.145</span><span class='op'>)</span> <span class='co'># 44.1 +- 7.9</span> -</div><div class='output co'>#> $Prediction -#> [1] 44.06025 -#> -#> $`Standard Error` -#> [1] 2.829162 -#> -#> $Confidence -#> [1] 7.855012 -#> -#> $`Confidence Limits` -#> [1] 36.20523 51.91526 -#> </div><div class='input'> -<span class='co'># The LOD is only calculated for models from unweighted regression</span> -<span class='co'># with this version of chemCal</span> -<span class='va'>m0</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span><span class='op'>(</span><span class='va'>y</span> <span class='op'>~</span> <span class='va'>x</span>, data <span class='op'>=</span> <span class='va'>massart97ex3</span><span class='op'>)</span> -<span class='fu'><a href='lod.html'>lod</a></span><span class='op'>(</span><span class='va'>m0</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 5.407085 -#> -#> $y -#> [1] 13.63911 -#> </div><div class='input'> -<span class='co'># Limit of quantification from unweighted regression</span> -<span class='fu'><a href='loq.html'>loq</a></span><span class='op'>(</span><span class='va'>m0</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 9.627349 -#> -#> $y -#> [1] 22.00246 -#> </div><div class='input'> -<span class='co'># For calculating the limit of quantification from a model from weighted</span> -<span class='co'># regression, we need to supply weights, internally used for inverse.predict</span> -<span class='co'># If we are not using a variance function, we can use the weight from</span> -<span class='co'># the above example as a first approximation (x = 15 is close to our</span> -<span class='co'># loq approx 14 from above).</span> -<span class='fu'><a href='loq.html'>loq</a></span><span class='op'>(</span><span class='va'>m3.means</span>, w.loq <span class='op'>=</span> <span class='fl'>1.67</span><span class='op'>)</span> -</div><div class='output co'>#> $x -#> [1] 7.346195 -#> -#> $y -#> [1] 17.90777 -#> </div><div class='input'><span class='co'># The weight for the loq should therefore be derived at x = 7.3 instead</span> -<span class='co'># of 15, but the graphical procedure of Massart (p. 201) to derive the </span> -<span class='co'># variances on which the weights are based is quite inaccurate anyway. </span> -</div></pre> + <div id="ref-examples"> + <h2>Examples</h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="co"># For reproducing the results for replicate standard measurements in example 8,</span></span> +<span class="r-in"><span class="co"># we need to do the calibration on the means when using chemCal > 0.2</span></span> +<span class="r-in"><span class="va">weights</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/with.html" class="external-link">with</a></span><span class="op">(</span><span class="va">massart97ex3</span>, <span class="op">{</span></span> +<span class="r-in"> <span class="va">yx</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/split.html" class="external-link">split</a></span><span class="op">(</span><span class="va">y</span>, <span class="va">x</span><span class="op">)</span></span> +<span class="r-in"> <span class="va">ybar</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">mean</span><span class="op">)</span></span> +<span class="r-in"> <span class="va">s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">yx</span>, <span class="va">sd</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span> +<span class="r-in"> <span class="va">w</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fl">1</span> <span class="op">/</span> <span class="op">(</span><span class="va">s</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>, digits <span class="op">=</span> <span class="fl">3</span><span class="op">)</span></span> +<span class="r-in"><span class="op">}</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="va">massart97ex3.means</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/aggregate.html" class="external-link">aggregate</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, <span class="va">massart97ex3</span>, <span class="va">mean</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="va">m3.means</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, w <span class="op">=</span> <span class="va">weights</span>, data <span class="op">=</span> <span class="va">massart97ex3.means</span><span class="op">)</span></span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># The following concords with the book p. 200</span></span> +<span class="r-in"><span class="fu"><a href="inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m3.means</span>, <span class="fl">15</span>, ws <span class="op">=</span> <span class="fl">1.67</span><span class="op">)</span> <span class="co"># 5.9 +- 2.5</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 5.865367</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.8926109</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 2.478285</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 3.387082 8.343652</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span class="fu"><a href="inverse.predict.html">inverse.predict</a></span><span class="op">(</span><span class="va">m3.means</span>, <span class="fl">90</span>, ws <span class="op">=</span> <span class="fl">0.145</span><span class="op">)</span> <span class="co"># 44.1 +- 7.9</span></span> +<span class="r-out co"><span class="r-pr">#></span> $Prediction</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 44.06025</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Standard Error`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 2.829162</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $Confidence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 7.855012</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $`Confidence Limits`</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 36.20523 51.91526</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># The LOD is only calculated for models from unweighted regression</span></span> +<span class="r-in"><span class="co"># with this version of chemCal</span></span> +<span class="r-in"><span class="va">m0</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">y</span> <span class="op">~</span> <span class="va">x</span>, data <span class="op">=</span> <span class="va">massart97ex3</span><span class="op">)</span> </span> +<span class="r-in"><span class="fu"><a href="lod.html">lod</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 5.407085</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 13.63911</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># Limit of quantification from unweighted regression</span></span> +<span class="r-in"><span class="fu"><a href="loq.html">loq</a></span><span class="op">(</span><span class="va">m0</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 9.627349</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 22.00246</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"></span> +<span class="r-in"><span class="co"># For calculating the limit of quantification from a model from weighted</span></span> +<span class="r-in"><span class="co"># regression, we need to supply weights, internally used for inverse.predict</span></span> +<span class="r-in"><span class="co"># If we are not using a variance function, we can use the weight from</span></span> +<span class="r-in"><span class="co"># the above example as a first approximation (x = 15 is close to our</span></span> +<span class="r-in"><span class="co"># loq approx 14 from above).</span></span> +<span class="r-in"><span class="fu"><a href="loq.html">loq</a></span><span class="op">(</span><span class="va">m3.means</span>, w.loq <span class="op">=</span> <span class="fl">1.67</span><span class="op">)</span></span> +<span class="r-out co"><span class="r-pr">#></span> $x</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 7.346195</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $y</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 17.90777</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span class="co"># The weight for the loq should therefore be derived at x = 7.3 instead</span></span> +<span class="r-in"><span class="co"># of 15, but the graphical procedure of Massart (p. 201) to derive the </span></span> +<span class="r-in"><span class="co"># variances on which the weights are based is quite inaccurate anyway. </span></span> +</code></pre></div> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/rl95_cadmium.html b/docs/reference/rl95_cadmium.html index 3b311ec..da9294d 100644 --- a/docs/reference/rl95_cadmium.html +++ b/docs/reference/rl95_cadmium.html @@ -1,67 +1,12 @@ -<!-- 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>Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995) — rl95_cadmium • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995) — rl95_cadmium" /> -<meta property="og:description" content="Dataset reproduced from Table 1 in Rocke and Lorenzato (1995)." /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995) — rl95_cadmium • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995) — rl95_cadmium"><meta property="og:description" content="Dataset reproduced from Table 1 in Rocke and Lorenzato (1995)."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -72,19 +17,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -93,25 +31,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995)</h1> @@ -124,41 +56,38 @@ </div> - - <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> - + <div id="format"> + <h2>Format</h2> <p>A dataframe containing four replicate observations for each of the six calibration standards.</p> - <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2> - + </div> + <div id="source"> + <h2>Source</h2> <p>Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for measurement error in analytical chemistry. Technometrics 37(2), 176-184.</p> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/rl95_toluene.html b/docs/reference/rl95_toluene.html index 6b2542b..fb071e1 100644 --- a/docs/reference/rl95_toluene.html +++ b/docs/reference/rl95_toluene.html @@ -1,69 +1,14 @@ -<!-- 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>Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995) — rl95_toluene • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995) — rl95_toluene" /> -<meta property="og:description" content="Dataset reproduced from Table 4 in Rocke and Lorenzato (1995). The toluene +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995) — rl95_toluene • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995) — rl95_toluene"><meta property="og:description" content="Dataset reproduced from Table 4 in Rocke and Lorenzato (1995). The toluene amount in the calibration samples is given in picograms per 100 µL. - Presumably this is the volume that was injected into the instrument." /> - - - - -<!-- 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]> + Presumably this is the volume that was injected into the instrument."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -74,19 +19,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -95,25 +33,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995)</h1> @@ -128,41 +60,38 @@ </div> - - <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> - + <div id="format"> + <h2>Format</h2> <p>A dataframe containing four replicate observations for each of the six calibration standards.</p> - <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2> - + </div> + <div id="source"> + <h2>Source</h2> <p>Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for measurement error in analytical chemistry. Technometrics 37(2), 176-184.</p> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/reference/utstats14.html b/docs/reference/utstats14.html index a2822fc..78d2604 100644 --- a/docs/reference/utstats14.html +++ b/docs/reference/utstats14.html @@ -1,68 +1,13 @@ -<!-- 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>Example data for calibration with replicates from University of Toronto — utstats14 • chemCal</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Example data for calibration with replicates from University of Toronto — utstats14" /> -<meta property="og:description" content="Dataset read into R from - https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/files/example14.xls." /> - - - - -<!-- 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]> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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>Example data for calibration with replicates from University of Toronto — utstats14 • chemCal</title><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Example data for calibration with replicates from University of Toronto — utstats14"><meta property="og:description" content="Dataset read into R from + https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/files/example14.xls."><!-- 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> +<![endif]--></head><body data-spy="scroll" data-target="#toc"> + - <body data-spy="scroll" data-target="#toc"> <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <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"> @@ -73,19 +18,12 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">chemCal</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">0.2.3</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../index.html"> - <span class="fas fa-home fa-lg"></span> - - </a> -</li> -<li> + <ul class="nav navbar-nav"><li> <a href="../articles/chemCal.html">Get started</a> </li> <li> @@ -94,25 +32,19 @@ <li> <a href="../news/index.html">Changelog</a> </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="https://github.com/jranke/chemCal/"> + </ul><ul class="nav navbar-nav navbar-right"><li> + <a href="https://github.com/jranke/chemCal/" class="external-link"> <span class="fab fa-github fa-lg"></span> </a> </li> - </ul> - - </div><!--/.nav-collapse --> + </ul></div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> - </header> - -<div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header"> <h1>Example data for calibration with replicates from University of Toronto</h1> @@ -122,46 +54,43 @@ <div class="ref-description"> <p>Dataset read into R from - <a href='https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/files/example14.xls'>https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/files/example14.xls</a>.</p> + <a href="https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/files/example14.xls" class="external-link">https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/files/example14.xls</a>.</p> </div> - - <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> - + <div id="format"> + <h2>Format</h2> <p>A tibble containing three replicate observations of the response for five calibration concentrations.</p> - <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2> - + </div> + <div id="source"> + <h2>Source</h2> <p>David Stone and Jon Ellis (2011) Statistics in Analytical Chemistry. Tutorial website maintained by the Departments of Chemistry, University of Toronto. - <a href='https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/index.html'>https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/index.html</a></p> + <a href="https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/index.html" class="external-link">https://sites.chem.utoronto.ca/chemistry/coursenotes/analsci/stats/index.html</a></p> + </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> + <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2> + </nav></div> </div> - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> + <footer><div class="copyright"> + <p></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p> </div> - </footer> - </div> + </footer></div> - </body> -</html> + + </body></html> diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..5d588da --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + <url> + <loc>/404.html</loc> + </url> + <url> + <loc>/articles/chemCal.html</loc> + </url> + <url> + <loc>/articles/index.html</loc> + </url> + <url> + <loc>/authors.html</loc> + </url> + <url> + <loc>/index.html</loc> + </url> + <url> + <loc>/news/index.html</loc> + </url> + <url> + <loc>/reference/calplot.lm.html</loc> + </url> + <url> + <loc>/reference/chemCal-package.html</loc> + </url> + <url> + <loc>/reference/din32645.html</loc> + </url> + <url> + <loc>/reference/index.html</loc> + </url> + <url> + <loc>/reference/inverse.predict.html</loc> + </url> + <url> + <loc>/reference/lod.html</loc> + </url> + <url> + <loc>/reference/loq.html</loc> + </url> + <url> + <loc>/reference/massart97ex1.html</loc> + </url> + <url> + <loc>/reference/massart97ex3.html</loc> + </url> + <url> + <loc>/reference/rl95_cadmium.html</loc> + </url> + <url> + <loc>/reference/rl95_toluene.html</loc> + </url> + <url> + <loc>/reference/utstats14.html</loc> + </url> +</urlset> |