aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2018-07-17 17:29:14 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2018-07-17 17:38:29 +0200
commit280d36230052de4f94e384648c1283031fbc9840 (patch)
treedf0ba9e07386b593cc396b8b6976210d42ee1a46 /docs
parente636c17f0d354a8e74546fc1469431dbe502dc76 (diff)
Fix inverse predictions for replicate measurements
For details, see NEWS.md
Diffstat (limited to 'docs')
-rw-r--r--docs/articles/chemCal.html209
-rw-r--r--docs/articles/chemCal_files/figure-html/unnamed-chunk-1-1.pngbin0 -> 92097 bytes
-rw-r--r--docs/articles/chemCal_files/figure-html/unnamed-chunk-2-1.pngbin0 -> 54434 bytes
-rw-r--r--docs/articles/chemCal_files/figure-html/unnamed-chunk-3-1.pngbin0 -> 54434 bytes
-rw-r--r--docs/articles/index.html54
-rw-r--r--docs/authors.html15
-rw-r--r--docs/index.html17
-rw-r--r--docs/news/index.html153
-rw-r--r--docs/pkgdown.yml3
-rw-r--r--docs/reference/calplot.lm.html19
-rw-r--r--docs/reference/chemCal-package.html15
-rw-r--r--docs/reference/din32645.html58
-rw-r--r--docs/reference/index.html27
-rw-r--r--docs/reference/inverse.predict.html61
-rw-r--r--docs/reference/lod.html26
-rw-r--r--docs/reference/loq.html31
-rw-r--r--docs/reference/massart97ex1.html15
-rw-r--r--docs/reference/massart97ex3.html63
-rw-r--r--docs/reference/rl95_toluene.html153
-rw-r--r--docs/reference/utstats14.html154
20 files changed, 948 insertions, 125 deletions
diff --git a/docs/articles/chemCal.html b/docs/articles/chemCal.html
new file mode 100644
index 0000000..29db7c8
--- /dev/null
+++ b/docs/articles/chemCal.html
@@ -0,0 +1,209 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html>
+<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>Introduction to chemCal • chemCal</title>
+<!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script><meta property="og:title" content="Introduction to chemCal">
+<meta property="og:description" content="">
+<meta name="twitter:card" content="summary">
+<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+</head>
+<body>
+ <div class="container template-article">
+ <header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">chemCal</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+<li>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
+</li>
+ </ul>
+<ul class="nav navbar-nav navbar-right"></ul>
+</div>
+<!--/.nav-collapse -->
+ </div>
+<!--/.container -->
+</div>
+<!--/.navbar -->
+
+
+ </header><div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header toc-ignore">
+ <h1>Introduction to chemCal</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2018-07-17</h4>
+
+
+ <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>
+<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="http://bugs.r-project.org/bugzilla3/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>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>
+<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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(chemCal)
+m0 &lt;-<span class="st"> </span><span class="kw">lm</span>(y <span class="op">~</span><span class="st"> </span>x, <span class="dt">data =</span> massart97ex3)
+<span class="kw"><a href="../reference/calplot.lm.html">calplot</a></span>(m0)</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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(m0, <span class="dt">which=</span><span class="dv">3</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"><pre class="sourceCode r"><code class="sourceCode r">weights &lt;-<span class="st"> </span><span class="kw">with</span>(massart97ex3, {
+ yx &lt;-<span class="st"> </span><span class="kw">split</span>(y, x)
+ ybar &lt;-<span class="st"> </span><span class="kw">sapply</span>(yx, mean)
+ s &lt;-<span class="st"> </span><span class="kw">round</span>(<span class="kw">sapply</span>(yx, sd), <span class="dt">digits =</span> <span class="dv">2</span>)
+ w &lt;-<span class="st"> </span><span class="kw">round</span>(<span class="dv">1</span> <span class="op">/</span><span class="st"> </span>(s<span class="op">^</span><span class="dv">2</span>), <span class="dt">digits =</span> <span class="dv">3</span>)
+})
+massart97ex3.means &lt;-<span class="st"> </span><span class="kw">aggregate</span>(y <span class="op">~</span><span class="st"> </span>x, massart97ex3, mean)
+
+m &lt;-<span class="st"> </span><span class="kw">lm</span>(y <span class="op">~</span><span class="st"> </span>x, <span class="dt">w =</span> weights, <span class="dt">data =</span> massart97ex3.means)</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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/inverse.predict.html">inverse.predict</a></span>(m, <span class="dv">15</span>, <span class="dt">ws=</span><span class="fl">1.67</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>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/inverse.predict.html">inverse.predict</a></span>(m, <span class="dv">90</span>, <span class="dt">ws =</span> <span class="fl">0.145</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>
+<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>
+<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>
+<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}} +
+ \frac{(\bar{y_s} - \bar{y_w})^2 \sum{w_i}}
+ {{b_1}^2 \left( \sum{w_i} \sum{w_i {x_i}^2} -
+ {\left( \sum{ w_i x_i } \right)}^2 \right) }}
+\end{equation}\]</span>
+<p>with</p>
+<span class="math display">\[\begin{equation}
+s_e = \sqrt{ \frac{\sum w_i (y_i - \hat{y_i})^2}{n - 2}}
+\end{equation}\]</span>
+<p>In chemCal version before 0.2, I interpreted <span class="math inline">\(w_i\)</span> to be the weight for calibration standard <span class="math inline">\(i\)</span>, <span class="math inline">\(y_i\)</span> to be the mean value observed for standard <span class="math inline">\(i\)</span>, and <span class="math inline">\(n\)</span> to be the number of calibration standards. With this implementation I was able to reproduce the examples given in the book. However, as noted above, I was made aware of the fact that this way of calculation does not take the variation of the y values about the means into account. Furthermore, I noticed that for the case of unweighted linear calibration with replicate standards, <code>inverse.predict</code> produced different results than <code>calibrate</code> from the <code>investr</code> package when using the Wald method.</p>
+<p>Both issues are now addressed in chemCal starting from version 0.2.1. Here, <span class="math inline">\(y_i\)</span> is calibration measurement <span class="math inline">\(i\)</span>, <span class="math inline">\(\hat{y_i}\)</span> is the estimated value for calibration measurement <span class="math inline">\(i\)</span> and <span class="math inline">\(n\)</span> is the total number of calibration measurements.</p>
+<p><span class="math inline">\(w_s\)</span> is the weight attributed to the sample <span class="math inline">\(s\)</span>, <span class="math inline">\(m\)</span> is the number of replicate measurements of sample <span class="math inline">\(s\)</span>, <span class="math inline">\(\bar{y_s}\)</span> is the mean response for the sample, <span class="math inline">\(\bar{y_w} = \frac{\sum{w_i y_i}}{\sum{w_i}}\)</span> is the weighted mean of responses <span class="math inline">\(y_i\)</span>, and <span class="math inline">\(x_i\)</span> is the given <span class="math inline">\(x\)</span> value for standard <span class="math inline">\(i\)</span>.</p>
+<p>The weight <span class="math inline">\(w_s\)</span> for the sample should be estimated or calculated in accordance to the weights used in the linear regression.</p>
+<p>I had also adjusted the above equation in order to be able to take a different precisions in standards and samples into account. In analogy to Equation 8.26 from I am using</p>
+<span class="math display">\[\begin{equation}
+s_{\hat{x_s}} = \frac{1}{b_1} \sqrt{\frac{{s_s}^2}{w_s m} +
+ {s_e}^2 \left( \frac{1}{\sum{w_i}} +
+ \frac{(\bar{y_s} - \bar{y_w})^2 \sum{w_i}}
+ {{b_1}^2 \left( \sum{w_i} \sum{w_i {x_i}^2} - {\left( \sum{ w_i x_i } \right)}^2 \right) } \right) }
+\end{equation}\]</span>
+<p>where I interpret <span class="math inline">\(\frac{{s_s}^2}{w_s}\)</span> as an estimator of the variance at location <span class="math inline">\(\hat{x_s}\)</span>, which can be replaced by a user-specified value using the argument <code>var.s</code> of the function <code>inverse.predict</code>.</p>
+<div id="refs" class="references">
+<div id="ref-amc89">
+<p>Analytical Methods Committee. 1989. “Robust Statistics — How Not to Reject Outliers. Part 1. Basic Concepts.” <em>The Analyst</em> 114: 1693–7.</p>
+</div>
+<div id="ref-castells00">
+<p>Castells, Reynaldo César, and Marcela Alejandra Castillo. 2000. “Systematic Errors: Detection and Correction by Means of Standard Calibration, Youden Calibration and Standard Additions Method in Conjunction with a Method Response Model.” <em>Analytica Chimica Acta</em> 423: 179–85.</p>
+</div>
+<div id="ref-currie97">
+<p>Currie, L. A. 1997. “Nomenclature in Evaluation of Analytical Methods Including Detection and Quantification Capabilities (IUPAC Recommendations 1995).” <em>Analytica Chimica Acta</em> 391: 105–26.</p>
+</div>
+<div id="ref-massart97">
+<p>Massart, D. L, B. G. M. Vandeginste, L. M. C. Buydens, S. De Jong, P. J. Lewi, and J Smeyers-Verbeke. 1997. <em>Handbook of Chemometrics and Qualimetrics: Part A</em>. Amsterdam: Elsevier.</p>
+</div>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div id="tocnav">
+ <h2 class="hasAnchor">
+<a href="#tocnav" class="anchor"></a>Contents</h2>
+ <ul class="nav nav-pills nav-stacked">
+<li><a href="#basic-calibration-functions">Basic calibration functions</a></li>
+ <li><a href="#usage">Usage</a></li>
+ <li><a href="#background-for-inverse-predict">Background for <code>inverse.predict</code></a></li>
+ </ul>
+</div>
+ </div>
+
+</div>
+
+
+ <footer><div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+</div>
+
+
+
+ </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
new file mode 100644
index 0000000..62c95ca
--- /dev/null
+++ b/docs/articles/chemCal_files/figure-html/unnamed-chunk-1-1.png
Binary files differ
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
new file mode 100644
index 0000000..464048c
--- /dev/null
+++ b/docs/articles/chemCal_files/figure-html/unnamed-chunk-2-1.png
Binary files differ
diff --git a/docs/articles/chemCal_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/chemCal_files/figure-html/unnamed-chunk-3-1.png
new file mode 100644
index 0000000..464048c
--- /dev/null
+++ b/docs/articles/chemCal_files/figure-html/unnamed-chunk-3-1.png
Binary files differ
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 2e993ac..a29b7c6 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -18,23 +18,35 @@
<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
+
+<!-- sticky kit -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
-<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>
+
+
+<meta property="og:title" content="Articles" />
+
+
+
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
+
+
</head>
<body>
- <div class="container template-vignette-index">
+ <div class="container template-article-index">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
@@ -44,21 +56,35 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="../index.html">chemCal</a>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">chemCal</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
+ </span>
</div>
+
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
+
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
@@ -66,17 +92,18 @@
</header>
- <div class="page-header">
- <h1>Vignette reference <small>version&nbsp;0.1-37.9001</small></h1>
-</div>
-
<div class="row">
- <div class="col-md-9">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Articles</h1>
+ </div>
+
<div class="section ">
<h3>All vignettes</h3>
<p class="section-desc"></p>
<ul>
+ <li><a href="chemCal.html">Introduction to chemCal</a></li>
</ul>
</div>
</div>
@@ -88,11 +115,14 @@
</div>
<div class="pkgdown">
- <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
</div>
</footer>
</div>
+
+
</body>
</html>
+
diff --git a/docs/authors.html b/docs/authors.html
index c9890cd..ea55846 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -58,17 +58,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="reference/index.html">Functions and data</a>
+ <a href="index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="news/index.html">Changelog</a>
</li>
</ul>
diff --git a/docs/index.html b/docs/index.html
index 6205aa1..b2233bb 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -35,17 +35,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="reference/index.html">Functions and data</a>
+ <a href="index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
@@ -73,7 +82,7 @@
<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>Report a bug at <br><a href="NA">NA</a>
+<li>Report a bug at <br><a href="http://github.com/jranke/chemCal/issues">http://​github.com/​jranke/​chemCal/​issues</a>
</li>
</ul>
</div>
diff --git a/docs/news/index.html b/docs/news/index.html
new file mode 100644
index 0000000..62ab315
--- /dev/null
+++ b/docs/news/index.html
@@ -0,0 +1,153 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Changelog • chemCal</title>
+
+<!-- jquery -->
+<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+<!-- Font Awesome icons -->
+<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
+
+<!-- sticky kit -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+<meta property="og:title" content="Changelog" />
+
+
+
+<!-- mathjax -->
+<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+ </head>
+
+ <body>
+ <div class="container template-news">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">chemCal</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Changelog <small></small></h1>
+
+ </div>
+
+ <div id="chemcal-0-2-1-2018-07-17" class="section level1">
+<h1 class="page-header">
+<a href="#chemcal-0-2-1-2018-07-17" class="anchor"></a>chemCal 0.2.1 (2018-07-17)<small> Unreleased </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</p></li>
+<li><p>Use testthat for tests to simplify further 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>
+</ul>
+</div>
+ <div id="chemcal-0-1-33-2014-04-24" class="section level1">
+<h1 class="page-header">
+<a href="#chemcal-0-1-33-2014-04-24" class="anchor"></a>chemCal 0.1-33 (2014-04-24)<small> Unreleased </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>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <div id="tocnav">
+ <h2>Contents</h2>
+ <ul class="nav nav-pills nav-stacked">
+ <li><a href="#chemcal-0-2-1-2018-07-17">0.2.1</a></li>
+ <li><a href="#chemcal-0-1-33-2014-04-24">0.1-33</a></li>
+ </ul>
+ </div>
+ </div>
+
+</div>
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+ </body>
+</html>
+
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 6e67788..3b5e371 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -1,5 +1,6 @@
pandoc: 1.19.2.4
pkgdown: 1.1.0
pkgdown_sha: ~
-articles: []
+articles:
+ chemCal: chemCal.html
diff --git a/docs/reference/calplot.lm.html b/docs/reference/calplot.lm.html
index 7eda066..a5b3bbb 100644
--- a/docs/reference/calplot.lm.html
+++ b/docs/reference/calplot.lm.html
@@ -62,17 +62,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -134,7 +143,7 @@
<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>lod</code> (see note below).</p></td>
+ used in <code><a href='lod.html'>lod</a></code> (see note below).</p></td>
</tr>
<tr>
<th>varfunc</th>
@@ -157,7 +166,7 @@
the internally used function <code>predict.lm</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>lod</code> values if the <code>lod()</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>
diff --git a/docs/reference/chemCal-package.html b/docs/reference/chemCal-package.html
index 8e6f39b..cadd357 100644
--- a/docs/reference/chemCal-package.html
+++ b/docs/reference/chemCal-package.html
@@ -61,17 +61,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
diff --git a/docs/reference/din32645.html b/docs/reference/din32645.html
index 03170e0..dbc9504 100644
--- a/docs/reference/din32645.html
+++ b/docs/reference/din32645.html
@@ -61,17 +61,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -118,33 +127,17 @@
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='no'>din32645</span>)
-<span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>din32645</span>)
-<span class='fu'>calplot</span>(<span class='no'>m</span>)</div><div class='img'><img src='din32645-1.png' alt='' width='700' height='433' /></div><div class='input'>
+ <pre class="examples"><div class='input'><span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>din32645</span>)
+<span class='fu'><a href='calplot.lm.html'>calplot</a></span>(<span class='no'>m</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='no'>prediction</span> <span class='kw'>&lt;-</span> <span class='fu'>inverse.predict</span>(<span class='no'>m</span>, <span class='fl'>3500</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>))</div><div class='output co'>#&gt; $Prediction
-#&gt; [1] 0.1054792
-#&gt;
-#&gt; $`Standard Error`
-#&gt; [1] 0.02215619
-#&gt;
-#&gt; $Confidence
-#&gt; [1] 0.07434261
-#&gt;
-#&gt; $`Confidence Limits`
-#&gt; [1] 0.03113656 0.17982178
-#&gt; </div><div class='input'>
+<span class='no'>prediction</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='inverse.predict.html'>inverse.predict</a></span>(<span class='no'>m</span>, <span class='fl'>3500</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</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'>round</span>(<span class='no'>prediction</span>$<span class='no'>Confidence</span>,<span class='fl'>5</span>)</div><div class='output co'>#&gt; [1] 0.07434</div><div class='input'>
+<span class='fu'>round</span>(<span class='no'>prediction</span>$<span class='no'>Confidence</span>, <span class='fl'>5</span>)</div><div class='output co'>#&gt; [1] 0.07434</div><div class='input'>
<span class='co'>## Critical value:</span>
-(<span class='no'>crit</span> <span class='kw'>&lt;-</span> <span class='fu'>lod</span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>beta</span> <span class='kw'>=</span> <span class='fl'>0.5</span>))</div><div class='output co'>#&gt; $x
-#&gt; [1] 0.0698127
-#&gt;
-#&gt; $y
-#&gt; 1
-#&gt; 3155.393
-#&gt; </div><div class='input'>
+<span class='no'>crit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='lod.html'>lod</a></span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>beta</span> <span class='kw'>=</span> <span class='fl'>0.5</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'>round</span>(<span class='no'>crit</span>$<span class='no'>x</span>, <span class='fl'>2</span>)</div><div class='output co'>#&gt; [1] 0.07</div><div class='input'><span class='co'># and according to Dintest test data, we should get 0.0698 from</span>
@@ -153,21 +146,16 @@
<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='no'>lod.din</span> <span class='kw'>&lt;-</span> <span class='fu'>lod</span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>beta</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"din"</span>)
+<span class='no'>lod.din</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='lod.html'>lod</a></span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>beta</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"din"</span>)
<span class='fu'>round</span>(<span class='no'>lod.din</span>$<span class='no'>x</span>, <span class='fl'>2</span>)</div><div class='output co'>#&gt; [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='no'>loq</span> <span class='kw'>&lt;-</span> <span class='fu'>loq</span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>))</div><div class='output co'>#&gt; $x
-#&gt; [1] 0.2119575
-#&gt;
-#&gt; $y
-#&gt; 1
-#&gt; 4528.787
-#&gt; </div><div class='input'><span class='fu'>round</span>(<span class='no'>loq</span>$<span class='no'>x</span>,<span class='fl'>4</span>)</div><div class='output co'>#&gt; [1] 0.212</div><div class='input'>
+<span class='no'>loq</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='loq.html'>loq</a></span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>)
+<span class='fu'>round</span>(<span class='no'>loq</span>$<span class='no'>x</span>, <span class='fl'>4</span>)</div><div class='output co'>#&gt; [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='fu'>lod</span>(<span class='no'>m</span>,<span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>beta</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)$<span class='no'>x</span></div><div class='output co'>#&gt; [1] 0.2122306</div></pre>
+<span class='fl'>3.04</span> * <span class='fu'><a href='lod.html'>lod</a></span>(<span class='no'>m</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, <span class='kw'>beta</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)$<span class='no'>x</span></div><div class='output co'>#&gt; [1] 0.2122306</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
diff --git a/docs/reference/index.html b/docs/reference/index.html
index ce4f346..d314ec2 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -58,17 +58,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -152,6 +161,18 @@
<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>
+ <p><code><a href="rl95_toluene.html">rl95_toluene</a></code> </p>
+ </td>
+ <td><p>Toluene amounts by GC/MS as reported by Rocke and Lorenzato (1995)</p></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>
diff --git a/docs/reference/inverse.predict.html b/docs/reference/inverse.predict.html
index 672e322..b107154 100644
--- a/docs/reference/inverse.predict.html
+++ b/docs/reference/inverse.predict.html
@@ -70,17 +70,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -164,7 +173,11 @@
<h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
- <p>The function was validated with examples 7 and 8 from Massart et al. (1997).</p>
+ <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>
@@ -175,7 +188,6 @@
<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='fu'>data</span>(<span class='no'>massart97ex1</span>)
<span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>massart97ex1</span>)
<span class='fu'>inverse.predict</span>(<span class='no'>m</span>, <span class='fl'>15</span>) <span class='co'># 6.1 +- 4.9</span></div><div class='output co'>#&gt; $Prediction
#&gt; [1] 6.09381
@@ -210,7 +222,44 @@
#&gt;
#&gt; $`Confidence Limits`
#&gt; [1] 40.77134 47.10832
-#&gt; </div></pre>
+#&gt; </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 &gt; 0.2</span>
+<span class='no'>weights</span> <span class='kw'>&lt;-</span> <span class='fu'>with</span>(<span class='no'>massart97ex3</span>, {
+ <span class='no'>yx</span> <span class='kw'>&lt;-</span> <span class='fu'>split</span>(<span class='no'>y</span>, <span class='no'>x</span>)
+ <span class='no'>ybar</span> <span class='kw'>&lt;-</span> <span class='fu'>sapply</span>(<span class='no'>yx</span>, <span class='no'>mean</span>)
+ <span class='no'>s</span> <span class='kw'>&lt;-</span> <span class='fu'>round</span>(<span class='fu'>sapply</span>(<span class='no'>yx</span>, <span class='no'>sd</span>), <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>2</span>)
+ <span class='no'>w</span> <span class='kw'>&lt;-</span> <span class='fu'>round</span>(<span class='fl'>1</span> / (<span class='no'>s</span>^<span class='fl'>2</span>), <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>3</span>)
+})
+
+<span class='no'>massart97ex3.means</span> <span class='kw'>&lt;-</span> <span class='fu'>aggregate</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='no'>massart97ex3</span>, <span class='no'>mean</span>)
+
+<span class='no'>m3.means</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>w</span> <span class='kw'>=</span> <span class='no'>weights</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>massart97ex3.means</span>)
+
+<span class='fu'>inverse.predict</span>(<span class='no'>m3.means</span>, <span class='fl'>15</span>, <span class='kw'>ws</span> <span class='kw'>=</span> <span class='fl'>1.67</span>) <span class='co'># 5.9 +- 2.5</span></div><div class='output co'>#&gt; $Prediction
+#&gt; [1] 5.865367
+#&gt;
+#&gt; $`Standard Error`
+#&gt; [1] 0.8926109
+#&gt;
+#&gt; $Confidence
+#&gt; [1] 2.478285
+#&gt;
+#&gt; $`Confidence Limits`
+#&gt; [1] 3.387082 8.343652
+#&gt; </div><div class='input'><span class='fu'>inverse.predict</span>(<span class='no'>m3.means</span>, <span class='fl'>90</span>, <span class='kw'>ws</span> <span class='kw'>=</span> <span class='fl'>0.145</span>) <span class='co'># 44.1 +- 7.9</span></div><div class='output co'>#&gt; $Prediction
+#&gt; [1] 44.06025
+#&gt;
+#&gt; $`Standard Error`
+#&gt; [1] 2.829162
+#&gt;
+#&gt; $Confidence
+#&gt; [1] 7.855012
+#&gt;
+#&gt; $`Confidence Limits`
+#&gt; [1] 36.20523 51.91526
+#&gt; </div><div class='input'>
+</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
diff --git a/docs/reference/lod.html b/docs/reference/lod.html
index 7519f19..b3d9574 100644
--- a/docs/reference/lod.html
+++ b/docs/reference/lod.html
@@ -68,17 +68,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -184,18 +193,16 @@
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
- <div class='dont-index'><p>Examples for <code>din32645</code></p></div>
+ <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='fu'>data</span>(<span class='no'>din32645</span>)
-<span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>din32645</span>)
+ <pre class="examples"><div class='input'><span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>din32645</span>)
<span class='fu'>lod</span>(<span class='no'>m</span>)</div><div class='output co'>#&gt; $x
#&gt; [1] 0.08655484
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 3317.154
+#&gt; [1] 3317.154
#&gt; </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>
@@ -203,8 +210,7 @@
#&gt; [1] 0.0698127
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 3155.393
+#&gt; [1] 3155.393
#&gt; </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
diff --git a/docs/reference/loq.html b/docs/reference/loq.html
index 09567db..eee0925 100644
--- a/docs/reference/loq.html
+++ b/docs/reference/loq.html
@@ -67,17 +67,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -108,7 +117,7 @@
$$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>inverse.predict</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>
@@ -150,7 +159,7 @@
<th>w.loq</th>
<td><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>massart97ex3</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>
@@ -180,27 +189,23 @@
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
- <div class='dont-index'><p>Examples for <code>din32645</code></p></div>
+ <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='fu'>data</span>(<span class='no'>massart97ex3</span>)
-<span class='fu'>attach</span>(<span class='no'>massart97ex3</span>)
-<span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>)
+ <pre class="examples"><div class='input'><span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>massart97ex1</span>)
<span class='fu'>loq</span>(<span class='no'>m</span>)</div><div class='output co'>#&gt; $x
#&gt; [1] 13.97764
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 30.6235
+#&gt; [1] 30.6235
#&gt; </div><div class='input'>
<span class='co'># We can get better by using replicate measurements</span>
<span class='fu'>loq</span>(<span class='no'>m</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>3</span>)</div><div class='output co'>#&gt; $x
#&gt; [1] 9.971963
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 22.68539
+#&gt; [1] 22.68539
#&gt; </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
diff --git a/docs/reference/massart97ex1.html b/docs/reference/massart97ex1.html
index ddd1ce1..844023f 100644
--- a/docs/reference/massart97ex1.html
+++ b/docs/reference/massart97ex1.html
@@ -61,17 +61,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
diff --git a/docs/reference/massart97ex3.html b/docs/reference/massart97ex3.html
index 434fc7b..e9fa06a 100644
--- a/docs/reference/massart97ex3.html
+++ b/docs/reference/massart97ex3.html
@@ -61,17 +61,26 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">chemCal</a>
- <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.1.37.9001</span>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
- <a href="../reference/index.html">Functions and data</a>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
</li>
<li>
- <a href="../articles/chemCal.pdf">Short manual (pdf)</a>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
</li>
</ul>
@@ -100,7 +109,7 @@
</div>
- <pre class="usage"><span class='fu'>data</span>(<span class='no'>massart97ex3</span>)</pre>
+ <pre class="usage"><span class='no'>massart97ex3</span></pre>
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
@@ -115,18 +124,21 @@
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='no'>massart97ex3</span>)
-<span class='fu'>attach</span>(<span class='no'>massart97ex3</span>)</div><div class='output co'>#&gt; <span class='message'>The following objects are masked from massart97ex3 (pos = 3):</span>
-#&gt; <span class='message'></span>
-#&gt; <span class='message'> x, y</span></div><div class='input'><span class='no'>yx</span> <span class='kw'>&lt;-</span> <span class='fu'>split</span>(<span class='no'>y</span>, <span class='no'>x</span>)
-<span class='no'>ybar</span> <span class='kw'>&lt;-</span> <span class='fu'>sapply</span>(<span class='no'>yx</span>, <span class='no'>mean</span>)
-<span class='no'>s</span> <span class='kw'>&lt;-</span> <span class='fu'>round</span>(<span class='fu'>sapply</span>(<span class='no'>yx</span>, <span class='no'>sd</span>), <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>2</span>)
-<span class='no'>w</span> <span class='kw'>&lt;-</span> <span class='fu'>round</span>(<span class='fl'>1</span> / (<span class='no'>s</span>^<span class='fl'>2</span>), <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>3</span>)
-<span class='no'>weights</span> <span class='kw'>&lt;-</span> <span class='no'>w</span>[<span class='fu'>factor</span>(<span class='no'>x</span>)]
-<span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>w</span> <span class='kw'>=</span> <span class='no'>weights</span>)
-<span class='fu'>calplot</span>(<span class='no'>m</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Assuming constant prediction variance even though model fit is weighted</span></div><div class='img'><img src='massart97ex3-1.png' alt='' width='700' height='433' /></div><div class='input'>
+ <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 &gt; 0.2</span>
+<span class='no'>weights</span> <span class='kw'>&lt;-</span> <span class='fu'>with</span>(<span class='no'>massart97ex3</span>, {
+ <span class='no'>yx</span> <span class='kw'>&lt;-</span> <span class='fu'>split</span>(<span class='no'>y</span>, <span class='no'>x</span>)
+ <span class='no'>ybar</span> <span class='kw'>&lt;-</span> <span class='fu'>sapply</span>(<span class='no'>yx</span>, <span class='no'>mean</span>)
+ <span class='no'>s</span> <span class='kw'>&lt;-</span> <span class='fu'>round</span>(<span class='fu'>sapply</span>(<span class='no'>yx</span>, <span class='no'>sd</span>), <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>2</span>)
+ <span class='no'>w</span> <span class='kw'>&lt;-</span> <span class='fu'>round</span>(<span class='fl'>1</span> / (<span class='no'>s</span>^<span class='fl'>2</span>), <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>3</span>)
+})
+
+<span class='no'>massart97ex3.means</span> <span class='kw'>&lt;-</span> <span class='fu'>aggregate</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='no'>massart97ex3</span>, <span class='no'>mean</span>)
+
+<span class='no'>m3.means</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>w</span> <span class='kw'>=</span> <span class='no'>weights</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>massart97ex3.means</span>)
+
<span class='co'># The following concords with the book p. 200</span>
-<span class='fu'>inverse.predict</span>(<span class='no'>m</span>, <span class='fl'>15</span>, <span class='kw'>ws</span> <span class='kw'>=</span> <span class='fl'>1.67</span>) <span class='co'># 5.9 +- 2.5</span></div><div class='output co'>#&gt; $Prediction
+<span class='fu'><a href='inverse.predict.html'>inverse.predict</a></span>(<span class='no'>m3.means</span>, <span class='fl'>15</span>, <span class='kw'>ws</span> <span class='kw'>=</span> <span class='fl'>1.67</span>) <span class='co'># 5.9 +- 2.5</span></div><div class='output co'>#&gt; $Prediction
#&gt; [1] 5.865367
#&gt;
#&gt; $`Standard Error`
@@ -137,7 +149,7 @@
#&gt;
#&gt; $`Confidence Limits`
#&gt; [1] 3.387082 8.343652
-#&gt; </div><div class='input'><span class='fu'>inverse.predict</span>(<span class='no'>m</span>, <span class='fl'>90</span>, <span class='kw'>ws</span> <span class='kw'>=</span> <span class='fl'>0.145</span>) <span class='co'># 44.1 +- 7.9</span></div><div class='output co'>#&gt; $Prediction
+#&gt; </div><div class='input'><span class='fu'><a href='inverse.predict.html'>inverse.predict</a></span>(<span class='no'>m3.means</span>, <span class='fl'>90</span>, <span class='kw'>ws</span> <span class='kw'>=</span> <span class='fl'>0.145</span>) <span class='co'># 44.1 +- 7.9</span></div><div class='output co'>#&gt; $Prediction
#&gt; [1] 44.06025
#&gt;
#&gt; $`Standard Error`
@@ -151,33 +163,30 @@
#&gt; </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='no'>m0</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>)
-<span class='fu'>lod</span>(<span class='no'>m0</span>)</div><div class='output co'>#&gt; $x
+<span class='no'>m0</span> <span class='kw'>&lt;-</span> <span class='fu'>lm</span>(<span class='no'>y</span> ~ <span class='no'>x</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>massart97ex3</span>)
+<span class='fu'><a href='lod.html'>lod</a></span>(<span class='no'>m0</span>)</div><div class='output co'>#&gt; $x
#&gt; [1] 5.407085
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 13.63911
+#&gt; [1] 13.63911
#&gt; </div><div class='input'>
<span class='co'># Limit of quantification from unweighted regression</span>
-<span class='fu'>loq</span>(<span class='no'>m0</span>)</div><div class='output co'>#&gt; $x
-#&gt; [1] 13.97764
+<span class='fu'><a href='loq.html'>loq</a></span>(<span class='no'>m0</span>)</div><div class='output co'>#&gt; $x
+#&gt; [1] 9.627349
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 30.6235
+#&gt; [1] 22.00246
#&gt; </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'>loq</span>(<span class='no'>m</span>, <span class='kw'>w.loq</span> <span class='kw'>=</span> <span class='fl'>1.67</span>)</div><div class='output co'>#&gt; $x
+<span class='fu'><a href='loq.html'>loq</a></span>(<span class='no'>m3.means</span>, <span class='kw'>w.loq</span> <span class='kw'>=</span> <span class='fl'>1.67</span>)</div><div class='output co'>#&gt; $x
#&gt; [1] 7.346195
#&gt;
#&gt; $y
-#&gt; 1
-#&gt; 17.90777
+#&gt; [1] 17.90777
#&gt; </div><div class='input'># The weight for the loq should therefore be derived at x = 7.3 instead
# of 15, but the graphical procedure of Massart (p. 201) to derive the
# variances on which the weights are based is quite inaccurate anyway.
diff --git a/docs/reference/rl95_toluene.html b/docs/reference/rl95_toluene.html
new file mode 100644
index 0000000..b252760
--- /dev/null
+++ b/docs/reference/rl95_toluene.html
@@ -0,0 +1,153 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Toluene amounts by GC/MS as reported by Rocke and Lorenzato (1995) — rl95_toluene • chemCal</title>
+
+<!-- jquery -->
+<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+<!-- Font Awesome icons -->
+<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
+
+<!-- sticky kit -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+<meta property="og:title" content="Toluene amounts 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)." />
+<meta name="twitter:card" content="summary" />
+
+
+
+<!-- mathjax -->
+<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+ </head>
+
+ <body>
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">chemCal</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Toluene amounts by GC/MS as reported by Rocke and Lorenzato (1995)</h1>
+
+ <div class="hidden name"><code>rl95_toluene.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+
+ <p>Dataset reproduced from Table 4 in Rocke and Lorenzato (1995).</p>
+
+ </div>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>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>
+
+ <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 class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <h2>Contents</h2>
+ <ul class="nav nav-pills nav-stacked">
+
+ <li><a href="#format">Format</a></li>
+
+ <li><a href="#source">Source</a></li>
+ </ul>
+
+ </div>
+</div>
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+ </body>
+</html>
+
diff --git a/docs/reference/utstats14.html b/docs/reference/utstats14.html
new file mode 100644
index 0000000..c16955f
--- /dev/null
+++ b/docs/reference/utstats14.html
@@ -0,0 +1,154 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Example data for calibration with replicates from University of Toronto — utstats14 • chemCal</title>
+
+<!-- jquery -->
+<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+<!-- Font Awesome icons -->
+<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script>
+
+<!-- sticky kit -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+<meta property="og:title" content="Example data for calibration with replicates from University of Toronto — utstats14" />
+
+<meta property="og:description" content="Dataset read into R from http://www.chem.utoronto.ca/coursenotes/analsci/stats/files/example14.xls." />
+<meta name="twitter:card" content="summary" />
+
+
+
+<!-- mathjax -->
+<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+ </head>
+
+ <body>
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">chemCal</a>
+ <span class="label label-default" data-toggle="tooltip" data-placement="bottom" title="Released package">0.2.1</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../index.html">
+ <span class="fa fa-home fa-lg"></span>
+
+ </a>
+</li>
+<li>
+ <a href="../articles/chemCal.html">Get started</a>
+</li>
+<li>
+ <a href="../reference/index.html">Reference</a>
+</li>
+<li>
+ <a href="../news/index.html">Changelog</a>
+</li>
+ </ul>
+
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Example data for calibration with replicates from University of Toronto</h1>
+
+ <div class="hidden name"><code>utstats14.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+
+ <p>Dataset read into R from <a href='http://www.chem.utoronto.ca/coursenotes/analsci/stats/files/example14.xls'>http://www.chem.utoronto.ca/coursenotes/analsci/stats/files/example14.xls</a>.</p>
+
+ </div>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>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>
+
+ <p>David Stone and Jon Ellis (2011) Statistics in Analytical Chemistry. Tutorial website
+ maintained by the Departments of Chemistry, University of Toronto.
+ <a href='http://www.chem.utoronto.ca/coursenotes/analsci/stats/index.html'>http://www.chem.utoronto.ca/coursenotes/analsci/stats/index.html</a></p>
+
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
+ <h2>Contents</h2>
+ <ul class="nav nav-pills nav-stacked">
+
+ <li><a href="#format">Format</a></li>
+
+ <li><a href="#source">Source</a></li>
+ </ul>
+
+ </div>
+</div>
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+ </body>
+</html>
+

Contact - Imprint