From 43d58935483e0d9dda7a74c029e7d7d2adad9ed7 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 20 May 2020 08:44:47 +0200 Subject: Static documentation rebuilt by pkgdown::build_site() --- docs/reference/calplot.lm-1.png | Bin 73353 -> 73061 bytes docs/reference/calplot.lm.html | 85 +++++++++++++++--------------- docs/reference/din32645-1.png | Bin 71727 -> 71417 bytes docs/reference/din32645.html | 82 ++++++++++++++++------------- docs/reference/index.html | 58 +++++++++++++++------ docs/reference/inverse.predict.html | 101 +++++++++++++++++++----------------- docs/reference/lod.html | 88 +++++++++++++++---------------- docs/reference/loq.html | 85 +++++++++++++++--------------- docs/reference/massart97ex1.html | 68 +++++++++++++----------- docs/reference/massart97ex3.html | 84 ++++++++++++++++-------------- docs/reference/rl95_cadmium.html | 66 +++++++++++++---------- docs/reference/rl95_toluene.html | 74 +++++++++++++++----------- docs/reference/utstats14.html | 66 +++++++++++++---------- 13 files changed, 475 insertions(+), 382 deletions(-) (limited to 'docs/reference') diff --git a/docs/reference/calplot.lm-1.png b/docs/reference/calplot.lm-1.png index aa0286d..4d620ee 100644 Binary files a/docs/reference/calplot.lm-1.png and b/docs/reference/calplot.lm-1.png differ diff --git a/docs/reference/calplot.lm.html b/docs/reference/calplot.lm.html index 18ce82f..7822b7e 100644 --- a/docs/reference/calplot.lm.html +++ b/docs/reference/calplot.lm.html @@ -8,21 +8,29 @@ Plot calibration graphs from univariate linear models — calplot • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,11 +38,11 @@ - + - + @@ -48,9 +56,10 @@ + - +
@@ -96,6 +109,7 @@
+
@@ -107,22 +121,20 @@
-

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

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

Arguments

- @@ -153,61 +165,52 @@ Currently, this argument is ignored (see note below).

object

A univariate model object of class lm or - rlm +

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

- +

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.

-

Note

Prediction bands for models from weighted linear regression require weights for the data, for which responses should be predicted. Prediction intervals using weights e.g. from a variance function are currently not supported by - the internally used function predict.lm, therefore, + the internally used function predict.lm, therefore, calplot does not draw prediction bands for such models.

It is possible to compare the calplot prediction bands with the lod values if the lod() alpha and beta parameters are half the value of the calplot() alpha parameter.

-

Examples

-
data(massart97ex3) -m <- lm(y ~ x, data = massart97ex3) +
data(massart97ex3) +m <- lm(y ~ x, data = massart97ex3) calplot(m)
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/din32645-1.png b/docs/reference/din32645-1.png index 9dc7295..cee27e9 100644 Binary files a/docs/reference/din32645-1.png and b/docs/reference/din32645-1.png differ diff --git a/docs/reference/din32645.html b/docs/reference/din32645.html index 8d46c24..6af5152 100644 --- a/docs/reference/din32645.html +++ b/docs/reference/din32645.html @@ -8,21 +8,29 @@ Calibration data from DIN 32645 — din32645 • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,10 @@ - + - + @@ -47,9 +55,10 @@ + - +
@@ -95,6 +108,7 @@
+
@@ -106,17 +120,15 @@
-

Sample dataset to test the package.

-
-
data(din32645)
- +
data(din32645)
+ +

Format

A dataframe containing 10 rows of x and y values.

-

References

DIN 32645 (equivalent to ISO 11843), Beuth Verlag, Berlin, 1994

@@ -126,66 +138,62 @@

Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including detection and quantification capabilities (IUPAC Recommendations 1995). Analytica Chimica Acta 391, 105 - 126.

-

Examples

