aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/calplot.lm.Rd26
-rw-r--r--man/chemCal-package.Rd8
-rw-r--r--man/lod.Rd3
-rw-r--r--man/massart97ex3.Rd14
4 files changed, 31 insertions, 20 deletions
diff --git a/man/calplot.lm.Rd b/man/calplot.lm.Rd
index 734933d..de63022 100644
--- a/man/calplot.lm.Rd
+++ b/man/calplot.lm.Rd
@@ -8,8 +8,9 @@
as prediction and confidence bands.
}
\usage{
- calplot(object, xlim = "auto", ylim = "auto",
- xlab = "Concentration", ylab = "Response", alpha=0.05)
+ calplot(object, xlim = c("auto","auto"), ylim = c("auto","auto"),
+ xlab = "Concentration", ylab = "Response", alpha=0.05,
+ varfunc = NULL)
}
\arguments{
\item{object}{
@@ -32,22 +33,25 @@
\item{alpha}{
The error tolerance level for the confidence and prediction bands.
}
+ \item{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 as well as the prediction limits.
}
+\note{
+ Prediction bands for models from weighted linear regression require weights
+ for the data, for which responses should be predicted. Prediction intervals
+ for weighted models are not currently supported by the internally used
+ function \code{\link{predict.lm}}, therefore, \code{calplot} refuses to work
+ for such models.
+}
\examples{
-# Example of a Calibration plot for a weighted regression
-source("/home/ranke/tmp/r-base-2.3.0/src/library/stats/R/lm.R")
data(massart97ex3)
-attach(massart97ex3)
-yx <- split(y,factor(x))
-s <- round(sapply(yx,sd),digits=2)
-w <- round(1/(s^2),digits=3)
-weights <- w[factor(x)]
-m <- lm(y ~ x,w=10 * weights)
-calplot(m)
+m <- lm(y ~ x, data=massart97ex3)
calplot(m)
}
\author{
diff --git a/man/chemCal-package.Rd b/man/chemCal-package.Rd
index a11744e..4456150 100644
--- a/man/chemCal-package.Rd
+++ b/man/chemCal-package.Rd
@@ -2,16 +2,16 @@
\alias{chemCal-package}
\docType{package}
\title{
-Calibration functions for analytical chemistry
+ Calibration functions for analytical chemistry
}
\description{
-See \url{../DESCRIPTION}
+ See \url{../DESCRIPTION}
}
\details{
-There is a package vignette located in \url{../doc/chemCal.pdf}.
+ There is a package vignette located in \url{../doc/chemCal.pdf}.
}
\author{
-Author and Maintainer: Johannes Ranke <jranke@uni-bremen.de>
+ Author and Maintainer: Johannes Ranke <jranke@uni-bremen.de>
}
\keyword{manip}
}
diff --git a/man/lod.Rd b/man/lod.Rd
index fa8c8ad..c2fe4e9 100644
--- a/man/lod.Rd
+++ b/man/lod.Rd
@@ -43,6 +43,9 @@
- 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{\link{predict.lm}}
+ function, which is currently not supported in R.
}
\references{
Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J.,
diff --git a/man/massart97ex3.Rd b/man/massart97ex3.Rd
index 2618709..eb00e79 100644
--- a/man/massart97ex3.Rd
+++ b/man/massart97ex3.Rd
@@ -23,18 +23,22 @@ m <- lm(y ~ x,w=weights)
inverse.predict(m, 15, ws = 1.67)
inverse.predict(m, 90, ws = 0.145)
-calplot(m)
+# Some of the following examples are commented out, because the require
+# prediction intervals from predict.lm for weighted models, which is not
+# available in R at the moment.
+
+#calplot(m)
m0 <- lm(y ~ x)
lod(m0)
-lod(m)
+#lod(m)
# Now we want to take advantage of the lower weights at lower y values
-m2 <- lm(y ~ x, w = 1/y)
+#m2 <- lm(y ~ x, w = 1/y)
# To get a reasonable weight for the lod, we need to estimate it and predict
# a y value for it
-yhat.lod <- predict(m,data.frame(x = lod(m2)))
-lod(m2,w=1/yhat.lod,k=3)
+#yhat.lod <- predict(m,data.frame(x = lod(m2)))
+#lod(m2,w=1/yhat.lod,k=3)
}
\source{
Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J.,

Contact - Imprint