Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: correct command for nlogit and constraints


From   Cielo Magno <[email protected]>
To   [email protected]
Subject   st: correct command for nlogit and constraints
Date   Sat, 17 Oct 2009 16:23:58 -0400

Hello everyone,

I have a question on nlogit and constraints.  I have 2 nests with only
1 alternative.  Thus, when I ran the -nlogit-, I got the following
result.


. nlogit choice price2 ndays  Mtotal_ads||type:  sex age, base
(generic)||prescribe:, nolog notree noconstant case(id)
note: branch 1 of level 1 is degenerate and the associated dissimilarity
       parameter ([generic_tau]_cons) is not defined; see help nlogit for
       details
note: branch 2 of level 1 is degenerate and the associated dissimilarity
       parameter ([breakthrough_tau]_cons) is not defined; see help nlogit
       for details.

I tried to follow the instruction in the help by running the
following.  But it did not work.


. constraint 1 [breakthrough_tau]_cons = 1

. constraint 2 [generic_tau]_cons = 1

. nlogit choice price2 ndays  Mtotal_ads||type:  sex age, base
(generic)||prescribe:, nolog notree noconstant case(id) constraint (1
2)
option constraint() not allowed equation 3 defining level 2 is
improperly specified
r(198);

. nlogit choice price2 ndays  Mtotal_ads||type:  sex age, base
(generic)||prescribe:, nolog notree noconstant case(id) constraint (1)
constraint (2)
option constraint() not allowed equation 3 defining level 2 is
improperly specified
r(198);


Would anyone have any suggestion on how specify -nlogit- when you have
2 constraints? Any help will be appreciated.

Cielo Magno
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index