-
m <- lm(y ~ x, data = din32645) +
m <- lm(y ~ x, data = din32645) calplot(m)
## Prediction of x with confidence interval prediction <- inverse.predict(m, 3500, alpha = 0.01) # This should give 0.07434 according to test data from Dintest, which # was collected from Procontrol 3.1 (isomehr GmbH) in this case -round(prediction$Confidence, 5)
#> [1] 0.07434
+round(prediction$Confidence, 5)
#> [1] 0.07434
## Critical value: crit <- lod(m, alpha = 0.01, beta = 0.5) # According to DIN 32645, we should get 0.07 for the critical value # (decision limit, "Nachweisgrenze") -round(crit$x, 2)
#> [1] 0.07
# and according to Dintest test data, we should get 0.0698 from -round(crit$x, 4)
#> [1] 0.0698
+round(crit$x, 2)
#> [1] 0.07
# and according to Dintest test data, we should get 0.0698 from +round(crit$x, 4)
#> [1] 0.0698
## Limit of detection (smallest detectable value given alpha and beta) # In German, the smallest detectable value is the "Erfassungsgrenze", and we # should get 0.14 according to DIN, which we achieve by using the method # described in it: lod.din <- lod(m, alpha = 0.01, beta = 0.01, method = "din") -round(lod.din$x, 2)
#> [1] 0.14
+round(lod.din$x, 2)
#> [1] 0.14
## Limit of quantification # This accords to the test data coming with the test data from Dintest again, # except for the last digits of the value cited for Procontrol 3.1 (0.2121) loq <- loq(m, alpha = 0.01) -round(loq$x, 4)
#> [1] 0.212
+round(loq$x, 4)
#> [1] 0.212
# A similar value is obtained using the approximation # LQ = 3.04 * LC (Currie 1999, p. 120) 3.04 * lod(m, alpha = 0.01, beta = 0.5)$x
#> [1] 0.2122306
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/index.html b/docs/reference/index.html index 0be3f99..d68dbd9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -8,21 +8,29 @@ Function reference • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,12 @@ + + @@ -44,9 +54,10 @@ + - +
@@ -92,6 +107,7 @@
+
@@ -115,6 +131,11 @@

+ + + + + @@ -180,27 +201,30 @@
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/inverse.predict.html b/docs/reference/inverse.predict.html index 4ea9a75..3c4c867 100644 --- a/docs/reference/inverse.predict.html +++ b/docs/reference/inverse.predict.html @@ -8,21 +8,29 @@ Predict x from y for a linear calibration — inverse.predict • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,8 +38,8 @@ - + - + @@ -56,9 +64,10 @@ + - +
@@ -104,6 +117,7 @@
+
@@ -115,7 +129,6 @@
-

This function predicts x values using a univariate linear model that has been generated for the purpose of calibrating a measurement method. Prediction intervals are given at the specified confidence level. @@ -126,19 +139,18 @@ time providing the possibility to specify a precision in sample measurements differing from the precision in standard samples used for the calibration. This is elaborated in the package vignette.

-
-
inverse.predict(object, newdata, …,
-  ws, alpha=0.05, var.s = "auto")
- +
inverse.predict(object, newdata, ...,
+  ws, alpha=0.05, var.s = "auto")
+

Arguments

- @@ -146,7 +158,7 @@ - + @@ -167,12 +179,11 @@ overrides ws.

object

A univariate model object of class lm or - rlm +

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

A vector of observed y values for one sample.

...

Placeholder for further arguments that might be needed by future implementations.

- +

Value

A list containing the predicted x value, its standard error and a confidence interval.

-

Note

The function was validated with examples 7 and 8 from Massart et al. (1997). @@ -180,17 +191,15 @@ 0.2.1. Confidence intervals for x values obtained from calibrations with replicate measurements did not take the variation about the means into account. Please refer to the vignette for details.

-

References

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. 200

-

Examples

