[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: st: Nested Logit Model
Ellerie Weber <firstname.lastname@example.org>
Re: AW: st: Nested Logit Model
Tue, 27 Jul 2010 11:02:05 -0400
Nitin is correct as to the source of your error message: With stata,
any variable used to estimate your nest choice can't also be used to
estimate your branch choice. Don't get tricked by the semantics
though. If a variable is significant in predicting nest choice (what
you're calling the first layer), then it is ultimately being used to
choose the final branch alternative, too. (See Ken Train's book,
which is online, for a good theoretical explanation of nested logit).
Take for example the restaurant example. Here, the variables cost,
distance and rating are being used as the predictors of the restaurant
(ie, branch choice), while *family-specific variables* income and kids
are used as predictors of the nest choice. But that means that cost,
distance & rating do ultimately factor into the restaurant-level
nlogit chosen cost distance rating || type: income kids,
base(family) || restaurant:, noconst case(family_id)
So when you wrote (above) "[In the r]estaurant example: The
type of restaurant is estimated, but not the individual restaurant,"
that is not a precise statement. The nested logit computes a choice
probability for each individual restaurant in addition to a choice
probability for each nest.
The paper you refer to is not one I'm acquainted with, but I presume
they are estimating the model sequentially (nest first, then
alternative specific), making sure to adjust their standard errors.
Though I think it's strange that they write (sentence before footnote
15), that they are using FIML,which implies that they're estimating
everything jointly. Have you thought about writing the authors to
inquire directly? I would be interested to hear the answer, too.
On Fri, Jul 16, 2010 at 4:54 AM, Marc Michelsen
> Nitin, Anders,
> many thanks for your comments.
> For the sake of clarity, I am referring to the following paper: Huang, R.,
> and J. R. Ritter. "Testing theories of capital structure and estimating the
> speed of adjustment." Journal of Financial and Quantitative Analysis 44
> (2009), 237–271. The nested logit model in question can be found on page
> I have checked both the restaurant example in the helpfile and the fishing
> example in Cameron and Trivedi, 2009.
> In both examples only the limb (first layer) or the branch level (second
> layer) is examined. Not both levels simultaneously. Restaurant example: The
> type of restaurant is estimated, but not the individual restaurant. Fishing
> example: Not fishing from shore or boat is analyzed, but the individual
> choices beach/charter/pier/private.
> Is this just by chance or driven by the model? Similar to Huang/Ritter
> (2009), my set of explanatory variables (only case-specific) should
> determine the first decision layer (issue security or not) as well as the
> second layer (issue debt or equity). How do I have to proceed? Just estimate
> the limb first and after that in a second regression the branches?
> Checking the source code of nlogit.ado did not help me.
> Does anybody have a view on this?
> Cameron, A. C., and P. K. Trivedi. Microeconometrics using stata: Stata
> Press (2009).
> -----Ursprüngliche Nachricht-----
> Von: email@example.com
> [mailto:firstname.lastname@example.org] Im Auftrag von Nitin Dua
> Gesendet: Donnerstag, 15. Juli 2010 22:45
> An: email@example.com
> Betreff: Re: AW: st: Nested Logit Model
> Do you want different coefficients by alternative? because, thats what your
> syntax suggests.
> Also, you may be already aware of this ---- by using the same variables for
> nest type choice as well as for the final alternative choice you are
> introducing collinearity in the model and it cannot be estimated.
> ----- Original Message -----
> From: Marc Michelsen <firstname.lastname@example.org>
> Date: Thursday, July 15, 2010 11:54 am
> Subject: AW: st: Nested Logit Model
> To: email@example.com
>> thanks for your comments.
>> Of course I have first used -nlogitgen- and -nlogitree- to set up
>> the nested
>> structure of my panel data. Please see below for more details:
>> . nlogitgen issuetype = mode(NonIssuer: NoIssue , Issuer: Debt |
>> Equity). nlogittree mode issuetype, choice(d)
>> tree structure specified for the nested logit model
>> issuetype N mode N k
>> NonIssuer 29458 --- NoIssue 29458 21695
>> Issuer 58916 --- Debt 29458 6109
>> +- Equity 29458 1654
>> total 88374 29458
>> k = number of times alternative is chosen
>> N = number of observations at each level
>> . nlogit d a || issuetype: StandMBRatio BLeverage OpPerformance Size
>> RDExpense RDExpenseDummy Tangibility posoutl negoutl,
>> base(NonIssuer) ||
>> mode: StandMBRatio BLeverage OpPerformance Size RDExpense
>> RDExpenseDummyTangibility posoutl negoutl, base(Debt) case(No)
>> notree nolog
>> Error Message <variables "StandMBRatio BLeverage OpPerformance Size
>> RDExpense RDExpenseDummy Tangibility posoutl negoutl " are
>> specified in more
>> than one equation; this is not allowed>
>> Does this help to clarify the problem?
>> -----Ursprüngliche Nachricht-----
>> Von: firstname.lastname@example.org
>> [mailto:email@example.com] Im Auftrag von Anders
>> Gesendet: Donnerstag, 15. Juli 2010 17:30
>> An: firstname.lastname@example.org
>> Betreff: Re: st: Nested Logit Model
>> Marc, try -nlogitgen- and -nlogittree- before running -nlogit-, as in
>> the helpfile.
>> Please provide what you typed instead of schematic syntax like
>> "[explanatory variables]", e.g., what is your "altvar"?
>> Anders Alexandersson
>> On Thu, Jul 15, 2010 at 10:22 AM, Marc Michelsen
>> <email@example.com> wrote:
>> > I am trying to run a nested logit model comparable to
>> Huang/Ritter (2009)
>> > "Testing Theories of Capital Structure and
>> > Estimating the Speed of Adjustment", p. 253:
>> > 2-layered Security Issuance Decision: Limbs: NoIssue vs. Issue /
>> Branches> for "Issue": Debt Issuance vs. Equity Issuance.
>> > Similar to the above mentioned study, I have the same explanatory
>> > for the first decision layer (Issue vs. NoIssue) and the second
>> > vs. Equity). Apparently, this is not valid for Stata as I get the
>> > error message:
>> > <"variables ".." are specified in more than one equation; this is
>> not> allowed>
>> > My command looks the following:
>> > . nlogit d a || issuetype: [explanatory variables],
>> base(NonIssuer) ||
>> > issuetype2: [explanatory variables], base(NoIssue) case(No)
>> notree nolog
>> > What is wrong with my model specification/general approach?
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
* For searches and help try: