Hello,

I am trying to estimate a discrete choice model, and I have a quick question on how I can structure my attribute variables. My data is in long format, and look like this:

Code:
ID  alternative cost Choice attribute1 attribute2 attribute3 attribute4 asc2 asc3
1   1   0   0   1   5   4   1   0   0
1   2   25  1   2   4   3   3   1   0
1   3   50  0   4   1   1   4   0   1
2   1   0   0   1   5   4   1   0   0
2   2   25  1   2   4   3   3   1   0
2   3   50  0   4   1   1   4   0   1
3   1   0   0   1   5   4   1   0   0
3   2   25  1   2   4   3   3   1   0
3   3   50  0   4   1   1   4   0   1
There are three alternatives in the choice question, and five attributes including a cost attribute. The non-non cost attributes are simply coded as a categorical variable with some attribute taking value between 1-5, another attribute between 1-4 etc. I am able to estimate the basic asclogit and mixed logit models when the data is on this format and if I treat my attributes as a continuous variable.

However, my question is how would I be able to estimate models like these by changing the variable structure:
I would like to estimate my model by converting the attributes to a dummy variable since a dummy would better capture the essence of my paper. For instance attribute 1 takes a value between 1 and 5, and I would like to convert it to 4 dummy variable. However, when I convert the attributes to a dummy variable and estimate, the model does not converge and it cannot produce any result. Which I believe is due to lack of variation in the data if I convert the attributes to a dummy variable.

E.g., of codes that does and does not work:
Code:
asclogit Choice cost attribute1 attribute2 attribute3 attribute4 asc2 asc3, case(ID) alternatives(alternative) vce(cluster ID) # This works

asclogit Choice cost i.attribute1 i.attribute2 i.attribute3 i.attribute4 asc2 asc3, case(ID) alternatives(alternative) vce(cluster ID) # This DOES  NOT work

asclogit Choice cost attribute1_dum1 attribute1_dum2 attribute1_dum3 ... attribute4_dum1 asc2 asc3, case(ID) alternatives(alternative) vce(cluster ID) # This DOES  NOT work
Can anyone provide any help on this matter? Should I keep on estimating the model by considering the attributes as a continuous variable, even though a dummy variable would provide more information? Is there any workaround to this issue?