Statalist The Stata Listserver


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

Re: st: nlogit nesting scheme for 3-level degenerate model: data structure


From   [email protected] (Richard Gates)
To   [email protected]
Subject   Re: st: nlogit nesting scheme for 3-level degenerate model: data structure
Date   Thu, 04 Jan 2007 08:22:23 -0600

John Fulton is trying to run a (degenerate) nested logit model.  He
states below:

> Here's the form of my data with a hypothetical example: a study of 
> choices between cake and various kinds of pie.  Please ignore the 
> independent variables - they're completely made up and I include them 
> only to clarify the syntax.
> 
> The nlogittree output would be:
> top---->bottom
> dessert      type        pie
> __________________________________
> cake        cake         chocolate
> pie         fruit_pie    cherry
>                          peach
>             cream_pie    banana
>                          coconut
> the model would be:
> nlogit chosen (pie=calories) (type=pie_rating) (dessert=freshness), 
> group(person_id)
> 
> As you see, the "cake" nest is degenerate.  My model kicks out an error:
>  "Equation/parameter /cake/ multiply defined"

This is a coeffcient name space problem. The cake level is defined 
twice in the labels for the dessert and type variables.  Moreover, 
the label pie in the dessert variable will confict with the variable 
named pie.  Renaming the labels for dessert to _cake and _pie and I 
believe the estimation will proceed.  The coefficents will then be 
named

regression coeffcients

pie:calories 
type:pie_rating 
dessert:freshness 

Inclusive value parameters

_cake:_cons  
_pie:_cons

cake:_cons  
fruit_pie:_cons
cream_pie:_cons 


John may also need to constraint the [_cake]_cons and 
[cake]_cons estimates to 1.

-Rich
[email protected]
*
*   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