aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/inverse.predict.Rd18
-rw-r--r--man/lod.Rd12
-rw-r--r--man/loq.Rd12
-rw-r--r--man/massart97ex3.Rd55
4 files changed, 48 insertions, 49 deletions
diff --git a/man/inverse.predict.Rd b/man/inverse.predict.Rd
index 925f3e9..6bea72c 100644
--- a/man/inverse.predict.Rd
+++ b/man/inverse.predict.Rd
@@ -59,15 +59,15 @@
p. 200
}
\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)
+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)
- inverse.predict(m, 15, ws = 1.67) # 5.9 +- 2.5
+inverse.predict(m, 15, ws = 1.67) # 5.9 +- 2.5
}
\keyword{manip}
diff --git a/man/lod.Rd b/man/lod.Rd
index 055074c..e468e1d 100644
--- a/man/lod.Rd
+++ b/man/lod.Rd
@@ -69,13 +69,13 @@
Analytica Chimica Acta 391, 105 - 126.
}
\examples{
- data(din32645)
- m <- lm(y ~ x, data = din32645)
- lod(m)
+data(din32645)
+m <- lm(y ~ x, data = din32645)
+lod(m)
- # The critical value (decision limit, German Nachweisgrenze) can be obtained
- # by using beta = 0.5:
- lod(m, alpha = 0.01, beta = 0.5)
+# The critical value (decision limit, German Nachweisgrenze) can be obtained
+# by using beta = 0.5:
+lod(m, alpha = 0.01, beta = 0.5)
}
\seealso{
Examples for \code{\link{din32645}}
diff --git a/man/loq.Rd b/man/loq.Rd
index 0250098..7541e77 100644
--- a/man/loq.Rd
+++ b/man/loq.Rd
@@ -63,13 +63,13 @@
and therefore not tested. Feedback is welcome.
}
\examples{
- data(massart97ex3)
- attach(massart97ex3)
- m <- lm(y ~ x)
- loq(m)
+data(massart97ex3)
+attach(massart97ex3)
+m <- lm(y ~ x)
+loq(m)
- # We can get better by using replicate measurements
- loq(m, n = 3)
+# We can get better by using replicate measurements
+loq(m, n = 3)
}
\seealso{
Examples for \code{\link{din32645}}
diff --git a/man/massart97ex3.Rd b/man/massart97ex3.Rd
index e7cd383..efdcf02 100644
--- a/man/massart97ex3.Rd
+++ b/man/massart97ex3.Rd
@@ -11,38 +11,37 @@
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)
- calplot(m)
+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)
+calplot(m)
- # The following concords with the book p. 200
- inverse.predict(m, 15, ws = 1.67) # 5.9 +- 2.5
- inverse.predict(m, 90, ws = 0.145) # 44.1 +- 7.9
+# The following concords with the book p. 200
+inverse.predict(m, 15, ws = 1.67) # 5.9 +- 2.5
+inverse.predict(m, 90, ws = 0.145) # 44.1 +- 7.9
- # The LOD is only calculated for models from unweighted regression
- # with this version of chemCal
- m0 <- lm(y ~ x)
- lod(m0)
+# The LOD is only calculated for models from unweighted regression
+# with this version of chemCal
+m0 <- lm(y ~ x)
+lod(m0)
- # Limit of quantification from unweighted regression
- m0 <- lm(y ~ x)
- loq(m0)
+# Limit of quantification from unweighted regression
+loq(m0)
- # For calculating the limit of quantification from a model from weighted
- # regression, we need to supply weights, internally used for inverse.predict
- # If we are not using a variance function, we can use the weight from
- # the above example as a first approximation (x = 15 is close to our
- # loq approx 14 from above).
- loq(m, w.loq = 1.67)
- # The weight for the loq should therefore be derived at x = 7.3 instead
- # of 15, but the graphical procedure of Massart (p. 201) to derive the
- # variances on which the weights are based is quite inaccurate anyway.
+# For calculating the limit of quantification from a model from weighted
+# regression, we need to supply weights, internally used for inverse.predict
+# If we are not using a variance function, we can use the weight from
+# the above example as a first approximation (x = 15 is close to our
+# loq approx 14 from above).
+loq(m, w.loq = 1.67)
+# The weight for the loq should therefore be derived at x = 7.3 instead
+# of 15, but the graphical procedure of Massart (p. 201) to derive the
+# variances on which the weights are based is quite inaccurate anyway.
}
\source{
Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J.,

Contact - Imprint