In R, when I create a full factorial plan with the fac.design() function from the DoE.base package to reduce the number of necessary runs, the optFederov() function from the AlgDesign package gives a different answer every time the code is executed.
What code should I add to ensure that the optFederov() function gives a consistent answer?
I tried to use set.seed() but it has no effect here.
Here is a dummy code to show you the problem:
library(DoE.base)
library(AlgDesign)
plan <-
fac.design(factor.names=list(A=c("A1","A2"),
B=c("B1", "B2"),
C=c("C1", "C2"),
D=c("D1", "D2"),
E=c("E1", "E2")),
seed = 2000)
optFederov(data = plan,
nTrials = 16,
approximate = FALSE)