Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
"Nitin Dua" <nd05d@fsu.edu> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: Question about how inclusive values are calculated in nested logit |

Date |
Thu, 17 Jun 2010 21:41:52 -0400 |

It's because Brad Jones is using Stata 9 or earlier for running nested logit. The nlogit command in Stata 9 was not compatible with RUM idea as IV was not weighted by the rho. Basically, it was a non normalized version of nested logit which was later corrected in Stata 10. In fact, if I am not mistaken, Greene also gives the non normalized version in his text. Cheers, Nitin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of elleries@cmu.edu Sent: Thursday, June 17, 2010 4:45 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: Question about how inclusive values are calculated in nested logit Thanks for the answer, it works now. It's funny though, because there are links online to demonstrations of where it works without dividing by the log-sum parameter. See these ppt notes, for instance: psfaculty.ucdavis.edu/bsjjones/nestedlogit.pdf On slide 21 (the slide that starts with "OK. Now what about the "inclusive value parameters.""), the writer seems to get the equality between log( sum (e(XB)) ), without dividing through by rho. Does that seem strange to you? Ellerie On Wed, Jun 16, 2010 at 2:24 PM, Nitin Dua <nd05d@fsu.edu> wrote: > Hi Ellerie, > > I think it is because you forgot to divide xb term inside the exp() with > rho_k for the nest. > > Nitin > > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Ellerie Weber > Sent: Wednesday, June 16, 2010 11:49 AM > To: statalist@hsphsun2.harvard.edu > Subject: st: Question about how inclusive values are calculated in nested > logit > > Hello, > I am running a nested logit and trying to understand what is happening > behind the inclusive values Stata calculates with the command "predict iv". > > I thought that the inclusive value for nest j, IV_j, is calculated > according to the following formula: > > IV_j = log ( sum_k (exp(xb_k))) > > where xb is the linear predicted values for the bottom level choices and the > summation is over all choices k=1,...,K in nest j. > > However, the IV calculated by Stata doesn't seem to match this algebraic > formula. > > Here is an example of what I mean: This is my data for person 1 (each row > is a different choice in that person's choice set). Column xb1 > gives the linear predicted value for the upper level (nest 1 versus nest 2). > Column xb2 gives the linear predicted value for the lower level (one > for each row). > > .list person_id nest xb1 xb2 iv if person_id==1 > > > person_id nest xb1 xb2 iv > 1 1 0 -9.553713 -4.453681 > 1 1 0 -8.438002 -4.453681 > 1 1 0 -5.484814 -4.453681 > 1 1 0 -7.626926 -4.453681 > 1 1 0 -6.155082 -4.453681 > 1 1 0 -6.608621 -4.453681 > 1 1 0 -4.274272 -4.453681 > 1 1 0 -7.114683 -4.453681 > 1 1 0 -4.6119 -4.453681 > 1 1 0 -8.375203 -4.453681 > 1 1 0 -8.188745 -4.453681 > 1 2 1.942574 -8.349099 -6.250056 > 1 2 1.942574 -5.643903 -6.250056 > 1 2 1.942574 -6.285707 -6.250056 > 1 2 1.942574 -4.820613 -6.250056 > 1 2 1.942574 -8.289648 -6.250056 > 1 2 1.942574 -8.586944 -6.250056 > I thought iv for nest 2 should be > log(exp(-8.349099)+exp(5.643903)+exp(-6.285707)+exp(-4.820613)+exp(-8.289648 > )+exp(-8.58694)), > ie, the logged sum of exp(xb2) over rows=12,...,17. However, > calculating this yields: > > . > di log(exp(-8.349099)+exp(5.643903)+exp(-6.285707)+exp(-4.820613)+exp(-8.289 > 648)+exp(-8.58694)) > -4.258899714 > > which is not = to -6.250056, as Stata calculated in the row "iv". > > Am I not understanding correctly, or making a mechanical error? Or is it > possible that the fact that the iv doesn't equal what I think it should > imply there is a specification error with my model? > > Any responses would be greatly appreciated > > * > * 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/ > > > * > * 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/ > > * * 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/ * * 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: Question about how inclusive values are calculated in nested logit***From:*Ellerie Weber <elleries@cmu.edu>

**st: RE: Question about how inclusive values are calculated in nested logit***From:*"Nitin Dua" <nd05d@fsu.edu>

**Re: st: RE: Question about how inclusive values are calculated in nested logit***From:*elleries@cmu.edu

- Prev by Date:
**Re: st: How to make a code faster - alternatives to egen var = concat(vars) ?,** - Next by Date:
**st: Changing missing values in string variable** - Previous by thread:
**Re: st: RE: Question about how inclusive values are calculated in nested logit** - Next by thread:
**st: Integrating Stata and Vi in Ubuntu** - Index(es):