Closed edsandorf closed 1 year ago
Alt:
x1[0, 1](0-1, 3-5)
How to parse this? In combination with TRUE/FALSE in opts?
In the case where the user supplies a candidate set to generate_design, then the attributes and levels are inferred from the candidate set, which means that the square brackets in the utility functions are ignored. When we implement this functionality, we have to make sure that the function can pick up both cases:
x1[c(0, 1)](4, 4)
and
x1(4, 4)
Alt:
x1[0, 1](0-1, 3-5)
How to parse this? In combination with TRUE/FALSE in opts?
If:
x1[c(0, 1)](4)
then assume that all appear equal number of times.
If attribute level balance parameter is neither 1 nor equal to the number of levels throw an error.
So if level_balance = TRUE
and the number of levels for each attriute are not multiples of J*S
, then issue a warning and impose near attribute level balance for the affected attributes, i.e. as tight a range as possible while retaining attribute level balance for the others.
If level_balance = TRUE
and number of times are specified in parenthesis, issue warning and ignore.
The default for level_balance
is FALSE
.
If a single number is specified and it is less than the level balance multiple of the attribute levels, then use as a minimum. If higher use as a maximum.
Example:
J <- 2
S <- 6
# Attribute level balance
x[1:3](4)
# Minimum
x[1:3](3)
# Maximum
x[1:3](5)
The default is to not enforce attribute level balance.
This can be set to
TRUE
to enforce balance or can be provided as a list stating the minimum or maximum occurence of each attribute levelWould also need to write in checks on the complete list against the semi-parsed utility expression to check that all information is present.
Syntax is open for discussion. Is this the best way?