designs_gen | R Documentation |
Create experimental design using both factors and random specifications. The design configuration assumes that alternatives' attributes are mixed: vectors declared using 'c()' assignement and 'declared using 'r' class simulation functions.
designs_gen(experimental_design, n = NULL, resample = NULL)
experimental_design |
Input experimnetal design object |
n |
The n is not used in current version |
resample |
Declares whether the dataset should be resampled (shuffled) in case of factorial design element presence. |
data.frame A dataset of choice sets (Z) respecting FF Design.
# Create alternatives alt1 <- alternative$new() alt1$add_attributes(Quality = c(0:1), Price = rnorm(mean = 2, sd = 1)) alt2 <- alternative$new() alt2$add_attributes(Size = c(1:3), Price = runif(min = 1, max = 3)) # Regroup alternatives into design edesign <- experimental_design$new(alternatives = list(alt1, alt2), design = "mixed") Z <- designs_gen(edesign, n = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.