Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Nested logit -Asking again. Got not replies!!


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Nested logit -Asking again. Got not replies!!
Date   Tue, 7 Sep 2004 15:11:21 +0100

. fillin id choice 
. rename _fillin chosen 

Nick 
n.j.cox@durham.ac.uk 

Tulika Narayan
 
> Hey, -resending my question in the hope of getting a response!
> T.
> 
> I am trying to run a nested logit model and was not sure about the
> data format to do that. If I have a choice variable =1,2,3
> then my data are in the following format:
> 
> id   choice
> 1     1
> 2     3
> 3     1
> 4     2
> 
> However, it seems like the data need it to be in this format:
> 
> id    choice  chosen
> 1       1        1
> 1       2        0
> 1       3        0
> 2       1        0
> 2       2        0
> 2       3        1
> 3       1        1
> 3       2        0
> 3       3        0
> 4       1        0
> 4       2        1
> 4       3        0
> 
> If this is the case, how do I get my data in this format? Is this
> data format necessary?
> Thanks. It turns out I have never run nlogit, only mlogits and many
> other things!!

*
*   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/



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