View source: R/designs_fractioning.R
designs_fractioning | R Documentation |
Transform the experimental design based on factors. The initial design configuration assumes that all alternatives' attributes are "factors": vectors declared using 'c()' assignement. Other attribute types are ignored. However, such definition allows for multilevel and ordered factors specifications. This function transforms multilevel factors to the completely binary version.
designs_fractioning(Z)
Z |
Input factorail matrix as returned by the designs_f function. |
data.frame A dataset of choice sets (Z) respecting the transformation rules.
# Create alternatives alt1 <- alternative$new() alt1$add_attributes(Quality = c(0:1), Price = c(2, 2.5)) alt2 <- alternative$new() alt2$add_attributes(Size = c(1:3), Price = c(1.5, 2)) # Regroup alternatives into design edesign <- experimental_design$new(alternatives = list(alt1, alt2), design = "factorial") Z <- designs_f(edesign, n = 3) designs_fractioning(Z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.