Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: nlogit and no within-group variation [Stata 8]


From   "R.E. De Hoyos" <[email protected]>
To   <[email protected]>
Subject   st: nlogit and no within-group variation [Stata 8]
Date   Thu, 19 May 2005 16:33:52 +0300

[Stata 8]

I am trying to estimate a nested logit using firm-level data. My dependent variable (recaso1) takes three values {1,2,3}.

I nested outcomes 2 and 3 into the same group (IIA and "collapsing" test suggested this).
I have information about the firms' characteristics (and these are the explanatory var) but not about the outcome's characteristics. Following Stata manual's instructions I -reshape-d the data (from wide to long) to create a firm's id and the dichotomous variable coded as 0 for not selected alternatives and 1 for the selected alternative and I set the data:

gen fid = _n
tab recaso1, gen(recaso_b)
reshape long recaso_b, i(fid) j(wfid)
nlogitgen resolution = recaso1(allow: Allowed, notallow: Conditioned | Changed)
nlogittree recaso1 resolution

resolution recaso1
--------------------------
allow Allowed
notallow Conditioned
Challenged

The following occurs when estimating the model:

nlogit recaso_b (recaso1 = ihh ext colusion) (resolution = ihh hist rela syn imp eb2), group(fid)

tree structure specified for the nested logit model

top --> bottom

resolution recaso1
--------------------------
allow Allowed
notallow Conditioned
Challenged
note: ihh omitted due to no within-group variance
note: ext omitted due to no within-group variance
note: colusion omitted due to no within-group variance
no independent variables for recaso1 model
r(102);


Given the structure of my data I do NOT have within-group variation. In fact what I want to estimate is a nested logit with -mlogit- within the branches (in my case a simple -logit-), therefore I shouldn't need outcomes' characteristics (variation withing-groups).

Is there anything that I am missing? Or is Stata'a -nlogit- subject to -clogit- within branches?

Thanks,

Rafa

________________________
R.E. De Hoyos
Faculty of Economics
University of Cambridge
CB3 9DE, UK
www.econ.cam.ac.uk/phd/red29/ *
* 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