aboutsummaryrefslogtreecommitdiff
path: root/inst/doc/chemCal.Rnw
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-23 07:33:22 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-23 07:33:22 +0000
commitf381f9a6a8a47b89ec25cd627833a7248da7932b (patch)
tree3155c1f5b2f5810a453aa8cb8a8f44f5920b01e8 /inst/doc/chemCal.Rnw
parente12be874ff477509b737ad09bf05144a7fbedac2 (diff)
Don't do calplot and lod for linear models from weighted
regression any more, since this is not supported (PR#8877). git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@13 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'inst/doc/chemCal.Rnw')
-rw-r--r--inst/doc/chemCal.Rnw13
1 files changed, 6 insertions, 7 deletions
diff --git a/inst/doc/chemCal.Rnw b/inst/doc/chemCal.Rnw
index 26b224f..77888b4 100644
--- a/inst/doc/chemCal.Rnw
+++ b/inst/doc/chemCal.Rnw
@@ -19,7 +19,7 @@ Ron Wehrens led to the belief that it could be heavily improved if the
inverse prediction method given in \cite{massart97} would be implemented,
since it also covers the case of weighted regression.
-At the moment, the package only consists of two functions, working
+At the moment, the package consists of three functions, working
on univariate linear models of class \texttt{lm} or \texttt{rlm}.
When calibrating an analytical method, the first task is to generate
@@ -27,6 +27,10 @@ a suitable model. If we want to use the \chemCal{} functions, we
will have to restrict ourselves to univariate, possibly weighted, linear
regression so far.
+For the weighted case, the function \code{predict.lm} had to be
+rewritten, in order to allow for weights for the x values used to
+predict the y values.
+
Once such a model has been created, the calibration can be graphically
shown by using the \texttt{calplot} function:
@@ -34,12 +38,7 @@ shown by using the \texttt{calplot} function:
library(chemCal)
data(massart97ex3)
attach(massart97ex3)
-yx <- split(y,factor(x))
-ybar <- sapply(yx,mean)
-s <- round(sapply(yx,sd),digits=2)
-w <- round(1/(s^2),digits=3)
-weights <- w[factor(x)]
-m <- lm(y ~ x,w=weights)
+m <- lm(y ~ x, w = rep(0.01,length(x)))
calplot(m)
@

Contact - Imprint