<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>calplot. chemCal 0.1-37</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="
Johannes Ranke
<a href='mailto:jranke@uni-bremen.de'>jranke@uni-bremen.de</a>
<a href = 'http://www.uft.uni-bremen.de/chemie/ranke'>http://www.uft.uni-bremen.de/chemie/ranke</a>
">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="css/highlight.css" rel="stylesheet">
<link href="css/staticdocs.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="index.html">chemCal 0.1-37</a>
<div class="nav">
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li><a href="reference.html">Reference</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<header>
</header>
<h1>Plot calibration graphs from univariate linear models</h1>
<div class="row">
<div class="span8">
<h2>Usage</h2>
<pre><span class="functioncall"><a href='calplot.lm.html'>calplot</a></span><span class="keyword">(</span><span class="symbol">object</span><span class="keyword">,</span> <span class="argument">xlim</span> <span class="argument">=</span> <span class="functioncall"><a href='http://www.rdocumentation.org/packages/base/topics/c'>c</a></span><span class="keyword">(</span><span class="string">"auto"</span><span class="keyword">,</span> <span class="string">"auto"</span><span class="keyword">)</span><span class="keyword">,</span> <span class="argument">ylim</span> <span class="argument">=</span> <span class="functioncall"><a href='http://www.rdocumentation.org/packages/base/topics/c'>c</a></span><span class="keyword">(</span><span class="string">"auto"</span><span class="keyword">,</span> <span class="string">"auto"</span><span class="keyword">)</span><span class="keyword">,</span>
<span class="argument">xlab</span> <span class="argument">=</span> <span class="string">"Concentration"</span><span class="keyword">,</span> <span class="argument">ylab</span> <span class="argument">=</span> <span class="string">"Response"</span><span class="keyword">,</span> <span class="argument">alpha</span><span class="argument">=</span><span class="number">0.05</span><span class="keyword">,</span> <span class="argument">varfunc</span> <span class="argument">=</span> NULL<span class="keyword">)</span></pre>
<h2>Arguments</h2>
<dl>
<dt>object</dt>
<dd>
A univariate model object of class <code><a href='http://www.rdocumentation.org/packages/stats/topics/lm'>lm</a></code> or
<code><a href='http://www.rdocumentation.org/packages/MASS/topics/rlm'>rlm</a></code>
with model formula <code>y ~ x</code> or <code>y ~ x - 1</code>.
</dd>
<dt>xlim</dt>
<dd>
The limits of the plot on the x axis.
</dd>
<dt>ylim</dt>
<dd>
The limits of the plot on the y axis.
</dd>
<dt>xlab</dt>
<dd>
The label of the x axis.
</dd>
<dt>ylab</dt>
<dd>
The label of the y axis.
</dd>
<dt>alpha</dt>
<dd>
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).
</dd>
<dt>varfunc</dt>
<dd>
The variance function for generating the weights in the model.
Currently, this argument is ignored (see note below).
</dd>
</dl>
<div class="Description">
<h2>Description</h2>
<p>Produce graphics of calibration data, the fitted model as well
as confidence, and, for unweighted regression, prediction bands.</p>
</div>
<div class="Value">
<h2>Value</h2>
<p><dl>
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.
</dl></p>
</div>
<div class="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='http://www.rdocumentation.org/packages/stats/topics/predict.lm'>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><a href='calplot.lm.html'>calplot</a></code> prediction bands with the
<code><a href='lod.html'>lod</a></code> values if the <code>lod()</code> alpha and beta parameters are
half the value of the <code>calplot()</code> alpha parameter.</p>
<p></p>
</div>
<h2 id="examples">Examples</h2>
<pre class="examples"><div class='input'><span class="functioncall"><a href='http://www.rdocumentation.org/packages/utils/topics/data'>data</a></span><span class="keyword">(</span><span class="symbol">massart97ex3</span><span class="keyword">)</span>
<span class="symbol">m</span> <span class="assignement"><-</span> <span class="functioncall"><a href='http://www.rdocumentation.org/packages/stats/topics/lm'>lm</a></span><span class="keyword">(</span><span class="symbol">y</span> <span class="keyword">~</span> <span class="symbol">x</span><span class="keyword">,</span> <span class="argument">data</span> <span class="argument">=</span> <span class="symbol">massart97ex3</span><span class="keyword">)</span>
<span class="functioncall"><a href='calplot.lm.html'>calplot</a></span><span class="keyword">(</span><span class="symbol">m</span><span class="keyword">)</span></div>
<p><img src='calplot.lm-2.png' alt='' width='540' height='400' /></p></pre>
</div>
<div class="span4 sidebar">
<!-- <ul>
<li>calplot</li><li>calplot.default</li><li>calplot.lm</li>
</ul>
<ul>
<li>regression</li>
</ul> -->
<h2>Author</h2>
Johannes Ranke
<a href='mailto:jranke@uni-bremen.de'>jranke@uni-bremen.de</a>
<a href = 'http://www.uft.uni-bremen.de/chemie/ranke'>http://www.uft.uni-bremen.de/chemie/ranke</a>
</div>
</div>
<footer>
<p class="pull-right"><a href="#">Back to top</a></p>
<p>Built by <a href="https://github.com/hadley/staticdocs">staticdocs</a>. Styled with <a href="https://getbootstrap.com/2.0.4/">bootstrap</a>.</p>
</footer>
</div>
</body>
</html>