aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
Diffstat (limited to 'demo')
-rw-r--r--demo/00Index1
-rw-r--r--demo/massart97ex3.R15
-rw-r--r--demo/massart97ex8.R6
3 files changed, 3 insertions, 19 deletions
diff --git a/demo/00Index b/demo/00Index
index 8749adf..a548abc 100644
--- a/demo/00Index
+++ b/demo/00Index
@@ -1,2 +1 @@
-massart97ex3 Analysis of example 3 in Massart (1997)
massart97ex8 Analysis of example 8 in Massart (1997)
diff --git a/demo/massart97ex3.R b/demo/massart97ex3.R
deleted file mode 100644
index 731aba6..0000000
--- a/demo/massart97ex3.R
+++ /dev/null
@@ -1,15 +0,0 @@
-library(chemCal)
-data(massart97ex3)
-attach(massart97ex3)
-yx <- split(y,factor(x))
-ybar <- sapply(yx,mean)
-s <- round(sapply(yx,sd),digits=2)
-w <- round(1/(si^2),digits=3)
-data.frame(x=levels(factor(x)),ybar,s,w)
-
-weights <- w[factor(x)]
-m <- lm(y ~ x,w=weights)
-inverse.predict(m,15,ws=1.67)
-inverse.predict(m,90,ws=0.145)
-
-calplot(m)
diff --git a/demo/massart97ex8.R b/demo/massart97ex8.R
index 332bd1d..dca065f 100644
--- a/demo/massart97ex8.R
+++ b/demo/massart97ex8.R
@@ -1,4 +1,3 @@
-library(chemCal)
data(massart97ex3)
attach(massart97ex3)
xi <- levels(factor(x))
@@ -8,5 +7,6 @@ si <- round(sapply(yx,sd),digits=2)
wi <- round(1/(si^2),digits=3)
weights <- wi[factor(x)]
m <- lm(y ~ x,w=weights)
-inverse.predict(m,15)
-inverse.predict(m,90)
+inverse.predict(m, 15, ws = 1.67)
+inverse.predict(m, 90, ws = 0.145)
+calplot(m)

Contact - Imprint