jvbraun / AlgDesign

Algorithmic Experimental Design by Robert E. Wheeler
12 stars 5 forks source link

OptFederov: Incorrect result for approximate A-optimal designs #4

Open jvbraun opened 8 years ago

jvbraun commented 8 years ago

From Lenka Filova:

I have come upon a technical problem. Namely, while trying to compute the approximate A-optimal designs with the function OptFederov, the algorithm crashes with an error that the design is singular.

This has been happening for all larger models. For example, this input:

> dat <- gen.factorial(11, 3)
> res <- optFederov(~quad(.), dat,criterion="A", approximate=TRUE)

gives an error

Error in optFederov(~quad(.),  dat,  criterion = "A",  approximate = TRUE) :
  Singular design.

The problem is the same for all factorial models with the number of levels 8 or higher.

I believe I have stumbled upon a bug, as both the vertex exchange and multiplicative algorithms for A-optimality give the result without any problems.

mjaysonnn commented 6 years ago

Have you solved this problem? cuz i'm experiencing the same problem.

vtshen commented 6 years ago

I had the same problem, however, if the size of dat is smaller, the code above works

# change from 11 to 7
dat <- gen.factorial(7, 3)
res <- optFederov(~quad(.), dat,criterion="A", approximate=TRUE ,maxIteration=1000,nRepeats=100)