require property

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

require property

Postby albertomzanni » Mon Jul 18, 2011 9:09 am

Hi all,

I am quite new to NGene and have been trying in the last days to prepare a design very similar to the one used by Li, Hensher and Rose (2010). Willingness to Pay for travel time reliability in passenger transport: a review and some new empirical evidence. TR-E 46:384-403.

My design refers to a mode coice and I am finding it difficult to design the attributes reporting probabilities of a service being a number of minutes early or late (as well as on time).

Here is the code I am using

Design;
alts= air, train, car, coach, no travel;
rows=32;
block=4;
eff= (mnl,d);
require:
air.PAEa + air.PuAir + air.PAL1 + air.PAL2 = 100,
train.PTEa + train.PuTr + train.PTL1 + train.PTL2 = 100,
car.PCaEa + car.PuCa + car.PCaL1 + car.PCaL2 = 100,
coach.PCoEa + coach.PuCo + coach.PCoL1 + coach.PCoL2 = 100;
model:
U(air)=A1[-0.01]* AAT [90,120,150,180,210]+ A2[-0.06]*ADur [70,90,105]+ A3 [-0.08]* ACost [50,80,110,140,170,200,230] +
i1A[-0.001]* EaAir [10,20,30]* PAEa [0,10,20] + A4[0.1]* PuAir [0,10,20] + i2A[0.001]*L1Air [15,45,90,150,210,270] *PAL1 [30,40,50] + i3A[0.002]* L2Air
[30,60,120,180,240,300] * PAL2 [40,50,60]/
U(train)=B1[-0.01]* TAT [30,45,60,75,90]+ B2[-0.001]*TDur [210,240,270,300]+ B3 [-0.01]* TCost [40,70,100,130,160,190,220] +
i1T[-0.001 ]* EaTr [10,20,30]* PTEa [0,10,20] + B4[0.1]* PuTr [0,10,20] + i2T[0.001]*L1Tr [15,45,90,150,210,270] *PTL1 [30,40,50] + i3T[0.002]* L2Tr
[30,60,120,180,240,300] * PTL2 [40,50,60]/
U(car)=C2[-0.06]*CaDur [390,420,450,480]+ C3 [-0.001]* CaCost [60,90,120,150,180,210,240] +
i1Ca[0.001]* EaCa [20,40,60]* PCaEa [0,10,20] + C4[0.1]* PuCa [0,10,20] + i2Ca[0.001]*L1Ca [15,45,90,150,210,270] *PCaL1 [30,40,50] + i3Ca[0.002]* L2Ca
[30,60,120,180,240,300] * PCaL2 [40,50,60]/
U(coach)=D1[-0.03]* CoAT [30,45,60,75,90]+ D3[-0.06]*CoDur [480,510,540,570]+ D4 [-0.02]* CoCost [20,40,60,80,100] +
i1Co[-0.001]* EaCo [10,20,30]* PCoEa [0,10,20] + b5[0.1]* PuCo [0,10,20] + i2Co[0.001]*L1Co [15,45,90,150,210,270] *PCoL1 [30,40,50] + i3Co[0.002]* L2Co
[30,60,120,180,240,300] * PcoL2 [40,50,60] $


Under the require property I want four probability measures for each mode (which are then interacted with the amoung of delay) to sum 100. It has not worked as the four probabilities do not sum up to 100 in each scenario, and after a more careful read of the manual I have realised that the require property, if I understand rightly, only allows for combinations of attribute levels to be specified.

Is there a way of making attributes to sum 100 or any other number. I am not sure my code above is the right one, and any help in better understanding the way to design such an experiment would be very welcomed.

Best
Alberto
albertomzanni
 
Posts: 3
Joined: Tue Jul 12, 2011 11:58 pm

Re: require property

Postby Michiel Bliemer » Thu Jul 21, 2011 4:49 am

Two quick comments:
1. Ngene uses (like Nlogit) a syntax in which each command starts with a semicolon ; instead of ending the previous command with it. It seems to work, but is confusing.
2. The require command needs a row-based algorithm, so please add ;alg = mfederov to your syntax for the constraints to work. You may have to limit the number of candidate solutions. I would like to refer to the manual where you can find in the reference guide more explanations on the require command and the alg command.

