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 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]

st: Problem dealing with predicted probabilities from mixlogit


From   esther adler <ester_adler@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Problem dealing with predicted probabilities from mixlogit
Date   Sat, 10 Sep 2011 20:24:13 +0100 (BST)

(Sorry for sending again but the message seems to have been badly parsed and divided in two)


I am using the mixlogit command by Arne Risa Hole. It includes traindata.dta and is explained in http://www.stata-journal.com/article.html?article=st0133

When I run

use traindata.dta
global randvars "contract local wknown tod seasonal"
mixlogit y price, rand($randvars) group(gid) nrep(50)

mixlpred p
gen  lnp01=y*ln(p)
egen LL=total(lnp01)

I obtain the same LL as that reported by the package, but if I want to take account of the panel nature of the data and run:

use traindata.dta
global randvars "contract local wknown tod seasonal"
mixlogit y price, rand($randvars) group(gid) id(pid) nrep(50)
mixlpred p
gen  lnp01=y*ln(p)
egen LL=total(lnp01)

I get LL= -1356.44 while the output of the regressions gives -1126.1653.



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