Skip to content

Conversation

@idavydov
Copy link
Collaborator

@idavydov idavydov commented Oct 30, 2023

  • D and A seems to work same as in JMP

TODO:

  • is it optimality or efficiency?
  • percentages are OK?
  • document
  • figure out I-optimality
  • figure out G-optimality
  • use for vignette examples

TODO:
- [ ] is it optimality of efficiency?
- [ ] is percentages are OK?
- [ ] document
- [ ] figure out I-optimality
@banfai
Copy link
Collaborator

banfai commented Oct 30, 2023

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

@banfai
Copy link
Collaborator

banfai commented Dec 15, 2023

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

image

@banfai
Copy link
Collaborator

banfai commented Sep 9, 2024

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
image

@banfai
Copy link
Collaborator

banfai commented Sep 30, 2024

  • example where to use: continuous factor? (e.g. weight or concentration)
  • check if our optimizer is arriving to the same solution (wrt D-opt) as JMP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants