# Generating D optimal design in coded unit.
Design <- altopt.rc(optType = "D", N = 100, tc = 100, nf = 2, alpha = 1,
formula = ~x1 + x2 + x1:x2, coef = c(0, -4.086, -1.476, 0.01))
# Transform the coded unit to actual stress variable's level.
convert.stress.level(lowStLv = c(34.834, 4.094), highStLv = c(30.288, 4.5),
stand = Design$opt.design.rounded)
# Transform the actual stress level to coded units.
use <- c(38.281, 3.219)
convert.stress.level(lowStLv = c(34.834, 4.094), highStLv = c(30.288, 4.5),
actual = use)Run the code above in your browser using DataLab