Labelled choice experiment, too many constraints?

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Labelled choice experiment, too many constraints?

Postby LaïlaS » Thu Jul 11, 2019 11:35 pm

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

$
LaïlaS
 
Posts: 6
Joined: Thu Jul 04, 2019 5:01 pm

Re: Labelled choice experiment, too many constraints?

Postby Michiel Bliemer » Thu Jul 18, 2019 6:48 am

You can try a few things to get this working:

1) Remove the last constraints since it is not strictly necessary that all options have a different TEC. You can simply let the algorithm determine the most optimal allocation of TECs across the alternatives; the algorithm will likely automatically make them different since this will result in a more efficient design (unless there is a dominant label).

2) You could try using ;require or ;reject constraints (and use ;alg = mfederov) instead of ;cond constraints. Sometimes this is easier, but not always.

3) You could try creating a candidate set of feasible choice tasks in Excel (e.g. 10,000 randomly selected choice tasks that satisfy your constraints) and use ;alg = mfederov(candidates = filename.xls) or something.

Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm

Re: Labelled choice experiment, too many constraints?

Postby LaïlaS » Tue Jul 30, 2019 1:16 am

Dear Michiel,

Thank you very much for your reply!

I have tried the first two options you proposed which sadly weren't conclusive. I have practical questions regarding the last option. I have tried every keyword possible to search the forum for a post that might help me but couldn't find any.

How should I display my 10,000 randomly generated choice tasks on Excel? I think I saw somewhere that one line has to describe a single choice task, i.e. the three alternatives' attributes, is it correct?
This would make my columns' names the following:

optionA.TEC optionB.TEC optionC.TEC optionA.INV optionB.INV optionC.INV optionA.DEP optionB.DEP optionC.DEP optionA.CO2 optionB.CO2 optionC.CO2 optionA.ALI optionB.ALI optionC.ALI optionA.STO optionB.STO optionC.STO optionA.CLIM optionB.CLIM optionC.CLIM

Because when I try using it with this:
;alg = mfederov(candidates = C:\Users\xxx\xxxxx\candidateset.xlsx )

I get that "The data file has inconsistent number of columns in rows".

And just to make sure, is it correct that if I ask Ngene to choose the choice tasks in this candidateset file (which only contains choice tasks that satisfy my constraints) I do not need to add any ;cond, ;reject or ;require? Just this:



design
;alts = optionA, optionB, optionC
;eff = (mnl,d)
;rows = 60
;block = 5
;alg = mfederov(candidates = C:\Users\xxx\xxxxx\candidateset.xlsx )

;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

$




Thank you so much for taking the time to help me!

Laïla
LaïlaS
 
Posts: 6
Joined: Thu Jul 04, 2019 5:01 pm

Re: Labelled choice experiment, too many constraints?

Postby Michiel Bliemer » Tue Jul 30, 2019 9:32 pm

Page 176 of the manual shows the structure of the spreadsheet and explains how to do this. It is relatively new feature of Ngene so there are not many questions on the forum about it yet.

An example of a header is:
Resp CSet optionA.TEC optionA.DEP ... optionb.TEC ...

You simply use all value 1 for the Resp column and you number Cset with 1, 2, 3, etc. for consecutive choice sets/tasks in the design.

It is best to first read in the spreadsheet in Ngene through File | Open. Then Ngene opens the file locally and you can refer to it without the full pathname. If you are not successful reading in an xlsx file (which may not work if it contains formulas or formatting), then first save as CSV and read in the CSV file.

Let me know if you need any further help in reading in a candidate set. You can still add constraints on the candidateset if you want, but you do not have to if you already made sure that all constraints are satisfied in your candidate set.

Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm

Re: Labelled choice experiment, too many constraints?

Postby LaïlaS » Fri Aug 02, 2019 7:14 pm

Dear Michiel,

Thank you again for your response. I structured my spreadsheet as you and the manual explained, and managed to open it in Ngene with File | Open.

However, when I try to run my code I get the following error message:

