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

st: Multiple Level Nests Using NLOGITRUM


From   "zachary patterson" <zachary.patterson@sympatico.ca>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Multiple Level Nests Using NLOGITRUM
Date   Thu, 17 Jun 2004 13:26:31 -0400

I am trying to run an RUM consistent nested logit model of surburban
commuter choice in Montreal, Canada.

There are six choices available (peak solo automobile, peak ridesharing,
peak public transit, offpeak solo automobile, offpeak ridesharing and
offpeak public transit).

I have been able to get nlogitrum to work with one nest, but am having
trouble getting the syntax correct to run two nests.

The nested structure I would like to run is:

First level: public (public transit - coded as 3 and 6) vs. non-public
modes (automobile (1,4) and ridesharing (2,5)).

Second level: traveling alone (solo (peak and offpeak) automobile) vs.
not alone (ridesharing (peak and offpeak)).

The problem is that when I run the model, it ends with a "conformability
error" r(503).

I think that I have not got the syntax right for nlogitgen, but can't
seem to figure it out.

Below is the syntax I have used along with the some of the output. As
can be seen, the tree structure seems not to want to include the pub
variables of the 'public' level nest.

If anybody has any suggestions on what I might be doing wrong, I would
be most appreciative.

Thanks in advance,
Zak

nlogitgen public=_j(pub: 3|6, nonp: 1|2|4|5);
nlogitgen alein=_j(alone: 1|4, notalone: 2|5);

. nlogitrum choice publict ... if shride==0 & fe==0, group(newid)
nests(_j alein public);

tree structure specified for the nested logit model

        top --> bottom

      public         alein            _j
----------------------------------------
        nonp         alone             1
                                       4
                  notalone             2
                                       5
note: 11 groups (66 obs) dropped due to no positive outcome
      or multiple positive outcomes per group
note: tmeng dropped due to collinearity
conformability error
r(503);

*****************************************
Zachary Patterson
PhD Candidate
McGill University Department of Geography
805 Sherbrooke Street West
Montreal, QC H3A 2K6
Tel. (514) 272-4362
E-mail: zachary.patterson@mail.mcgill.ca
E-mail: zachary.patterson@sympatico.ca
******************************************


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