Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
Steve Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: calculate probability for clogit |

Date |
Fri, 23 Apr 2010 10:08:21 -0400 |

I dropped car==3 to get two alternatives for the -asclogit- and -clogit- example. As I said before, "choiceset" is not a proper case variable; "pair" is, but will not, I speculate, give proper standard errors. I suggest again that you consult somebody knowledgeable about these analyses. To answer your original question, I don't know how to get a proper prediction for your design. Good luck, Steve On Fri, Apr 23, 2010 at 9:05 AM, Patty_FARE_Guelph Apichaya <pattria_ft@hotmail.com> wrote: > Hi, > > Could you give me an example? How I can code it for 2 choice? > I tried to code it but the program doesn't work. > > asclogit choice price brand labeling, case(choiceset) alternative( alt_choice) > variable alt_choice has replicate levels for one or more cases; this is not allowed > > I look at your code and looked at how they code data in webuse choice, clear. > drop if car==3, is it mean I have to generate alternative 3 in the data set? because I have only 2alternatives. > > However, when I look at the data set of -clogit- and -asclogit-. They are the same. > clogit choice price brand labeling, group(choiceset) > > I agree that the case or group variable in -clogit- I will use pair (choiceset). > For example, I have 32 choice set and 1 choice set has pair of alternatives (optionA and B) > This is that way that I code in my data set : > > choiceset alternatives > 1 1 > 1 2 > 2 1 > 2 2 > 3 1 > 3 2 > - > - > 32 1 > 32 2 > 1 1 > > 1 2 > > 2 1 > > 2 2 > > 3 1 > > 3 2 > > - > > - > > 32 1 > > 32 2 > > > I will repeat the choice set again for next individual. > Another point is should I continue choice set from 32 to 33 or should I repeat it from 1 to 32? > > Thank a lots > > Apichaya Lilavanichakul > MSc. Candidate > Department of Food Agricultural and Resource Economics > Ontario Agricultural College > University of Guelph > Guelph, ON > > > > > > ---------------------------------------- >> Date: Fri, 23 Apr 2010 08:10:17 -0400 >> Subject: Re: st: calculate probability for clogit >> From: sjsamuels@gmail.com >> To: statalist@hsphsun2.harvard.edu >> >> I should never post to Statalist in the middle of the night. I >> apologize for the brevity of the last message. >> >> -asclogit- worked for me in Stata 11 with two outcomes using the >> choice data set. >> >> ******************** >> webuse choice, clear >> drop if car==3 >> asclogit choice , casevars(sex) case(id) alternatives(car) >> tab car, gen(car) >> gen car2_sex =car2*sex //add interaction of person-level variable >> with alternative >> clogit choice car dealer car2_sex , group(id) //sex enters only in >> interaction >> ********************* >> However I don't understand the pairwise design well-enough to be sure >> of what you should do. One guess is that the case or group variable >> should not be ID but "pair" and that to get proper standard errors you >> should bootstrap the command with ID as a cluster variable for the >> bootstrap. However, I think you need to consult somebody who knows >> more about these analyses than I do. If you come back a correct >> analysis in SAS, for example, we can probably help translate it into >> Stata. >> >> Steve >> >> On Fri, Apr 23, 2010 at 12:54 AM, Steve Samuels wrote: >>> Sorry, you are on your own. -asclogit- worked for me with two >>> alternatives in Version 11 examples with the web "choice" data set., >>> but perhaps there's something special about your data, or you did not >>> have the proper format (2 records per person and option). You can >>> get person-level variables into -clogit- by adding their interactions >>> with your alternative variable. However you cannot use the -clogit- >>> data format for -asclogit-. As I said this is not my area, so read >>> the manual entries. >>> >>> Good luck. >>> Steve >>> >>> On Thu, Apr 22, 2010 at 9:34 PM, Patty_FARE_Guelph Apichaya >>> wrote: >>>> Hi, >>>> >>>> I try to use -asclogit- but it has to have more than 2 alternatives in 1 choice set, so I cannot use this command in my analysis. >>>> For the choice design, I use SAS software to design the pair of alternative and combination of factors in order to balance and give the optimal sets. I use clogit to analyze my choices and I want to know how I calculate probability the people choose each alternative in choice set. >>>> >>>> if I want to calculate personal factors, should I use -xtlogit- or which command it is appropriate? >>>> >>>> Thanks >>>> >>>> Apichaya Lilavanichakul >>>> MSc. Candidate >>>> Department of Food Agricultural and Resource Economics >>>> Ontario Agricultural College >>>> University of Guelph >>>> Guelph, ON >>>> >>>> >>>> >>>>> Date: Tue, 20 Apr 2010 16:12:44 -0400 >>>>> Subject: Re: st: calculate probability for clogit >>>>> From: sjsamuels@gmail.com >>>>> To: statalist@hsphsun2.harvard.edu >>>>> >>>>> I know almost nothing about discrete choice experiments, so please >>>>> read the following comments with that in mind. >>>>> >>>>> 1. -asclogit- might be a better choice than -clogit-, as it will more >>>>> easily include person-level variables like gender, income, and sex. >>>>> >>>>> 2. Your setup does not identify the individual in any way. The >>>>> examples for -asclogit- and -clogit- all use the individual as the >>>>> case or group variable. As "set" has only four levels, perhaps you can >>>>> include it as a person-level variable. >>>>> >>>>> 3. The examples in -asclogit- consider alternatives based on one >>>>> attribute (factor). You have three factors and these generate 12 (= >>>>> 3 x 2 x 2) possible options, with 66 possible pairwise comparisons. >>>>> You selected 32 of these, divided into four sets. I'm curious--is >>>>> there a reference for this experimental design? Is the choice of >>>>> comparisons and construction of the sets optimal or balanced in some >>>>> sense? >>>>> >>>>> 4. For predicted probabilities, use the -pr- option in -asclogit- . >>>>> >>>>> Steve >>>>> >>>>> On Tue, Apr 20, 2010 at 9:39 AM, Patty_FARE_Guelph Apichaya >>>>> wrote: >>>>>> Hi all, >>>>>> >>>>>> I use STATA to analyze discrete choihce experiment. My choice design has 32 choice sets with each 2 options (A and B). Each option include 3 factors: price (13,15,17), brand (AA,BB), labeling (animal,plant). The choice set will look like this. >>>>>> Option A OptionB >>>>>> price 13 15 >>>>>> brand AA BB >>>>>> labeling animal plant >>>>>> >>>>>> From 32 choice sets is divide into 4 block with each 8 choice sets. Each individual (100 individuals) get 1 block (8 choice sets) and ask to choose between option A or B. >>>>>> >>>>>> choice = 1 chosen option, 0 not chosen option >>>>>> set = same for two alternatives for each set i.e. there are 32 choice sets, it is repeated number from 1 to 32 and start it >>>>>> again for the next 32 choice sets. >>>>>> >>>>>> This is the code; clogit choice price brand labeling, group(set) >>>>>> >>>>>> I also want to include individual characteristics; gender, income, age. how I can do it? >>>>>> >>>>>> How I can calculate the probability from people choosing choice? >>>>>> >>>>>> Any suggestion would be great. >>>>>> Pat >>>>>> >>>>>> >>>>>> _________________________________________________________________ >>>>>> Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. >>>>>> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 >>>>>> * >>>>>> * 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/ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Steven Samuels >>>>> sjsamuels@gmail.com >>>>> 18 Cantine's Island >>>>> Saugerties NY 12477 >>>>> USA >>>>> Voice: 845-246-0774 >>>>> Fax: 206-202-4783 >>>>> >>>>> * >>>>> * 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/ >>>> >>>> _________________________________________________________________ >>>> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. >>>> http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5 >>>> * >>>> * 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/ >>>> >>> >>> >>> >>> -- >>> Steven Samuels >>> sjsamuels@gmail.com >>> 18 Cantine's Island >>> Saugerties NY 12477 >>> USA >>> Voice: 845-246-0774 >>> Fax: 206-202-4783 >>> >> >> >> >> -- >> Steven Samuels >> sjsamuels@gmail.com >> 18 Cantine's Island >> Saugerties NY 12477 >> USA >> Voice: 845-246-0774 >> Fax: 206-202-4783 >> >> * >> * 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/ > > _________________________________________________________________ > The New Busy is not the old busy. Search, chat and e-mail from your inbox. > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 > * > * 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/ > -- Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 * * 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/

**References**:**st: calculate probability for clogit***From:*Patty_FARE_Guelph Apichaya <pattria_ft@hotmail.com>

**Re: st: calculate probability for clogit***From:*Steve Samuels <sjsamuels@gmail.com>

**RE: st: calculate probability for clogit***From:*Patty_FARE_Guelph Apichaya <pattria_ft@hotmail.com>

**Re: st: calculate probability for clogit***From:*Steve Samuels <sjsamuels@gmail.com>

**Re: st: calculate probability for clogit***From:*Steve Samuels <sjsamuels@gmail.com>

**RE: st: calculate probability for clogit***From:*Patty_FARE_Guelph Apichaya <pattria_ft@hotmail.com>

- Prev by Date:
**AW: st: How to get the full matrix from "duncan"?** - Next by Date:
**Re: st: Graph export: "Could not initialize metafile"** - Previous by thread:
**RE: st: calculate probability for clogit** - Next by thread:
**st: new package netplot in ssc** - Index(es):