Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: nlogit: at least one alternative of variable is contained in muliple alternatives of variable; this is not allowed
From
Michael Barker <[email protected]>
To
[email protected]
Subject
Re: st: nlogit: at least one alternative of variable is contained in muliple alternatives of variable; this is not allowed
Date
Wed, 14 Aug 2013 11:17:42 -0400
Hi Stefan,
I haven't really used nlogit, but I will take a guess at this error message.
It sounds like Stata wants the choice at each nesting level to be
unique. So the alternative variable for connection should have
different values for lowend-dsl and highend-dsl. This would create a
clear nested structure and allow you to eliminate impossible choices,
like nointernet-highend.
If this is right, you should be able to define the alternative
variable at each level using the alternative variable one level down
in the nesting tree. So if your variable creation statements would
look something like this:
nlogitgen internet = type(yes: lowend | normal | highend , no: no)
nlogitgen type = connection(lowend: dsl_low | cable_low , normal:
dsl_norm | ... ,highend: mobile_high | ... ,no: no)
nlogitgen connection = tariff(dsl_low: ..., cable_low: ..., dsl_norm:
... , cable_norm ..., no: 0)
Mike
On Wed, Aug 14, 2013 at 4:10 AM, Stefan Bernhard
<[email protected]> wrote:
> dear statalisters,
>
> -nlogit- seems to be a topic that is not getting much replies from statalist.
>
> I can only find one archive entry for this error and that is a dead end.
>
> "at least one alternative of connection is contained in muliple
> alternatives of type;
> this is not allowed"
>
> First, there is a spelling error in there...
> Second, what is the error trying to tell me and what am I supposed to
> do to avoid it?
>
> I have a 4-level nlogit model, where each case has a choice over 115
> alternative internet tariffs (one of those being the base "no
> internet").
>
> The choice levels are
> lev1: internet: 1,0
> lev2: type: 1,2,3
> lev3: connection: 1,2,3
> bottom level: tariff
>
> where "type" is an indicator of the target group (low-end, average or
> high-end user) and "connection" is the mode of connection (dsl, cable,
> mobile).
>
> I set up the data with 3 -nlogitgen- in the form:
> nlogitgen internet = tariff(yes: 1 | 2 | ... , no: 0)
> nlogitgen type = tariff(lowend: ... ,normal: ... ,highend: ... ,no: 0)
> nlogitgen connection = tariff(dsl: ...,cable: ...,mobile: ... ,no: 0)
>
> nlogittree tariff connection type internet
>
> nlogit choice price bandwidth volume /*
> */ || internet: , base(no) /*
> */ || type: age education , base(no) /*
> */ || connection: household_size , base(no) /*
> */ || tariff: , case(hh_id)
>
>
> I would really appreciate some clarification on the meaning of this error.
>
> best, stefan bernhard,
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/