# This is example 7 from Chapter 8 in Massart et al. (1997) -m <- lm(y ~ x, data = massart97ex1) +m <- lm(y ~ x, data = massart97ex1) inverse.predict(m, 15) # 6.1 +- 4.9
#> $Prediction #> [1] 6.09381 #> @@ -213,7 +222,7 @@ #> #> $`Confidence Limits` #> [1] 39.03178 48.84788 -#>
inverse.predict(m, rep(90,5)) # 43.9 +- 3.2
#> $Prediction +#>
inverse.predict(m, rep(90,5)) # 43.9 +- 3.2
#> $Prediction #> [1] 43.93983 #> #> $`Standard Error` @@ -227,16 +236,16 @@ #>
# For reproducing the results for replicate standard measurements in example 8, # we need to do the calibration on the means when using chemCal > 0.2 -weights <- with(massart97ex3, { - yx <- split(y, x) - ybar <- sapply(yx, mean) - s <- round(sapply(yx, sd), digits = 2) - w <- round(1 / (s^2), digits = 3) +weights <- with(massart97ex3, { + yx <- split(y, x) + ybar <- sapply(yx, mean) + s <- round(sapply(yx, sd), digits = 2) + w <- round(1 / (s^2), digits = 3) }) -massart97ex3.means <- aggregate(y ~ x, massart97ex3, mean) +massart97ex3.means <- aggregate(y ~ x, massart97ex3, mean) -m3.means <- lm(y ~ x, w = weights, data = massart97ex3.means) +m3.means <- lm(y ~ x, w = weights, data = massart97ex3.means) inverse.predict(m3.means, 15, ws = 1.67) # 5.9 +- 2.5
#> $Prediction #> [1] 5.865367 @@ -263,36 +272,30 @@ #>
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/lod.html b/docs/reference/lod.html index dcde1b3..e5a1158 100644 --- a/docs/reference/lod.html +++ b/docs/reference/lod.html @@ -8,21 +8,29 @@ Estimate a limit of detection (LOD) — lod • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,8 +38,8 @@ - + - + @@ -54,9 +62,10 @@ + - +
@@ -102,6 +115,7 @@
+
@@ -113,7 +127,6 @@
-

The decision limit (German: Nachweisgrenze) is defined as the signal or analyte concentration that is significantly different from the blank signal with a first order error alpha (one-sided significance test). @@ -122,23 +135,22 @@ concentration where the probability that the signal is not detected although the analyte is present (type II or false negative error), is beta (also a one-sided significance test).

-
-
lod(object, …, alpha = 0.05, beta = 0.05, method = "default", tol = "default")
- +
lod(object, ..., alpha = 0.05, beta = 0.05, method = "default", tol = "default")
+

Arguments

- - + @@ -165,12 +177,11 @@ divided by 1000. Can be set to a numeric value to override this.

object

A univariate model object of class lm or - rlm +

A univariate model object of class lm or + rlm with model formula y ~ x or y ~ x - 1, optionally from a weighted regression.

...

Placeholder for further arguments that might be needed by future implementations.

- +

Value

A list containig the corresponding x and y values of the estimated limit of detection of a model used for calibration.

-

Note

- The default values for alpha and beta are the ones recommended by IUPAC. @@ -178,9 +189,8 @@ 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 predict.lm + a weights argument for the internally used 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., @@ -192,14 +202,12 @@

Currie, L. A. (1997) Nomenclature in evaluation of analytical methods including detection and quantification capabilities (IUPAC Recommendations 1995). Analytica Chimica Acta 391, 105 - 126.

-

See also

Examples for din32645

-

Examples

