| random_design_candidate | R Documentation |
Sample from the candidate set to create a random design_object. If level occurrences are specified, single rows are swapped with random rows from the candidate set until the design_object candidate satisfies them. A swap is kept if it does not move the design_object candidate further away from the level occurrences.
random_design_candidate(
utility,
candidate_set,
rows,
sample_with_replacement,
print_counter = FALSE,
max_attempts = 1e+05
)
utility |
A named list of utility functions. See the examples and the vignette for examples of how to define these correctly for different types of experimental designs. |
candidate_set |
A matrix or data frame in the "wide" format containing
all permitted combinations of attributes. The default is NULL. If no
candidate set is provided, then it is built from the utility functions
subject to specified exclusions with |
rows |
An integer giving the number of rows in the final design |
sample_with_replacement |
A boolean equal to TRUE if we sample from the candidate set with replacement. The default is FALSE |
print_counter |
A boolean equal to TRUE if we print the number of attempts to find a design candidate every 1000th attempt. The default is FALSE |
max_attempts |
The maximum number of swaps to try before stopping with an error. The default is 100000. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.