Description Usage Arguments Examples
Prepare the results of a DCE to be analysed through choice models.
1 |
data |
Data.frame with the survey data in wide data format. See 'data(survey)' |
droprow |
Rows to be deleted. Specify a single row (droprow = x) or more than one (dropdown = x:y). |
keepvar |
Select the case-specific variables to be kept. For example: keepvar = c("x", "y"). |
create.id |
Create a variable called "id" with a unique identificator per respondent. create.id = TRUE |
blocks |
Specifies the variables designating each choice set block. Each choice set variable must be named as a letter (for instance Q) followed by a number (starting by 1). Thus, the first block of choice sets can be named Q1, Q2, Q3, Q4 whereas the second can be called F5, F6, F7, F8. In this case, block = c("Q", "F"). If there is only one block, block = c("Q"). |
sets |
Specify the number of choice sets per block. If there is only one block, specify the total number of choice sets. For instance, sets = 8. |
alts |
Specify the number of alternatives per choice set. For example, alts = 3. |
options |
Vector indicating the string used to designate the choice. For example, option = c("Option A", "Option B", "Option C"). See examples. |
design |
Data frame with the design matrix in dummy or effects coding. PONER EJEMPLO |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.