-
m <- lm(y ~ x, data = din32645) +
m <- lm(y ~ x, data = din32645) lod(m)
#> $x #> [1] 0.08655484 #> @@ -215,38 +223,30 @@ #> [1] 3155.393 #>
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/loq.html b/docs/reference/loq.html index c159638..2c7dc6a 100644 --- a/docs/reference/loq.html +++ b/docs/reference/loq.html @@ -8,21 +8,29 @@ Estimate a limit of quantification (LOQ) — loq • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,8 +38,8 @@ - + - + @@ -53,9 +61,10 @@ + - +
@@ -101,6 +114,7 @@
+
@@ -112,7 +126,6 @@
-

The limit of quantification is the x value, where the relative error of the quantification given the calibration model reaches a prespecified value 1/k. Thus, it is the solution of the equation @@ -120,19 +133,18 @@ where c(L) is half of the length of the confidence interval at the limit L (DIN 32645, equivalent to ISO 11843). c(L) is internally estimated by inverse.predict, and L is obtained by iteration.

-
-
loq(object, …, alpha = 0.05, k = 3, n = 1, w.loq = "auto",
-    var.loq = "auto", tol = "default")
- +
loq(object, ..., alpha = 0.05, k = 3, n = 1, w.loq = "auto",
+    var.loq = "auto", tol = "default")
+

Arguments

- - + @@ -177,25 +189,22 @@ numeric value to override this.

object

A univariate model object of class lm or - rlm +

A univariate model object of class lm or + rlm with model formula y ~ x or y ~ x - 1, optionally from a weighted regression. If weights are specified in the model, either w.loq or var.loq have to @@ -143,7 +155,7 @@

The error tolerance for the prediction of x values in the calculation.

...

Placeholder for further arguments that might be needed by future implementations.

- +

Value

The estimated limit of quantification for a model used for calibration.

-

Note

- IUPAC recommends to base the LOQ on the standard deviation of the signal where x = 0. - The calculation of a LOQ based on weighted regression is non-standard and therefore not tested. Feedback is welcome.

-

See also

Examples for din32645

-

Examples

-
m <- lm(y ~ x, data = massart97ex1) +
m <- lm(y ~ x, data = massart97ex1) loq(m)
#> $x #> [1] 13.97764 #> @@ -210,36 +219,30 @@ #> [1] 22.68539 #>
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/massart97ex1.html b/docs/reference/massart97ex1.html index d9deb36..95e6b3f 100644 --- a/docs/reference/massart97ex1.html +++ b/docs/reference/massart97ex1.html @@ -8,21 +8,29 @@ Calibration data from Massart et al. (1997), example 1 — massart97ex1 • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,10 @@ - + - + @@ -47,9 +55,10 @@ + - +
@@ -95,6 +108,7 @@
+
@@ -106,50 +120,46 @@
-

Sample dataset from p. 175 to test the package.

-
-
data(massart97ex1)
- +
data(massart97ex1)
+ +

Format

A dataframe containing 6 observations of x and y data.

-

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, Chapter 8.

- - +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/massart97ex3.html b/docs/reference/massart97ex3.html index c1bbbc2..a1efeba 100644 --- a/docs/reference/massart97ex3.html +++ b/docs/reference/massart97ex3.html @@ -8,21 +8,29 @@ Calibration data from Massart et al. (1997), example 3 — massart97ex3 • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,10 @@ - + - + @@ -47,9 +55,10 @@ + - +
@@ -95,6 +108,7 @@
+
@@ -106,38 +120,35 @@
-

Sample dataset from p. 188 to test the package.

-
massart97ex3
- + +

Format

A dataframe containing 6 levels of x values with 5 observations of y for each level.

-

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, Chapter 8.

-

Examples

