From 280d36230052de4f94e384648c1283031fbc9840 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 17 Jul 2018 17:29:14 +0200 Subject: Fix inverse predictions for replicate measurements For details, see NEWS.md --- docs/reference/inverse.predict.html | 61 +++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 6 deletions(-) (limited to 'docs/reference/inverse.predict.html') diff --git a/docs/reference/inverse.predict.html b/docs/reference/inverse.predict.html index 672e322..b107154 100644 --- a/docs/reference/inverse.predict.html +++ b/docs/reference/inverse.predict.html @@ -70,17 +70,26 @@ chemCal - 0.1.37.9001 + 0.2.1
+# 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) +}) + +massart97ex3.means <- aggregate(y ~ x, massart97ex3, mean) + +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 +#> +#> $`Standard Error` +#> [1] 0.8926109 +#> +#> $Confidence +#> [1] 2.478285 +#> +#> $`Confidence Limits` +#> [1] 3.387082 8.343652 +#>
inverse.predict(m3.means, 90, ws = 0.145) # 44.1 +- 7.9
#> $Prediction +#> [1] 44.06025 +#> +#> $`Standard Error` +#> [1] 2.829162 +#> +#> $Confidence +#> [1] 7.855012 +#> +#> $`Confidence Limits` +#> [1] 36.20523 51.91526 +#>
+