Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: nested logit model


From   Matthias Grueninger <[email protected]>
To   [email protected]
Subject   st: nested logit model
Date   Mon, 20 Feb 2006 15:37:34 +0100

Dear all,

I have some problems with the estimations of a nested logit model with
stata (version 9).

In contrast to the example in the stata documentation, I want to use some
(individual-specific variables)
at both levels of my nested logit model. Unfortunately, stata omits some
values (standard
errors, p-values...) of some coefficient as soon as I use the same
explanatory variables
on two instead of one level.

The example from the stata guide works like this:

webuse restaurant
nlogitgen type=restaurant(fast:Freebirds|MamasPizza, family:
CafeEccell|LosNortenos|WingsNmore, fancy: Christophers|MadCows)
gen incFast=(type==1)*income
gen incFancy=(type==3)*income
gen kidFast=(type==1)*kids
gen kidFancy=(type==3)*kids

nlogit chosen(restaurant=cost rating distance) (type=incFast incFancy
kidFast kidFancy), group(family_id) nolog


If I try to extend the stata example by using one of the
individual-specific variables (kids) on both level, I get problems:

gen kid1=(restaurant==1)*kids
gen kid2=(restaurant==2)*kids
gen kid3=(restaurant==3)*kids
gen kid4=(restaurant==4)*kids
gen kid5=(restaurant==5)*kids
gen kid6=(restaurant==6)*kids

nlogit chosen(restaurant=cost rating distance kid1-kid6) (type=incFast
incFancy kidFast kidFancy), group(family_id) nolog

With this model specification I do not get standard errors and p-values for
the variables kidFast and kidFancy.

- Does someone know how it is possible to estimate a nested logit model in
stata with the same explanatory variable on different variables?

Thanks a lot for any help!

Matthias

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index