From 08465d77a6ca5a9656ac86047c6008f1e7f3e9c7 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 31 Mar 2022 19:21:03 +0200 Subject: Fix URLs in README, convert to roxygen - The roxygen conversion was done using Rd2roxygen - Also edit _pkgdown.yml to group the reference - Use markdown bullet lists for lod and loq docs --- docs/reference/inverse.predict.html | 103 +++++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 44 deletions(-) (limited to 'docs/reference/inverse.predict.html') diff --git a/docs/reference/inverse.predict.html b/docs/reference/inverse.predict.html index cb9fe98..6fe081e 100644 --- a/docs/reference/inverse.predict.html +++ b/docs/reference/inverse.predict.html @@ -1,14 +1,14 @@ -Predict x from y for a linear calibration — inverse.predict • chemCalPredict x from y for a linear calibration — inverse.predict • chemCal @@ -56,73 +56,87 @@
-

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. - The calculation method was taken from Massart et al. (1997). In particular, - Equations 8.26 and 8.28 were combined in order to yield a general treatment - of inverse prediction for univariate linear models, taking into account - weights that have been used to create the linear model, and at the same - 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.

+

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. The +calculation method was taken from Massart et al. (1997). In particular, +Equations 8.26 and 8.28 were combined in order to yield a general treatment +of inverse prediction for univariate linear models, taking into account +weights that have been used to create the linear model, and at the same 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 = "auto",
+  alpha = 0.05,
+  var.s = "auto"
+)

Arguments

object
-

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

+

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

newdata

A vector of observed y values for one sample.

...
-

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

+

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

ws

The weight attributed to the sample. This argument is obligatory - if object has weights.

+if object has weights.

alpha
-

The error tolerance level for the confidence interval to be reported.

+

The error tolerance level for the confidence interval to be +reported.

var.s
-

The estimated variance of the sample measurements. The default is to take - the residual standard error from the calibration and to adjust it - using ws, if applicable. This means that var.s - overrides ws.

+

The estimated variance of the sample measurements. The default +is to take the residual standard error from the calibration and to adjust it +using ws, if applicable. This means that var.s overrides +ws.

Value

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

+confidence interval.

+
+
+

Details

+

This is an implementation of Equation (8.28) in the Handbook of Chemometrics +and Qualimetrics, Part A, Massart et al (1997), page 200, validated with +Example 8 on the same page, extended as specified in the package vignette

Note

-

The function was validated with examples 7 and 8 from Massart et al. (1997). - Note that the behaviour of inverse.predict changed with chemCal version - 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.

+

The function was validated with examples 7 and 8 from Massart et al. +(1997). Note that the behaviour of inverse.predict changed with chemCal +version 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

+

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)
+    

+# This is example 7 from Chapter 8 in Massart et al. (1997)
 m <- lm(y ~ x, data = massart97ex1)
 inverse.predict(m, 15)        #  6.1 +- 4.9
 #> $Prediction
@@ -204,6 +218,7 @@
 #> [1] 36.20523 51.91526
 #> 
 
+
 
-- cgit v1.2.1