[Limdep Nlogit List] Estimate a nested logit model on panel data - very grateful for all help!

linda_thunstrom linda.thunstrom at econ.umu.se
Wed Nov 14 05:31:59 EST 2007


Dear Sirs,

I am new to the discrete choice models and am having problems in
estimating a nested logit model using revealed preference panel data, from
a household panel. I have panel data (unbalanced) on household consumption
of bread. My goal is to estimate the effect on choice probabilities of
different bread types (5 types), of household characteristics (a set of
dummy variables), the price of the bread types and, finally, the effect of
having purchased the bread type on the previous choice occasion.

I have tried to estimate a mixed logit model, but fail to do so (probably
due to too little variation in the data - household characteristics are
constant over time and price does not vary a lot - however, if you have
otehr suggestions to why the below model cannot the estimated as a mixed
logit model, please let me know, and if there is anything I might be able
to try to make the mixed model work!). I get the following error message
when trying to estimate the mixed logit model:
Initial iterations cannot improve function.Status=3
Error:   805: Initial iterations cannot improve function.Status=3
Function=  .10260381542D+05, at entry,  .10197190943D+05 at exit
Error:  1025: Failed to fit model. See earlier diagnostic.


I can estimate a MNL model, but the IIA assumption does not hold, so now
I'm instead estimating a nested logit model. How do I specify the code so
that the program understands that it is a panel I want to estimate,
though?

My current code is (a bit simplified) the following:

NLOGIT  ; Lhs = choice
        ; Choices = white, sweet, brown, fibre, hard
        ; Pds = pds
        ; Tree = unhealthy(white, sweet), healthy(brown, fibre, hard)
        ; Start = logit
        ; ivset: (healthy)=[1]
        ; Maxit = 100
        ; Model: U(white) = pr*price + pp*prevp + pp2i*prevp2 + pp3i*prevp3/
                 U(sweet) = sweet + pr*price + h2*H2 + h3*H3 + pp*prevp
                             + pp2i*prevp2 + pp3i*prevp3/

                U(brown) = brown + pr*price + h2*H2 + h3*H3 + pp*prevp
                             + pp2i*prevp2 + pp3i*prevp3/

                U(fibre) = fibre + pr*price + h2*H2 + h3*H3 + pp*prevp
                             + pp2i*prevp2 + pp3i*prevp3/

                U(hard) = hard + pr*price + h2*H2 + h3*H3 + pp*prevp
                             + pp2i*prevp2 + pp3i*prevp3 $

Where price varies over time and alternative, prevp = a dummy equal to 1
if the product was purchased on the previous choice occasion, otherwise
zero, H2 and H3 are time-invariant dummies for household characteristics,
and prevp2 and prevp3 are interaction terms equal to prevp*H2 and
prevp*H3. Sweet, brown, fibre and hard are alternative specific constants.
Pds is a variable indicating the number of observations over time
associated with each household in the panel (as mentioned above, the panel
is unbalanced, and this number varies from 10 to 100).

My problem is that it does not seem to matter if I include the Pds=pds
command or not in the code, which makes me think that I am not estimating
this as a panel, even if I think I am! What have I done wrong in the above
given code? Do I need to provide additional information for the program to
use a correct specification of probabilities and the likelihood function?

I am incredibly grateful for all input and comments!

Very best regards and greetings from Sweden,
Linda






More information about the Limdep mailing list