Closed kdevkdev closed 9 months ago
Sorry for the delay. @tylermorganwall At first I thought this was just a style suggestion, but now I see that we have a serious problem here.
From the get_optimality() help:
> factorialcoffee = expand.grid(cost = c(1, 2),
type = as.factor(c("Kona", "Colombian", "Ethiopian", "Sumatra")),
size = as.factor(c("Short", "Grande", "Venti")))
>
> designcoffee = gen_design(factorialcoffee, ~cost + size + type, trials = 29,
optimality = "D", repeats = 100)
> power_output = eval_design(designcoffee, model = ~cost + size + type,
alpha = 0.05, detailedoutput = TRUE)
> get_optimality(designcoffee)
D I A G T E Alias
1 99.09996 0.2224214 98.21557 Not Computed 203 22.79472 18.29479
> get_optimality(power_output)
D I A G T E Alias
1 NA 0.2224214 NA NA NA NA 18.25657
get_optimality should return the same values when fed a gen_design or eval_design output.
I believe this has been fixed since this issue was opened.
Thx for great package!
eval_design() seemingly stores d efficiency in attribute "D" (lines 415 - 430) , but get_optimality() only considers attribute "D-Efficiency"
I suggest to coherently store it in "D-Efficiency"?