Bookmark and Share

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]

st: Problem dealing with predicted probabilities from mixlogit


From   esther adler <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index