"Unhandled exception has occurred in your application. If you click Continue. The application will ignore this error and attempt to continue. If you click Quit. The application will close immediately.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"

Is this a problem from my computer or am I doing something wrong?

Thank you!

Laïla




MY CODE:

design
;alts = optionA, optionB, optionC
;eff = (mnl,d)
;rows = 60
;block = 5
;alg = mfederov(candidates =candidateset.xlsx)

;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

$
LaïlaS
 
Posts: 6
Joined: Thu Jul 04, 2019 5:01 pm

Re: Labelled choice experiment, too many constraints?

Postby Michiel Bliemer » Sat Aug 03, 2019 2:16 pm

This is an error message that occurs when something unexpected happens within the Ngene software due to inappropriate input (syntax or data). While Ngene checks the syntax and data for possible errors, it does not always pick up issues with the input and then calculations inside the software go wrong.
Your syntax looks fine so I suspect that there is an issue with the candidate set. Would you be able to email your spreadsheet to info@choice-metrics.com so that we can have a look?

One other thing, I notice that you set the prior for b0 to 1, which for an attribute level with levels 1 to 13 is very large such that this becomes a dominant attribute that messes up the efficiency of the design. Please make sure to use carefully chosen prior values, preferably from a pilot study. Also b6 has a relatively large prior value but not as problematic as b0. Since TEC is a qualitative variable (namely the label) it needs to be included with dummy or effects coding. You can simply set the priors to zero, i.e. b0.dummy[0|0|0|0|0|0|0|0|0|0|0|0]*TEC[1,2,3,4,5,6,7,8,9,10,11,12,13].

Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm

Re: Labelled choice experiment, too many constraints?

Postby LaïlaS » Tue Aug 06, 2019 11:21 pm

Dear Michiel,

I sent you my spreadsheet by email, thank you so much.

Concerning the value of the priors, they do come from a "pilot study" but conducted with a very small sample. We plan on using those to conduct an actual pilot study (250 observations) to get our "final" priors, i.e. the one we will use to get the choice tasks we will present to the 2000 individuals. However, I checked the prior for b6 that you pointed out for being relatively large, and it seems I got it mixed up with another, it should be -0.25!

Concerning the prior for b0 set to 1 and not coded as a dummy variable, you are absolutely right!

My new code is therefore:

design
;alts = optionA, optionB, optionC
;eff = (mnl,d)
;rows = 60
;block = 5
;alg = mfederov(candidates =candidateset.xlsx)
;model:
U(optionA)= b0.dummy[0|0|0|0|0|0|0|0|0|0|0|0]*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.25] *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

$

Thank you again, I'll be waiting for your feedback on the spreadsheet I sent you!

Laïla
LaïlaS
 
Posts: 6
Joined: Thu Jul 04, 2019 5:01 pm

Re: Labelled choice experiment, too many constraints?

Postby Michiel Bliemer » Wed Aug 07, 2019 11:11 am

I made a mistake in the email address, it is contact@choice-metrics.com, could you please send it there?

My apologies,
Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm

Re: Labelled choice experiment, too many constraints?

Postby Andrew Collins » Wed Aug 07, 2019 10:32 pm

I have replied to your email, but note the following:
* The ANT attribute is missing from the candidate set
* The optionC.ALI attribute is out of order and should be in the order in which the attribute is introduced in the utility expression.

The Ngene code is not currently doing as many checks on the file and alignment with syntax as we would like, leading to the hard crash you experienced. We will improve the error checking in the next point release. In the meantime, users are advised to check the completeness and order of the data file columns, compared to the attributes in the utility expressions.

Andrew
Andrew Collins
 
Posts: 78
Joined: Sat Mar 28, 2009 4:48 pm

Re: Labelled choice experiment, too many constraints?

Postby LaïlaS » Thu Aug 08, 2019 6:41 pm

Dear Michiel and Andrew,

I fixed my silly mistakes in the spreadsheet and it is running!

Thank you so much to both of you!

Laïla
LaïlaS
 
Posts: 6
Joined: Thu Jul 04, 2019 5:01 pm

Next

Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 8 guests

cron