diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2018-07-17 17:29:14 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2018-07-17 17:38:29 +0200 |
commit | 280d36230052de4f94e384648c1283031fbc9840 (patch) | |
tree | df0ba9e07386b593cc396b8b6976210d42ee1a46 /docs/reference/din32645.html | |
parent | e636c17f0d354a8e74546fc1469431dbe502dc76 (diff) |
Fix inverse predictions for replicate measurements
For details, see NEWS.md
Diffstat (limited to 'docs/reference/din32645.html')
-rw-r--r-- | docs/reference/din32645.html | 58 |
1 files changed, 23 insertions, 35 deletions
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'><-</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'><-</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'><-</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'>#> $Prediction -#> [1] 0.1054792 -#> -#> $`Standard Error` -#> [1] 0.02215619 -#> -#> $Confidence -#> [1] 0.07434261 -#> -#> $`Confidence Limits` -#> [1] 0.03113656 0.17982178 -#> </div><div class='input'> +<span class='no'>prediction</span> <span class='kw'><-</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'>#> [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'>#> [1] 0.07434</div><div class='input'> <span class='co'>## Critical value:</span> -(<span class='no'>crit</span> <span class='kw'><-</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'>#> $x -#> [1] 0.0698127 -#> -#> $y -#> 1 -#> 3155.393 -#> </div><div class='input'> +<span class='no'>crit</span> <span class='kw'><-</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'>#> [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'><-</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'><-</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'>#> [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'><-</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'>#> $x -#> [1] 0.2119575 -#> -#> $y -#> 1 -#> 4528.787 -#> </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'>#> [1] 0.212</div><div class='input'> +<span class='no'>loq</span> <span class='kw'><-</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'>#> [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'>#> [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'>#> [1] 0.2122306</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> |