Learn R Programming

chemCal (version 0.2.3)

calplot: Plot calibration graphs from univariate linear models

Description

Produce graphics of calibration data, the fitted model as well as confidence, and, for unweighted regression, prediction bands.

Usage

calplot(
  object,
  xlim = c("auto", "auto"),
  ylim = c("auto", "auto"),
  xlab = "Concentration",
  ylab = "Response",
  legend_x = "auto",
  alpha = 0.05,
  varfunc = NULL
)

Arguments

object

A univariate model object of class lm or rlm with model formula y ~ x or y ~ x - 1.

xlim

The limits of the plot on the x axis.

ylim

The limits of the plot on the y axis.

xlab

The label of the x axis.

ylab

The label of the y axis.

legend_x

An optional numeric value for adjusting the x coordinate of the legend.

alpha

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 lod (see note below).

varfunc

The variance function for generating the weights in the model. Currently, this argument is ignored (see note below).

Value

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.

Examples

Run this code
# NOT RUN {
data(massart97ex3)
m <- lm(y ~ x, data = massart97ex3)
calplot(m)

# }

Run the code above in your browser using DataLab