This function converts a two-level orthogonal main-effect design (OMED)/balanced incomplete block design (BIBD) into a series of BWS questions.
bws.questionnaire(choice.sets, design.type, item.names)
BWS questions converted from the design are returned.
A data frame or matrix containing choice sets.
A value describing how to design the choice sets: 1
if the design assigned to choice.sets
is a two-level OMED, and 2
if it is a BIBD.
A vector containing the names of items shown in the questions.
Hideo Aizaki
A two-level OMED/BIBD is assigned to choice.sets
, and may be generated by R functions (e.g., the oa.design
function in DoE.base; the find.BIB
function in crossdes) or copied manually from text books/web sites related to the design of experiments.
When the design is a two-level OMED, each row corresponds to a question and each column corresponds to an item. The level values in the design have to be 1 and 2. The former corresponds to an item being “absent” from a column and the latter corresponds to the item being “present.” The correspondence between item names and columns is defined and assigned to the argument item.names
: the order of names in the vector assigned to item.names
corresponds to the order of columns (from left to right) in the choice sets assigned to choice.sets
.
When the design is a BIBD, each row corresponds to a question and the number of columns is equal to the number of items per question. The level values in the design have to be serial integer values, starting from 1: each value corresponds to an item. The correspondence between item names and level values is defined and assigned to the argument item.names
: the order of names in item.names
corresponds to the order of level values in the design (i.e., the \(j\) th item in item.names
corresponds to the level value of \(j\) in the design).
bws.dataset
, oa.design
, find.BIB
## See examples in bws.dataset()
Run the code above in your browser using DataLab