Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: asclogit alternative has replicate levels for one or more cases


From   Yijing Lu <ylu1234@umd.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: asclogit alternative has replicate levels for one or more cases
Date   Thu, 9 May 2013 12:06:02 -0400

Dear All,

I have encountered some problem when I use the asclogit command to
estimate a model. In my model, I employed a sub-choice set (10
alternatives: one is the chosen one and the other 9 are randomly
selected from the original choice set) for each individual, because
the original choice set are large. Therefore, each individual has
different choices sets. The alternatives in the choice set are numeric
value (ranging from 1 to 300). The example of my data is shown:

ID Alt Choice VariableX VariableY
1 20 0 x y
1 2 0 x y
1 36 0 x y
1 79 0 x y
1 31 1 x y
1 200 0 x y
1 9 0 x y
1 96 0 x y
1 112 0 x y
1 131 0 x y
2 3 0 x y
2 99 0 x y
2 41 0 x y
2 57 0 x y
2 79 0 x y
2 32 0 x y
2 1 0 x y
2 123 0 x y
2 62 0 x y
2 57 1 x y
VariableX indicates the variables related to the individual, such as
(gender, age), while VariableY indicates the variables ascciated with
the alternative. The x, y value in the two columns just a
represtation, doesn't mean anything,

However, when I use asclogit to estimate my model.the error comes up
"alternative has replicate levels for one or more cases; this is not
allowed".
The command is:asclogit choice VariableY, case(id) alternatives(alt)
casevars(VariableX)

I checked the alternatives in the choice set for each individual,
there is no duplicate in each choice set. I don't know what's wrong.
Is there anything wrong with my data or with the command?

Could anyone help me out of this?

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index