Open idavydov opened 10 months ago
I'm lost...
https://www.itl.nist.gov/div898/handbook/pri/section5/pri521.htm Table 5.2: D=0.6825575, A=2.2, G=1, I=4.6625
The same design in JMP: D Efficiency 90.3602 G Efficiency 88.88889 A Efficiency 88.88889 Average Variance of Prediction 0.180556
In R with this code:
> d_eff(d)
[1] 72.59794
> a_eff(d)
[1] 67.79659
> g_eff(d)
[1] 94.2809
⬆️ this is wrong, see below
m <- structure(c(-1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, 1,
1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1,
1, -1, 1), dim = c(12L, 3L), dimnames = list(NULL, c("X1", "X2",
"X3")))
d <- as.data.frame(m)
> d_eff(m)
[1] 87.35805
> g_eff(m)
[1] 92.58201
> a_eff(m)
[1] 85.71429
> d_eff(model.matrix(~X1 + X2 + X3, data = d))
[1] 90.3602
> a_eff(model.matrix(~X1 + X2 + X3, data = d))
[1] 88.88889
these are the same as JMP
> g_eff(model.matrix(~X1 + X2 + X3, data = d))
[1] 94.2809
this is not
all these optimality criteria are model dependent, and I was using the wrong model (only linear terms), that's why there was a discrepancy between JMP/R and the NIST page
with the correct model (inlcuding X1²) they are the same (at least for D): NIST Table 5.2: D=0.6825575, A=2.2, G=1, I=4.6625
R
> d_eff(model.matrix(~X1 + X2 + X3 + I(X1^2), data = d))
[1] 68.25575
> a_eff(model.matrix(~X1 + X2 + X3 + I(X1^2), data = d))
[1] 45.45455
> g_eff(model.matrix(~X1 + X2 + X3 + I(X1^2), data = d))
[1] 100
JMP
TODO: