Skip to content

alternative (Trait)

mmaness edited this page Nov 15, 2011 · 2 revisions

A choice experiment trait which corresponds to alternatives in a choice experiment and also sets the levels mappings for the alternative.

Format

alternative "label"
  set_levels_block
alternative variable
  set_levels_block
  • label - a string literal which corresponds to the label for an alternative
  • variable - an identifier whose string representation will be used as the label for the alternative
  • set_levels_block - a block of one or more set_levels_for traits which are used to set the levels for the corresponding alternative

Detailed Description

Trait Options

set_levels_for

Can Be Used With:

Example

ChoiceExperiment VacationChoice
  
  attribute Attractions
    attribute_label "Attractions"
    add_level 0, 0
      "Beach"
    add_level 1, 1
      "Ski Resort"
  attribute Cost
    attribute_label "Trip Cost"
    add_level 0, 500
      "$500"
    add_level 1, 750
      "$750"
  attribute Nights
    attribute_label "Trip Length"
    add_level 0, 3
      "3 Nights"
    add_level 1, 5
      "5 Nights"
  
  alternative "Vacation A"
    set_levels_for Attractions <- [0 1]
    set_levels_for Cost <- [0 1]
    set_levels_for Nights <- [0 1]
  alternative "Vacation B"
    set_levels_for Attractions <- [0 1]
    set_levels_for Cost <- [0 1]
    set_levels_for Nights <- [0 1]

Related Pages


Go back to Choice Experiment Trait

Home | JULIE Intro | Getting Started with JULIE | JULIE References | JULIE Development | Survenity Language