Hi,
I am working on a design in which attribute levels should be realistic for the respondents. The condition I used before is just that travel times are higher when walking compared to cycling. However, what I would like to do is:
bike.time_bike*2.5 <= walk.time_walk
Is a condition like that possible and how?
Best regards,
Anna
Condition using a factor
Moderators: Andrew Collins, Michiel Bliemer, johnr
-
Michiel Bliemer
- Posts: 2057
- Joined: Tue Mar 31, 2009 4:13 pm
Re: Condition using a factor
The ;require and ;reject constraints do not recognise multiplications or divisions, but you could use the ;cond constraints. For example:
Michiel
Code: Select all
design
;alts = walk, bike
;rows = 12
;eff = (mnl,d)
;cond:
if(bike.bike_time = 10, walk.walk_time = [25,35,45,55,65,75]),
if(bike.bike_time = 15, walk.walk_time = [45,55,65,75]),
if(bike.bike_time = 20, walk.walk_time = [55,65,75]),
if(bike.bike_time = 25, walk.walk_time = [65,75]),
if(bike.bike_time = 30, walk.walk_time = 75)
;model:
U(walk) = b0 + b1 * walk_time[15,25,35,45,55,65,75] /
U(bike) = b2 * bike_time[5,10,15,20,25,30]
$