I hope that will help.
Michiel Bliemer
 
Posts: 1738
Joined: Tue Mar 31, 2009 4:13 pm

Re: require property

Postby albertomzanni » Tue Aug 09, 2011 12:04 am

Michiel,

thank you very much for your reply. I added the Federov Algorithm to the code and relocated the semicolumns at the beginning of the line.

Unfortunately the software seems to be crashing (as the frame of the output window appears but without text) then after several minutes the following message appears "there were problems generating a fractional factorial of choice tasks. For the modified Federov algorithm, increasing the number of candidates might assist".

I tried using a more powerful computer but the same thing happens. Is the design too complicated or the computer I am using still not powerful enough?

Thank you very much in advance

Alberto
albertomzanni
 
Posts: 3
Joined: Tue Jul 12, 2011 11:58 pm

Re: require property

Postby johnr » Tue Aug 09, 2011 5:51 pm

Hi Alberto

I tried this syntax based on what you posted originally and it seems to work with no difficulties:

Design;
;alts= air, train, car, coach, no travel
;rows=32
;block=4
;eff= (mnl,d)
;require:
air.PAEa + air.PuAir + air.PAL1 + air.PAL2 = 100,
train.PTEa + train.PuTr + train.PTL1 + train.PTL2 = 100,
car.PCaEa + car.PuCa + car.PCaL1 + car.PCaL2 = 100,
coach.PCoEa + coach.PuCo + coach.PCoL1 + coach.PCoL2 = 100
;model:
U(air)=A1[-0.01]* AAT [90,120,150,180,210]+ A2[-0.06]*ADur [70,90,105]+ A3 [-0.08]* ACost [50,80,110,140,170,200,230] +
i1A[-0.001]* EaAir [10,20,30]* PAEa [0,10,20] + A4[0.1]* PuAir [0,10,20] + i2A[0.001]*L1Air [15,45,90,150,210,270] *PAL1 [30,40,50] + i3A[0.002]* L2Air
[30,60,120,180,240,300] * PAL2 [40,50,60]/
U(train)=B1[-0.01]* TAT [30,45,60,75,90]+ B2[-0.001]*TDur [210,240,270,300]+ B3 [-0.01]* TCost [40,70,100,130,160,190,220] +
i1T[-0.001 ]* EaTr [10,20,30]* PTEa [0,10,20] + B4[0.1]* PuTr [0,10,20] + i2T[0.001]*L1Tr [15,45,90,150,210,270] *PTL1 [30,40,50] + i3T[0.002]* L2Tr
[30,60,120,180,240,300] * PTL2 [40,50,60]/
U(car)=C2[-0.06]*CaDur [390,420,450,480]+ C3 [-0.001]* CaCost [60,90,120,150,180,210,240] +
i1Ca[0.001]* EaCa [20,40,60]* PCaEa [0,10,20] + C4[0.1]* PuCa [0,10,20] + i2Ca[0.001]*L1Ca [15,45,90,150,210,270] *PCaL1 [30,40,50] + i3Ca[0.002]* L2Ca
[30,60,120,180,240,300] * PCaL2 [40,50,60]/
U(coach)=D1[-0.03]* CoAT [30,45,60,75,90]+ D3[-0.06]*CoDur [480,510,540,570]+ D4 [-0.02]* CoCost [20,40,60,80,100] +
i1Co[-0.001]* EaCo [10,20,30]* PCoEa [0,10,20] + b5[0.1]* PuCo [0,10,20] + i2Co[0.001]*L1Co [15,45,90,150,210,270] *PCoL1 [30,40,50] + i3Co[0.002]* L2Co
[30,60,120,180,240,300] * PcoL2 [40,50,60] $

I suggest you try this on your version of Ngene and let us know if it works or not.

John
johnr
 
Posts: 168
Joined: Fri Mar 13, 2009 7:15 am

Re: require property

Postby albertomzanni » Wed Aug 10, 2011 8:31 am

Hi John,

thank you very much for your reply.

I run the code you wrote and the software does produce designs but these do not meet the requirement of the sum of four attributes to be 100. Is there any way for that to happen?

Thanks

Alberto
albertomzanni
 
Posts: 3
Joined: Tue Jul 12, 2011 11:58 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 11 guests

cron