aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-06-23 16:42:10 +0000
committerranke <ranke@5fad18fb-23f0-0310-ab10-e59a3bee62b4>2006-06-23 16:42:10 +0000
commitf4443942f10740ecc62b928181a1911ef14eeb04 (patch)
tree9f88ae546732b6db48db96c3372f394665684988 /tests
parent7889cda8d4133e68b07e7b204cd75295e0b348ee (diff)
Added the data from Massart example 1, and one more
tests showing the validity of inverse.predict. git-svn-id: http://kriemhild.uft.uni-bremen.de/svn/chemCal@18 5fad18fb-23f0-0310-ab10-e59a3bee62b4
Diffstat (limited to 'tests')
-rw-r--r--tests/massart97.R6
-rw-r--r--tests/massart97.Rout.save42
2 files changed, 48 insertions, 0 deletions
diff --git a/tests/massart97.R b/tests/massart97.R
index 58119d9..00f837f 100644
--- a/tests/massart97.R
+++ b/tests/massart97.R
@@ -1,4 +1,10 @@
require(chemCal)
+data(massart97ex1)
+m <- lm(y ~ x, data = massart97ex1)
+inverse.predict(m, 15) # 6.1 +- 4.9
+inverse.predict(m, 90) # 43.9 +- 4.9
+inverse.predict(m, rep(90,5)) # 43.9 +- 3.2
+
data(massart97ex3)
attach(massart97ex3)
yx <- split(y, x)
diff --git a/tests/massart97.Rout.save b/tests/massart97.Rout.save
index 9386a11..cb113d0 100644
--- a/tests/massart97.Rout.save
+++ b/tests/massart97.Rout.save
@@ -18,6 +18,48 @@ Type 'q()' to quit R.
> require(chemCal)
Loading required package: chemCal
[1] TRUE
+> data(massart97ex1)
+> m <- lm(y ~ x, data = massart97ex1)
+> inverse.predict(m, 15) # 6.1 +- 4.9
+$Prediction
+[1] 6.09381
+
+$`Standard Error`
+[1] 1.767278
+
+$Confidence
+[1] 4.906751
+
+$`Confidence Limits`
+[1] 1.187059 11.000561
+
+> inverse.predict(m, 90) # 43.9 +- 4.9
+$Prediction
+[1] 43.93983
+
+$`Standard Error`
+[1] 1.767747
+
+$Confidence
+[1] 4.908053
+
+$`Confidence Limits`
+[1] 39.03178 48.84788
+
+> inverse.predict(m, rep(90,5)) # 43.9 +- 3.2
+$Prediction
+[1] 43.93983
+
+$`Standard Error`
+[1] 1.141204
+
+$Confidence
+[1] 3.168489
+
+$`Confidence Limits`
+[1] 40.77134 47.10832
+
+>
> data(massart97ex3)
> attach(massart97ex3)
> yx <- split(y, x)

Contact - Imprint