Page 1 of 1

Infinite iterations for the MNL design

PostPosted: Wed Apr 06, 2022 11:43 pm
by Rongqiu Song
Dear all,

I am doing an unlabelled choice experiment design about charging station preferences for electric vehicles. Respondents can choose among two charging station options or none of them. 10 attributes are chosen for this design.

Code: Select all
? Unlabelled experiment - based on MNL
? Attributes
? ------------------------
? location: charging locations, including 4 levels
? time:charging time, including 6 levels
? price: charging price, including 6 levels
? distance: distance from the destination to charging points, including 4 levels
? wait: waiting time, including 4 levels
? pay: payment methods, including 4 levels
? amen: amenities around the charging stations, including 4 levels
? self: availability of self-charging services, including 2 levels
? info: availability of station information online, including 2 levels
? help: availability of helpline service, including 2 levels


Design;
alts=alt1*,alt2*,None;
rows=48;
block=12;
eff=(mnl,d);
alg = swap(stop=total(10 mins))

? set a condition: when charging price equals to range A, then charging time equals to range B - this refers to different charging power of the station
;cond:
If (alt1.price = [7, 8, 9], alt1.time = [1, 3, 4]),
If (alt2.price = [7, 8, 9], alt2.time = [1, 3, 4]),
If (alt2.price = [10, 12, 14], alt2.time = [0.17, 0.3, 0.5]),
If (alt1.price = [10, 12, 14], alt1.time = [0.17, 0.3, 0.5]);

?utilities;
model:
U(alt1)=b1[0]*location[1,2,3,4] +b2[0]*time[0.17,0.3,0.5,1,3,4]+b3[0]*price[7,8,9,10,12,14]+b4[0]*distance[100,250,500,1000]+b5[0]*wait[0,2,5,10]+b6[0]*pay[1,2,3,4]
       +b7[0]*amen[1,2,3,4]+b8[0]*self[1,2] + b9[0]*info[1,2]+ b10[0]*help[1,2] /

U(alt2)=b1*location+b2*time+b3*price+b4*distance+b5*wait+b6*pay+b7*amen+b8*self+b9*info+b10*help

$


My questions is:

When I copy this syntax into Ngene, the model seems run infinitely and I cannot get a D-error. I really don't get why this happen.
Could you please help me check the syntax and maybe help me figure out where the problem is? I really appreciate it.

Many thanks,
Rongqiu

Re: Infinite iterations for the MNL design

PostPosted: Thu Apr 07, 2022 11:22 am
by Michiel Bliemer
The syntax runs fine for me and the D-error Ngene produces is about 0.006.

It is correct that Ngene runs indefinintely, there are literaterally billions and billions of possible designs to evaluate and therefore Ngene just keeps evaluating designs and reporting one whenever the D-error is lower. That does not mean that you need to wait for it to finish; at some point, the D-error only marginally improves and then you simply stop the algorithm and select the best design at that point.

I notice that you have several categorical attributes but you have inserted them into the utility function as a numerical attribute. While a proce level of 7 has a numerical meaning, a local level of 1 does not have a numerical meaning. You will need to use dummy (or effects) coding to represent categorical attributes in a utility function.

So you will need something like:

b1.dummy[0|0|0] * location[1,2,3,4] ? the last level is the base level
b8.dummy[0] * self[1,2] ? 1 = yes, 2 = no (base)

When having J levels, you will have J-1 dummy variables and therefore J-1 coefficients (each with a prior).

Michiel