Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Discrete choice experiments: Stata's dcreate command for a continuous variable

    Hello?

    I am designing a discrete choice experiment using Stata's dcreate command. I have encountered an unexpected situation while creating a partial factorial design, and I wonder if anyone knows whether the situation that I am facing is something that can occur or it occurred because I did something wrong.

    The situation is as below:
    One of my design variables is hourly wages, which I specify as a continuous variable.
    When I created a full factorial design, I specified that the hourly wages variable has five levels: 10% lower than one's current wage (i.e., -10%), 5% lower than one's current wage (i.e., -5%), the same as one's current wage (i.e., 0%), 5% higher than one's current wage (i.e., +5%), and 10% higher than one's current wage (i.e., +10%)
    Also, I specified all nine beta priors to be non-zero values and used the coefficient estimates that I obtained from my pilot studies.
    When I created a partial factorial design, Stata generated a design that includes not only the extreme two values (i.e., -10% and +10%) for the hourly wages variable, but also the middle values (i.e., -5%, 0%, and +5%) even when I specified the wage variable as a continuous variable, not a categorical variable. Most of the choice sets include the two extreme values, but there are a few choice sets that include the middle values. Based on Hole (2016), I expected that Stata includes only the two extreme values for a continuous variable and includes all values only when a variable is specified as categorical. This is very strange!

    What is even more strange is that, when I specified all nine beta priors to be '0', Stata generated a partial factorial design that includes only the two extreme values (i.e., -10% and +10%) for the wage variable.

    My first question is:
    Can this happen? Does Stata sometimes (?) include middle values even when a variable is specified as a continuous variable? Or am I doing something wrong?

    My second question is:
    If I use a partial factorial design that includes not only the two extreme values but also middle values for the hourly wages variable that is specified as a continuous variable, would I still be able to use the mixlogit command in Stata and estimate the coefficient of the hourly wages variable?

    To help your understanding, below is the series of Stata commands that I used.

    //quote//
    matrix levmat = 2, 3, 2, 3, 5

    genfact, levels(levmat)

    list, separator(2)

    rename x1 empsec
    rename x2 hoursworked
    rename x3 schedule
    rename x4 location
    rename x5 hourlywage

    recode empsec (1=0) (2=1)
    recode hoursworked (1=0) (2=1) (3=2)
    recode schedule (1=0) (2=1)
    recode location (1=0) (2=1) (3=2)
    recode hourlywage (1=-10) (2=-5) (3=0) (4=5) (5=10)

    list, separator(2)

    matrix b = .908169, -.6351061, -.8481776, .477051, 2.234768, 1.452652, .0753147, -.3828749, .1569564

    dcreate i.empsec i.hoursworked i.schedule i.location c.hourlywage i.schedule#i.location, nalt(2) nset(42) bmat(b)

    list, separator(2) abbreviate(16)
    //unquote//


    Thank you very much for your attention to my query. Your help would be deeply appreciated.

    REFERENCES
    Hole, A. R. (September, 2016). Creating efficient designs for discrete choice experiments. Nordic and Baltic Stata Users Group meeting.

Working...
X