[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Steven Stillman <steven@thestillmans.org> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: RE: clogit w/ different choice set |

Date |
Fri, 14 Sep 2007 02:40:38 +1200 |

Eunkyeong, All you need to do is to drop the choice row for a particular individual if that hospital is not in the choice set and code the hospital-specific dummy variable as zero. So, re-writing your example and adding in a X variable to help illustrate - here is what the data for your first two patients should look like (assuming that there are only 5 hospitals - if there are more than you need to create the appropriate dummy variables and code them to zero when they don't match a row. pat_id choice hosp X hosp_opt1 hosp_opt2 hops_opt3 hops_opt4 hops_opt5 1 1 1 5 1 0 0 0 0 1 0 2 4 0 1 0 0 0 1 0 3 2 0 0 1 0 0 2 1 1 5 1 0 0 0 0 2 0 4 8 0 0 0 1 0 2 0 5 10 0 0 0 0 1 and the correct command is 'clogit choice X hosp_opt2-hosp_opt5, group(pat_id) - the conditional model can work out that some individuals don't provide any information for distinguishing between particular choices. BTW, unless your X's vary by both individuals and hospitals or you have multiple observations per individual with different X's over time, you cannot identify both hospital fixed effects and the coefficients on the X variables Cheers, Steve -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Eunkyeong Lee Sent: Wednesday, 12 September 2007 8:38 a.m. To: statalist@hsphsun2.harvard.edu Subject: st: clogit w/ different choice set Hi- Hi- I want to estimate patient's hospital choice model, using clogit, but my problem arise because each patient has different hospital choice sets. For example, suppose patient#1 chose hosp#1 although she could choose hospital#2 and #3. Then, the data set should be arranged as follows: Y(choice=1)=X's (hospital characteristics such as distance to hospitals) and hospital-specific dummy variables. pat_id choice some X's hosp_opt1 hosp_opt2 hops_opt3 1 1 1 0 0 1 0 0 1 0 1 0 0 0 1 The model would be clogit choice X's hosp_opt2 hosp_opt3, group(pat_id) However, now patient#2 chose hosp#3 when her choice set has hosp#1, hosp#4, hosp#5. pat_id choice some X's hosp_opt1 hosp_opt2 hops_opt3 hops_opt4 hops_opt5 2 1 0 . 1 0 0 2 0 1 . 0 0 0 2 0 0 . 0 1 0 2 0 0 . 0 0 1 Now I have to estimate clogit choice(Y) X's hosp_opt1 hosp_opt4 hosp_opt5, group(pat_id) So basically, for each patient, the number of hospital-specific dummies is different as well as the identification of the dummies. Could anyone help me out how to estimate clogit model in this case? I've looked at the STATA manual book, googled it, and did everything, but I could not still figure this out. Thanks. Eunkyeong * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: using macrolists in constraints** - Next by Date:
**st: RE: Appending several excel data sets into one** - Previous by thread:
**st: eivreg - why the reliability ratio has to be higher than R2** - Next by thread:
**st: Permutation vs. QAP** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |