Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Data setup for analysis of choice experiment in STATA


From   Hadji Cortez Jalotjot <jalotjot@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Data setup for analysis of choice experiment in STATA
Date   Sun, 27 Nov 2011 07:48:07 -0800 (PST)

Hi!

 This is my first time to use STATA and actually my first time to do a choice modelling so I need some advice.
I already have my raw data in my computer and I need to set it up for multinomial logistic regression.
My choice experiment is about vehicle choice.
I have 6 attributes with the following levels (5x3x3x2x2x2)
Each respondent has to answer 10 choice sets.  Each choice set has 2 alternatives with the opt out option.
This is how I initially set up my data (not showing all the attributes it shows how I did it)


Resp_no set_id ce_id choice eng1 eng2 eng3 eng4 eng5 price1 price2 price3 range1 range2 range3 
    1             1        1     1         0     0      0      0       1         0     1         0         0         1         0 
    1             1        1     0         0     0      0      1       0         1     0         0         1         0         0 

    1             1        2     1         0     0      0      1       0         1     0         0         1         0         0 
    1             1        2     0         0     0      1      0       0         0     0         1         0         0         1 

    1             1        3     0         0     1      0      0       0         0     0         1         1         0         0 
    1             1        3     0         1     0      0      0       0         0     1         0         0         0         1 


So I made a column for each attribute level and made it a dummy variable.
Each row is a type of vehicle.  If the vehicle possesses a certain attribute level (e.g. eng2), that variable has value=1, otherwise 0.

If respondent chooses an alternative, choice=1, if not =0
If the repondent "opts out" (e.g. ce_id 3), both alternatives has 0 value for choice.

Am I doing this data setup right?

Many thanks!
Hadji             

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index