aboutsummaryrefslogtreecommitdiff
path: root/man/massart97ex3.Rd
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-12 21:59:33 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-05-12 21:59:33 +0000
commit69504b635d388507bce650c44b3bfe17cad3383e (patch)
tree120114ff6dc2d1aeb4716efef90d71257ac47501 /man/massart97ex3.Rd
parent6d118690c0cae02fc5cd4b28c1a67eecde4d9f60 (diff)
- Fixed the inverse prediction
- Now I have a working approach for the calculation of LOD and LOQ, but it seems to be different from what everybody else is doing (e.g. Massart chaper 13). I like it, however. Maybe it even yields a paper. git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@8 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'man/massart97ex3.Rd')
-rw-r--r--man/massart97ex3.Rd26
1 files changed, 26 insertions, 0 deletions
diff --git a/man/massart97ex3.Rd b/man/massart97ex3.Rd
index 1dabf90..2618709 100644
--- a/man/massart97ex3.Rd
+++ b/man/massart97ex3.Rd
@@ -10,6 +10,32 @@
A dataframe containing 6 levels of x values with 5
observations of y for each level.
}
+\examples{
+data(massart97ex3)
+attach(massart97ex3)
+yx <- split(y,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)
+# The following concords with the book
+inverse.predict(m, 15, ws = 1.67)
+inverse.predict(m, 90, ws = 0.145)
+
+calplot(m)
+
+m0 <- lm(y ~ x)
+lod(m0)
+lod(m)
+
+# Now we want to take advantage of the lower weights at lower y values
+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)
+}
\source{
Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J.,
Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, p. 188

Contact - Imprint