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

st: Generating outcome variable for a Nested Logit Model


From   Iria Puyosa <[email protected]>
To   [email protected]
Subject   st: Generating outcome variable for a Nested Logit Model
Date   Thu, 15 Sep 2005 13:06:33 -0400

This is my first time attempting to fit a Nested Logit model in Stata 9. I�m
having trouble trying to make it work. I would appreciate if you can help me
to fix it.

The tree structure in my outcome variable should be the following:
PSE enrollment
Level 1:  Enrolled � No Enrolled
Level 2 (for Enrolled): Enrolled in 2years � Enrolled in 4years.

The syntax I�m writing is the following:

. nlogitgen Enroll_PSE = enroll (no_enrolled: 1, enrolled: 3|4, 2years: 3,
4years: 4);

This is the message Stata produces:

new variable Enroll_PSE is generated with 4 groups
label list lb_Enroll_PSE
lb_Enroll_PSE:
           1 no_enrolled
           2 enrolled
           3 2years
           4 4years

This is the �tree� structure, Stata is generating from my commands:

.  nlogittree Enroll_PSE;
tree structure specified for the nested logit model

        top --> bottom

  Enroll_PSE
------------
  no_enrol~d
      2years
      4years


Then, if I try to specify the model in the contextual menu window, there are
not alternative variables for me to select neither at level 1 nor at level
2.

If I try writing the nlogit regression syntax in the Editor, I get the
following message:

outcome does not vary in any group
r(2000);

For error 2000 the Help says:
. . . . . . . . . . . . . . . . . . . . . . . . Return code 2000
        no observations;
        You have requested some statistical calculation and there are
        no observations on which to perform it.  Perhaps you specified
        if exp or in range and inadvertently filtered all the data.

Please, help me to identify the mistakes I�m making generating the outcome
variable.

Thanks.

-- 
Iria Puyosa
Center for the Study of Higher and Post-Secondary Education (CSHPE)
/ PhD student
University of Michigan

*
*   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