Dear all,
I am a new user of Ngene and I am having a little problem with my code for which I cannot seem to find a solution. I would really appreciate any recommendations you might have regarding my issue!
I am trying to create an efficient design for a discrete choice experiment on heating systems in France. It is a labelled choice experiment, in which the attributes' levels are completely determined by the label (here the type of heating system). For that reason, I had to include a lot of constraints in my code, and it takes ages to run (days, sometimes never even finding any solution). Respondents have to choose between three heating systems, described by 7 attributes which have between 2 and 3 levels for the categorical attributes, and 8 for the monetary attributes. I believe that this also contributes to the huge amount of time NGENE requires, but I am afraid we cannot really remove any attribute without risking an omitted variable bias..
I really could not find any alternative to adding that high number of constraints, and I was wondering if any of you had any suggestions?
One more thing, I included the label (the type of heating system) as an attribute in my code, in order to see if the name itself of the heating system has an impact on the choice and also so that I could link all the other attributes' level to the type of heating technology (TEC in my code) using "cond;".
Do you think it is the way to do it or is there another way to include the label in such a way without including it as an attribute ?
I would be super grateful if you could take a look at my code to tell me if anything else is wrong or could use improvement?
If I did not provide enough information for you to understand my problem or my code (which you will find below), do not hesitate to ask me!
Thank you very much !
Laïla Souali
MY CODE:
design
;alts = optionA, optionB, optionC
;eff = (mnl,d)
;rows = 45
;block = 5
;cond:
if(optionA.TEC=1,optionA.INV=11000),
if(optionA.TEC=2,optionA.INV=3000),
if(optionA.TEC=3,optionA.INV=3900),
if(optionA.TEC=4,optionA.INV=4700),
if(optionA.TEC=5,optionA.INV=3000),
if(optionA.TEC=6,optionA.INV=3900),
if(optionA.TEC=7,optionA.INV=4700),
if(optionA.TEC=8,optionA.INV=10000),
if(optionA.TEC=9,optionA.INV=11500),
if(optionA.TEC=10,optionA.INV=13000),
if(optionA.TEC=11,optionA.INV=13000),
if(optionA.TEC=12,optionA.INV=11000),
if(optionA.TEC=13,optionA.INV=2500),
if(optionA.TEC=1,optionA.DEP=1285),
if(optionA.TEC=2,optionA.DEP=1726),
if(optionA.TEC=3,optionA.DEP=1600),
if(optionA.TEC=4,optionA.DEP=1487),
if(optionA.TEC=5,optionA.DEP=2051),
if(optionA.TEC=6,optionA.DEP=1899),
if(optionA.TEC=7,optionA.DEP=1763),
if(optionA.TEC=8,optionA.DEP=1258),
if(optionA.TEC=9,optionA.DEP=1196),
if(optionA.TEC=10,optionA.DEP=1219),
if(optionA.TEC=11,optionA.DEP=1219),
if(optionA.TEC=12,optionA.DEP=1285),
if(optionA.TEC=13,optionA.DEP=2968),
if(optionA.TEC=1,optionA.CO2=1),
if(optionA.TEC=2,optionA.CO2=3),
if(optionA.TEC=3,optionA.CO2=3),
if(optionA.TEC=4,optionA.CO2=3),
if(optionA.TEC=5,optionA.CO2=1),
if(optionA.TEC=6,optionA.CO2=1),
if(optionA.TEC=7,optionA.CO2=1),
if(optionA.TEC=8,optionA.CO2=1),
if(optionA.TEC=9,optionA.CO2=1),
if(optionA.TEC=10,optionA.CO2=1),
if(optionA.TEC=11,optionA.CO2=1),
if(optionA.TEC=12,optionA.CO2=1),
if(optionA.TEC=13,optionA.CO2=2),
if(optionA.TEC=1,optionA.ALI=0),
if(optionA.TEC=2,optionA.ALI=0),
if(optionA.TEC=3,optionA.ALI=0),
if(optionA.TEC=4,optionA.ALI=0),
if(optionA.TEC=5,optionA.ALI=0),
if(optionA.TEC=6,optionA.ALI=0),
if(optionA.TEC=7,optionA.ALI=0),
if(optionA.TEC=10,optionA.ALI=0),
if(optionA.TEC=11,optionA.ALI=1),
if(optionA.TEC=12,optionA.ALI=0),
if(optionA.TEC=13,optionA.ALI=0),
if(optionA.TEC=1,optionA.STO=0),
if(optionA.TEC=2,optionA.STO=0),
if(optionA.TEC=3,optionA.STO=0),
if(optionA.TEC=4,optionA.STO=0),
if(optionA.TEC=5,optionA.STO=0),
if(optionA.TEC=6,optionA.STO=0),
if(optionA.TEC=7,optionA.STO=0),
if(optionA.TEC=8,optionA.STO=[4,8]),
if(optionA.TEC=9,optionA.STO=[4,8]),
if(optionA.TEC=10,optionA.STO=[4,8]),
if(optionA.TEC=11,optionA.STO=[4,8]),
if(optionA.TEC=12,optionA.STO=0),
if(optionA.TEC=13,optionA.STO=0),
if(optionA.TEC=1,optionA.CLIM=0),
if(optionA.TEC=2,optionA.CLIM=0),
if(optionA.TEC=3,optionA.CLIM=0),
if(optionA.TEC=4,optionA.CLIM=0),
if(optionA.TEC=5,optionA.CLIM=0),
if(optionA.TEC=6,optionA.CLIM=0),
if(optionA.TEC=7,optionA.CLIM=0),
if(optionA.TEC=8,optionA.CLIM=0),
if(optionA.TEC=9,optionA.CLIM=0),
if(optionA.TEC=10,optionA.CLIM=0),
if(optionA.TEC=11,optionA.CLIM=0),
if(optionA.TEC=12,optionA.CLIM=1),
if(optionA.TEC=13,optionA.CLIM=0),
if(optionB.TEC=1,optionB.INV=11000),
if(optionB.TEC=2,optionB.INV=3000),
if(optionB.TEC=3,optionB.INV=3900),
if(optionB.TEC=4,optionB.INV=4700),
if(optionB.TEC=5,optionB.INV=3000),
if(optionB.TEC=6,optionB.INV=3900),
if(optionB.TEC=7,optionB.INV=4700),
if(optionB.TEC=8,optionB.INV=10000),
if(optionB.TEC=9,optionB.INV=11500),
if(optionB.TEC=10,optionB.INV=13000),
if(optionB.TEC=11,optionB.INV=13000),
if(optionB.TEC=12,optionB.INV=11000),
if(optionB.TEC=13,optionB.INV=2500),
if(optionB.TEC=1,optionB.DEP=1285),
if(optionB.TEC=2,optionB.DEP=1726),
if(optionB.TEC=3,optionB.DEP=1600),
if(optionB.TEC=4,optionB.DEP=1487),
if(optionB.TEC=5,optionB.DEP=2051),
if(optionB.TEC=6,optionB.DEP=1899),
if(optionB.TEC=7,optionB.DEP=1763),
if(optionB.TEC=8,optionB.DEP=1258),
if(optionB.TEC=9,optionB.DEP=1196),
if(optionB.TEC=10,optionB.DEP=1219),
if(optionB.TEC=11,optionB.DEP=1219),
if(optionB.TEC=12,optionB.DEP=1285),
if(optionB.TEC=13,optionB.DEP=2968),
if(optionB.TEC=1,optionB.CO2=1),
if(optionB.TEC=2,optionB.CO2=3),
if(optionB.TEC=3,optionB.CO2=3),
if(optionB.TEC=4,optionB.CO2=3),
if(optionB.TEC=5,optionB.CO2=1),
if(optionB.TEC=6,optionB.CO2=1),
if(optionB.TEC=7,optionB.CO2=1),
if(optionB.TEC=8,optionB.CO2=1),
if(optionB.TEC=9,optionB.CO2=1),
if(optionB.TEC=10,optionB.CO2=1),
if(optionB.TEC=11,optionB.CO2=1),
if(optionB.TEC=12,optionB.CO2=1),
if(optionB.TEC=13,optionB.CO2=2),
if(optionB.TEC=1,optionB.ALI=0),
if(optionB.TEC=2,optionB.ALI=0),
if(optionB.TEC=3,optionB.ALI=0),
if(optionB.TEC=4,optionB.ALI=0),
if(optionB.TEC=5,optionB.ALI=0),
if(optionB.TEC=6,optionB.ALI=0),
if(optionB.TEC=7,optionB.ALI=0),
if(optionB.TEC=10,optionB.ALI=0),
if(optionB.TEC=11,optionB.ALI=1),
if(optionB.TEC=12,optionB.ALI=0),
if(optionB.TEC=13,optionB.ALI=0),
if(optionB.TEC=1,optionB.STO=0),
if(optionB.TEC=2,optionB.STO=0),
if(optionB.TEC=3,optionB.STO=0),
if(optionB.TEC=4,optionB.STO=0),
if(optionB.TEC=5,optionB.STO=0),
if(optionB.TEC=6,optionB.STO=0),
if(optionB.TEC=7,optionB.STO=0),
if(optionB.TEC=8,optionB.STO=[4,8]),
if(optionB.TEC=9,optionB.STO=[4,8]),
if(optionB.TEC=10,optionB.STO=[4,8]),
if(optionB.TEC=11,optionB.STO=[4,8]),
if(optionB.TEC=12,optionB.STO=0),
if(optionB.TEC=13,optionB.STO=0),
if(optionB.TEC=1,optionB.CLIM=0),
if(optionB.TEC=2,optionB.CLIM=0),
if(optionB.TEC=3,optionB.CLIM=0),
if(optionB.TEC=4,optionB.CLIM=0),
if(optionB.TEC=5,optionB.CLIM=0),
if(optionB.TEC=6,optionB.CLIM=0),
if(optionB.TEC=7,optionB.CLIM=0),
if(optionB.TEC=8,optionB.CLIM=0),
if(optionB.TEC=9,optionB.CLIM=0),
if(optionB.TEC=10,optionB.CLIM=0),
if(optionB.TEC=11,optionB.CLIM=0),
if(optionB.TEC=12,optionB.CLIM=1),
if(optionB.TEC=13,optionB.CLIM=0),
if(optionC.TEC=1,optionC.INV=11000),
if(optionC.TEC=2,optionC.INV=3000),
if(optionC.TEC=3,optionC.INV=3900),
if(optionC.TEC=4,optionC.INV=4700),
if(optionC.TEC=5,optionC.INV=3000),
if(optionC.TEC=6,optionC.INV=3900),
if(optionC.TEC=7,optionC.INV=4700),
if(optionC.TEC=8,optionC.INV=10000),
if(optionC.TEC=9,optionC.INV=11500),
if(optionC.TEC=10,optionC.INV=13000),
if(optionC.TEC=11,optionC.INV=13000),
if(optionC.TEC=12,optionC.INV=11000),
if(optionC.TEC=13,optionC.INV=2500),
if(optionC.TEC=1,optionC.DEP=1285),
if(optionC.TEC=2,optionC.DEP=1726),
if(optionC.TEC=3,optionC.DEP=1600),
if(optionC.TEC=4,optionC.DEP=1487),
if(optionC.TEC=5,optionC.DEP=2051),
if(optionC.TEC=6,optionC.DEP=1899),
if(optionC.TEC=7,optionC.DEP=1763),
if(optionC.TEC=8,optionC.DEP=1258),
if(optionC.TEC=9,optionC.DEP=1196),
if(optionC.TEC=10,optionC.DEP=1219),
if(optionC.TEC=11,optionC.DEP=1219),
if(optionC.TEC=12,optionC.DEP=1285),
if(optionC.TEC=13,optionC.DEP=2968),
if(optionC.TEC=1,optionC.CO2=1),
if(optionC.TEC=2,optionC.CO2=3),
if(optionC.TEC=3,optionC.CO2=3),
if(optionC.TEC=4,optionC.CO2=3),
if(optionC.TEC=5,optionC.CO2=1),
if(optionC.TEC=6,optionC.CO2=1),
if(optionC.TEC=7,optionC.CO2=1),
if(optionC.TEC=8,optionC.CO2=1),
if(optionC.TEC=9,optionC.CO2=1),
if(optionC.TEC=10,optionC.CO2=1),
if(optionC.TEC=11,optionC.CO2=1),
if(optionC.TEC=12,optionC.CO2=1),
if(optionC.TEC=13,optionC.CO2=2),
if(optionC.TEC=1,optionC.ALI=0),
if(optionC.TEC=2,optionC.ALI=0),
if(optionC.TEC=3,optionC.ALI=0),
if(optionC.TEC=4,optionC.ALI=0),
if(optionC.TEC=5,optionC.ALI=0),
if(optionC.TEC=6,optionC.ALI=0),
if(optionC.TEC=7,optionC.ALI=0),
if(optionC.TEC=10,optionC.ALI=0),
if(optionC.TEC=11,optionC.ALI=1),
if(optionC.TEC=12,optionC.ALI=0),
if(optionC.TEC=13,optionC.ALI=0),
if(optionC.TEC=1,optionC.STO=0),
if(optionC.TEC=2,optionC.STO=0),
if(optionC.TEC=3,optionC.STO=0),
if(optionC.TEC=4,optionC.STO=0),
if(optionC.TEC=5,optionC.STO=0),
if(optionC.TEC=6,optionC.STO=0),
if(optionC.TEC=7,optionC.STO=0),
if(optionC.TEC=8,optionC.STO=[4,8]),
if(optionC.TEC=9,optionC.STO=[4,8]),
if(optionC.TEC=10,optionC.STO=[4,8]),
if(optionC.TEC=11,optionC.STO=[4,8]),
if(optionC.TEC=12,optionC.STO=0),
if(optionC.TEC=13,optionC.STO=0),
if(optionC.TEC=1,optionC.CLIM=0),
if(optionC.TEC=2,optionC.CLIM=0),
if(optionC.TEC=3,optionC.CLIM=0),
if(optionC.TEC=4,optionC.CLIM=0),
if(optionC.TEC=5,optionC.CLIM=0),
if(optionC.TEC=6,optionC.CLIM=0),
if(optionC.TEC=7,optionC.CLIM=0),
if(optionC.TEC=8,optionC.CLIM=0),
if(optionC.TEC=9,optionC.CLIM=0),
if(optionC.TEC=10,optionC.CLIM=0),
if(optionC.TEC=11,optionC.CLIM=0),
if(optionC.TEC=12,optionC.CLIM=1),
if(optionC.TEC=13,optionC.CLIM=0),
if(optionA.TEC=1,optionB.TEC=[2,3,4,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=2,optionB.TEC=[1,3,4,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=3,optionB.TEC=[1,2,4,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=4,optionB.TEC=[1,2,3,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=5,optionB.TEC=[1,2,3,4,6,7,8,9,10,11,12,13]),
if(optionA.TEC=6,optionB.TEC=[1,2,3,4,5,7,8,9,10,11,12,13]),
if(optionA.TEC=7,optionB.TEC=[1,2,3,4,5,6,8,9,10,11,12,13]),
if(optionA.TEC=8,optionB.TEC=[1,2,3,4,5,6,7,9,10,11,12,13]),
if(optionA.TEC=9,optionB.TEC=[1,2,3,4,5,6,7,8,10,11,12,13]),
if(optionA.TEC=10,optionB.TEC=[1,2,3,4,5,6,7,8,9,11,12,13]),
if(optionA.TEC=11,optionB.TEC=[1,2,3,4,5,6,7,8,9,10,12,13]),
if(optionA.TEC=12,optionB.TEC=[1,2,3,4,5,6,7,8,9,10,11,13]),
if(optionA.TEC=13,optionB.TEC=[1,2,3,4,5,6,7,8,9,10,11,12]),
if(optionA.TEC=1,optionC.TEC=[2,3,4,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=2,optionC.TEC=[1,3,4,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=3,optionC.TEC=[1,2,4,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=4,optionC.TEC=[1,2,3,5,6,7,8,9,10,11,12,13]),
if(optionA.TEC=5,optionC.TEC=[1,2,3,4,6,7,8,9,10,11,12,13]),
if(optionA.TEC=6,optionC.TEC=[1,2,3,4,5,7,8,9,10,11,12,13]),
if(optionA.TEC=7,optionC.TEC=[1,2,3,4,5,6,8,9,10,11,12,13]),
if(optionA.TEC=8,optionC.TEC=[1,2,3,4,5,6,7,9,10,11,12,13]),
if(optionA.TEC=9,optionC.TEC=[1,2,3,4,5,6,7,8,10,11,12,13]),
if(optionA.TEC=10,optionC.TEC=[1,2,3,4,5,6,7,8,9,11,12,13]),
if(optionA.TEC=11,optionC.TEC=[1,2,3,4,5,6,7,8,9,10,12,13]),
if(optionA.TEC=12,optionC.TEC=[1,2,3,4,5,6,7,8,9,10,11,13]),
if(optionA.TEC=13,optionC.TEC=[1,2,3,4,5,6,7,8,9,10,11,12]),
if(optionC.TEC=1,optionB.TEC=[2,3,4,5,6,7,8,9,10,11,12,13]),
if(optionC.TEC=2,optionB.TEC=[1,3,4,5,6,7,8,9,10,11,12,13]),
if(optionC.TEC=3,optionB.TEC=[1,2,4,5,6,7,8,9,10,11,12,13]),
if(optionC.TEC=4,optionB.TEC=[1,2,3,5,6,7,8,9,10,11,12,13]),
if(optionC.TEC=5,optionB.TEC=[1,2,3,4,6,7,8,9,10,11,12,13]),
if(optionC.TEC=6,optionB.TEC=[1,2,3,4,5,7,8,9,10,11,12,13]),
if(optionC.TEC=7,optionB.TEC=[1,2,3,4,5,6,8,9,10,11,12,13]),
if(optionC.TEC=8,optionB.TEC=[1,2,3,4,5,6,7,9,10,11,12,13]),
if(optionC.TEC=9,optionB.TEC=[1,2,3,4,5,6,7,8,10,11,12,13]),
if(optionC.TEC=10,optionB.TEC=[1,2,3,4,5,6,7,8,9,11,12,13]),
if(optionC.TEC=11,optionB.TEC=[1,2,3,4,5,6,7,8,9,10,12,13]),
if(optionC.TEC=12,optionB.TEC=[1,2,3,4,5,6,7,8,9,10,11,13]),
if(optionC.TEC=13,optionB.TEC=[1,2,3,4,5,6,7,8,9,10,11,12])
;model:
U(optionA)= b0[1]*TEC[1,2,3,4,5,6,7,8,9,10,11,12,13] + b1[-0.000153]*INV[13000,11500,11000,10000,4700,3900,3000,2500] + b2[-0.00050672]*DEP[2968,2051,1899,1763,1726,1600,1487,1285,1258,1219,1196] + b3.effects[-0.6225|-0.415]*CO2[3,2,1] + b4[-0.63]*ALI[1,0] + b5[-0.1625]*STO[8,4,0] + B6[0.5] *ANT[3,2,1]+ B7[0.5]*CLIM[1,0]/
U(optionB)= b0*TEC + b1*INV + b2*DEP + b3*CO2 + b4*ALI + b5*STO + B6 *ANT+ B7*CLIM /
U(optionC)= b0*TEC + b1*INV + b2*DEP + b3*CO2 + b4*ALI + b5*STO + B6 *ANT+ B7*CLIM
$