Hello STATA Community,
I'm analyzing discrete choice experiment data using the mixlogit command in STATA version 12.1. Unfortunately, I'm running into some errors and not sure how to address them.
The data includes participants' choices of one agricultural practices between 2 alternatives or continuing their current practice (i.e., Opt-out). Thus, participants decide between 3 possible choices for each hypothetical scenario. Each agricultural practice entails 5 attributes with 3 to 4 values (MaizeYieldAttrib, StrigaPrevAttrib LaborAttrib SoilFertAttrib LegYieldAttrib). The monetary attribute is MaizeYieldAttrib. In addition to these attributes, the data includes demographic information (e.g., Resp_Gend, Resp_Age).
When I run the choice model (see M1 below), I receive sensible results.
M1 - mixlogit Farmer_Choice MaizeYieldAttrib, rand(StrigaPrevAttrib LaborAttrib SoilFertAttrib LgYieldAttrib Opt_Out) group(Group_ID) id(HHID)
However, when I try to run the complete model (se M2, M3), which includes demographic variables, I begin receiving errors. I can add some demographic variables, but after a certain point, I begin receiving errors (see below).
M2 - mixlogit Farmer_Choice MaizeYieldAttrib, rand(StrigaPrevAttrib LaborAttrib SoilFertAttrib LegYieldAttrib Opt_Out) Resp_Gend Resp_Age Resp_EduLev LandHOldings GanyuPrimOccup TotalMaizeArea HH_INCOME) group(Group_ID) id(HHID)
conformability error
r(503);
M3- mixlogit Farmer_Choice MaizeYieldAttrib, rand(StrigaPrevAttrib LaborAttrib SoilFertAttrib LegYieldAttrib Opt_Out) Resp_Gend Resp_Age Resp_EduLev LandHOldings GanyuPrimOccup TotalMaizeArea StrigaRankInFields2017) group(Group_ID) id(HHID
mixl_ll(): 3301 subscript invalid
<istmt>: - function returned error
r(3301)
Any and all help is much appreciated. I believe there is a problem with my data. I've tried recoding it (e.g., square values, create logarithms), but to no avail. I have attached an incomplete table showing how my data is organized. Hope this helps! Thanks again.
Kind Regards,
Timothy

I'm analyzing discrete choice experiment data using the mixlogit command in STATA version 12.1. Unfortunately, I'm running into some errors and not sure how to address them.
The data includes participants' choices of one agricultural practices between 2 alternatives or continuing their current practice (i.e., Opt-out). Thus, participants decide between 3 possible choices for each hypothetical scenario. Each agricultural practice entails 5 attributes with 3 to 4 values (MaizeYieldAttrib, StrigaPrevAttrib LaborAttrib SoilFertAttrib LegYieldAttrib). The monetary attribute is MaizeYieldAttrib. In addition to these attributes, the data includes demographic information (e.g., Resp_Gend, Resp_Age).
When I run the choice model (see M1 below), I receive sensible results.
M1 - mixlogit Farmer_Choice MaizeYieldAttrib, rand(StrigaPrevAttrib LaborAttrib SoilFertAttrib LgYieldAttrib Opt_Out) group(Group_ID) id(HHID)
However, when I try to run the complete model (se M2, M3), which includes demographic variables, I begin receiving errors. I can add some demographic variables, but after a certain point, I begin receiving errors (see below).
M2 - mixlogit Farmer_Choice MaizeYieldAttrib, rand(StrigaPrevAttrib LaborAttrib SoilFertAttrib LegYieldAttrib Opt_Out) Resp_Gend Resp_Age Resp_EduLev LandHOldings GanyuPrimOccup TotalMaizeArea HH_INCOME) group(Group_ID) id(HHID)
conformability error
r(503);
M3- mixlogit Farmer_Choice MaizeYieldAttrib, rand(StrigaPrevAttrib LaborAttrib SoilFertAttrib LegYieldAttrib Opt_Out) Resp_Gend Resp_Age Resp_EduLev LandHOldings GanyuPrimOccup TotalMaizeArea StrigaRankInFields2017) group(Group_ID) id(HHID
mixl_ll(): 3301 subscript invalid
<istmt>: - function returned error
r(3301)
Any and all help is much appreciated. I believe there is a problem with my data. I've tried recoding it (e.g., square values, create logarithms), but to no avail. I have attached an incomplete table showing how my data is organized. Hope this helps! Thanks again.
Kind Regards,
Timothy
Comment