Constrains design problem

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Constrains design problem

Postby Yanghan » Sun Jan 07, 2024 12:13 am

Dear Ngene team and all,
I'm not proficient in this software yet. I can't understand the meaning of the warn message after run the code. I do not know how to adujust the code with the warning message.I need your help.
Code: Select all
Design
;alts=bus,subway,taxi,hailingcar
;rows=18
;blocks=6
;eff=(mnl,d)
;cond:
if(bus.VT1=40,taxi.VT3=22 and hailingcar.VT3=22 and taxi.TC3=27 and hailingcar.TC4=23),
if(bus.VT1=48,taxi.VT3=26 and hailingcar.VT3=26 and taxi.TC3=29 and hailingcar.TC4=25),
if(bus.VT1=56,taxi.VT3=30 and hailingcar.VT3=30 and taxi.TC3=32 and hailingcar.TC4=28)
;model:
U(bus)=a1[0.1]+b1[-0.1]*BL[0,1,2]+b2[-0.1]*CP[0,1,2]+b3[-0.1]*VT1[40,48,56]+b4[-0.1]*WT1[3,6,10]+b5[-0.2]*TC1[2]/
U(subway)=a2[0.1]+b1*BL[BL]+b2*CP[CP]+b3*VT2[25]+b4*WT2[3,5,9]+b5*TC2[4]+b6[-0.4]*CR[1,2,3]/
U(taxi)=a3[0]+b1*BL[BL]+b2*CP[CP]+b3*VT3[22,26,30]+b4*WT3[5,10,15]+b5*TC3[27,29,32]/
U(hailingcar)=b1*BL[BL]+b2*CP[CP]+b3*VT3+b4*WT3+b5*TC4[23,25,28] 
$


Warning message:
Note:
The conditional statement nesting cluster 1 contains 3 permissible combinations of attribute levels.
The nesting cluster contains the following if statements:
* if(bus.vt1=40,taxi.vt3=22 and hailingcar.vt3=22 and taxi.tc3=27 and hailingcar.tc4=23)
* if(bus.vt1=48,taxi.vt3=26 and hailingcar.vt3=26 and taxi.tc3=29 and hailingcar.tc4=25)
* if(bus.vt1=56,taxi.vt3=30 and hailingcar.vt3=30 and taxi.tc3=32 and hailingcar.tc4=28)
An attempt will be made to balance the frequency of each level in attributes affected by constraints, however complete balance might not be possible.
[Random] Finished initial seeding (2601746746.97139)
[Swap] Start row swapping with initial seed. (10000 iterations of swapping)
[Swap] Finished with row swapping on the current seed

My design idea:
The purpose of my research is to study the factors that influence the choice of travel mode. In order to consider the effect of road congestion on travel time(VT) and travel cost (TC) in bus, taxi and hailingcar, I envision that when road is clear without congestion, the VT of bus, taxi, hailing car is in low level, with value of 40,22, 22 respectively, so TC of taxi and hailingcar also in low level, with value of 27,23 respectively. When road is in moderate congestion level, the VT of bus, taxi, hailing car is in middle level, with value of 48,26,26 respectively, so the TC of taxi and hailingcar also in middle level, with value of 29,25 respectively. The same goes for high congestion level. The travel cost of public transportation is unchanged, with just one level. The travel time of subway is not affected by road congestion. BL stands for Baggage Load, 'CP' stands for number of companions, 'CR' stands for the level of congestion in the carriage.

My question:
There still exist iteration history, but the value of ML D-error is large, reaching 2691773047. I find that other study's efficient design all have a low value of D-error(less than 1). I want to know if my design is invalid? Whether it is due to the assignment of CP and BL variables? If I want to get the DOE results I want, how do I adjust my code?

Looking forward to your reply. Thank you in advance.
Yanghan
 
Posts: 2
Joined: Sat Jan 06, 2024 4:51 pm

Re: Constrains design problem

Postby Michiel Bliemer » Sun Jan 07, 2024 3:52 pm

The warning is just letting you know that attribute level balance may not be satisfied if you impose constraints. This is just a note for you to be aware, but it is not a problem (it is not an error).

The utility functions that you specified cannot be estimated because your model is over identified, which is indicated by your near infinite D-error. The issue is with your scenario variables, BL and CP. You included them in all alternatives as a main effect, but this means that b1 and b2 are not identifiable. You can see this also when you inspect the design and look at the Fisher information matrix, which gives zeros for parameters b1 and b2 because they cannot be estimated. With scenario variables, you either need to include them as an interaction effect, or in a labelled experiment (as in your case) you can also add them as a main effect in all-but-one alternative. In other words, you need to choose one of the alternatives as the base alternative, e.g. hailingcar, and remove BL and CP from the utility function here. Further, you probably want to estimate an alternative-specific parameter for these scenarios, see script below. If b1_b < 0 then this means that bus becomes less attractive than hailingcar if baggage load increases.

Is BL a numerical variable? If not, you want to use dummy coding, e.g. b1.dummy[-0.1|-0.2] * BL[1,2,0].

Further, you may want to consider estimating alternative-specific parameters for VT since travel time is experienced very differently in a bus, taxi, subway, or car. To allow estimation of alternative-specific parameters, you need to give the design a bit more flexibility, i.e. allow multiple levels for VT2, e.g. 23,25,27, and you probably also want to relax your conditional constraints to allow some variation in the data as otherwise you are introducing too many correlations in the data.

Also, ;blocks should be ;block

The script below is an example of what I suggest in the above.

Code: Select all
Design
;alts=bus,subway,taxi,hailingcar
;rows=18
;block=6
;eff=(mnl,d)
;cond:
if(bus.VT1=40,taxi.VT3=[22,26] and hailingcar.VT3=[22,26] and taxi.TC3=[27,29] and hailingcar.TC4=[23,25]),
if(bus.VT1=56,taxi.VT3=[26,30] and hailingcar.VT3=[26,30] and taxi.TC3=[29,32] and hailingcar.TC4=[25,28])
;model:
U(bus)        = a1[0.1]
              + b1_b[-0.1]   * BL[0,1,2]
              + b2_b[-0.1]   * CP[0,1,2]
              + b3_b[-0.1]   * VT1[40,48,56]
              + b4[-0.1]     * WT1[3,6,10]
              + b5[-0.2]     * TC1[2]
              /
U(subway)     = a2[0.1]
              + b1_s         * BL[BL]
              + b2_s         * CP[CP]
              + b3_s         * VT2[23,25,27]
              + b4           * WT2[3,5,9]
              + b5           * TC2[4]
              + b6[-0.4]     * CR[1,2,3]
              /
U(taxi)       = a3[0]
              + b1_t       * BL[BL]
              + b2_t       * CP[CP]
              + b3_t       * VT3[22,26,30]
              + b4         * WT3[5,10,15]
              + b5         * TC3[27,29,32]
              /
U(hailingcar) = b3_h       * VT3
              + b4         * WT3
              + b5         * TC4[23,25,28]
$


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

Re: Constrains design problem

Postby Yanghan » Sun Jan 07, 2024 5:23 pm

Thank you very much for your reply, now I know how to adjust my code.
Yanghan
 
Posts: 2
Joined: Sat Jan 06, 2024 4:51 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: Google [Bot] and 45 guests