# For reproducing the results for replicate standard measurements in example 8, # we need to do the calibration on the means when using chemCal > 0.2 -weights <- with(massart97ex3, { - yx <- split(y, x) - ybar <- sapply(yx, mean) - s <- round(sapply(yx, sd), digits = 2) - w <- round(1 / (s^2), digits = 3) +weights <- with(massart97ex3, { + yx <- split(y, x) + ybar <- sapply(yx, mean) + s <- round(sapply(yx, sd), digits = 2) + w <- round(1 / (s^2), digits = 3) }) -massart97ex3.means <- aggregate(y ~ x, massart97ex3, mean) +massart97ex3.means <- aggregate(y ~ x, massart97ex3, mean) -m3.means <- lm(y ~ x, w = weights, data = massart97ex3.means) +m3.means <- lm(y ~ x, w = weights, data = massart97ex3.means) # The following concords with the book p. 200 inverse.predict(m3.means, 15, ws = 1.67) # 5.9 +- 2.5
#> $Prediction @@ -165,7 +176,7 @@ #>
# The LOD is only calculated for models from unweighted regression # with this version of chemCal -m0 <- lm(y ~ x, data = massart97ex3) +m0 <- lm(y ~ x, data = massart97ex3) lod(m0)
#> $x #> [1] 5.407085 #> @@ -194,33 +205,30 @@ # variances on which the weights are based is quite inaccurate anyway.
- +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/rl95_cadmium.html b/docs/reference/rl95_cadmium.html index 6678817..509a0ab 100644 --- a/docs/reference/rl95_cadmium.html +++ b/docs/reference/rl95_cadmium.html @@ -8,21 +8,29 @@ Cadmium concentrations measured by AAS as reported by Rocke and Lorenzato (1995) — rl95_cadmium • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,10 @@ - + - + @@ -47,9 +55,10 @@ + - +
@@ -95,6 +108,7 @@
+
@@ -106,49 +120,45 @@
-

Dataset reproduced from Table 1 in Rocke and Lorenzato (1995).

-
- + +

Format

A dataframe containing four replicate observations for each of the six calibration standards.

-

Source

Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for measurement error in analytical chemistry. Technometrics 37(2), 176-184.

- - +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/rl95_toluene.html b/docs/reference/rl95_toluene.html index 805249f..f295d6d 100644 --- a/docs/reference/rl95_toluene.html +++ b/docs/reference/rl95_toluene.html @@ -8,21 +8,29 @@ Toluene amounts measured by GC/MS as reported by Rocke and Lorenzato (1995) — rl95_toluene • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,12 @@ + + - - @@ -47,9 +57,10 @@ + - +
@@ -95,6 +110,7 @@
+
@@ -106,49 +122,47 @@
- -

Dataset reproduced from Table 4 in Rocke and Lorenzato (1995).

- +

Dataset reproduced from Table 4 in Rocke and Lorenzato (1995). The toluene + amount in the calibration samples is given in picograms per 100 µL. + Presumably this is the volume that was injected into the instrument.

- + +

Format

-

A dataframe containing four replicate observations for each +

A dataframe containing four replicate observations for each of the six calibration standards.

-

Source

Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for measurement error in analytical chemistry. Technometrics 37(2), 176-184.

- - +
-

Site built with pkgdown 1.3.0.

+

Site built with pkgdown 1.5.1.

+
+ + diff --git a/docs/reference/utstats14.html b/docs/reference/utstats14.html index 1385339..c15f06d 100644 --- a/docs/reference/utstats14.html +++ b/docs/reference/utstats14.html @@ -8,21 +8,29 @@ Example data for calibration with replicates from University of Toronto — utstats14 • chemCal + - + - - + + + + + + + - + + - + - - + + + @@ -30,10 +38,10 @@ - + - + @@ -47,9 +55,10 @@ + - +
@@ -95,6 +108,7 @@
+
@@ -106,50 +120,46 @@
- + +

Format

A tibble containing three replicate observations of the response for five calibration concentrations.

-

Source

David Stone and Jon Ellis (2011) Statistics in Analytical Chemistry. Tutorial website maintained by the Departments of Chemistry, University of Toronto. http://www.chem.utoronto.ca/coursenotes/analsci/stats/index.html

- - + + + -- cgit v1.2.1