Different levels for one alternative

This forum is for posts covering broader stated choice experimental design issues.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Post Reply
eithne
Posts: 3
Joined: Mon Jun 05, 2023 5:26 am

Different levels for one alternative

Post by eithne »

Hello,
I am currently working on a design for a stated preference survey. There are 3 alternatives (different means of transport) and 3 attributes (3 levels each): in-vehicle travel time, waiting time and cost. I was thinking about adding another attribute corresponding to environmental impact with 5 levels: very low (1), low (2), medium (3), high (4) and very high (5). However, for one mode of transport (which would be public transport) this attribute should always be set as very low and low. The other two modes should have the levels medium or high.

I am struggling to find a good way to implement this attribute. The code below is wrong, as the levels for “env” are not specified correctly. I am sorry for a basic question, but I just started working with Ngene and could not find a solution in the manual. I would appreciate your support!

Code: Select all

Design
alts = car*, pt*, taxi*

;rows = 12
;block = 2
;eff = (mnl, d)
;con
 
;model:
U(car) =
asc_car +
b_env.dummy[0.00001] * env[3,4] + 
b_out_veh_tt_car[-0.00001] * out_veh_tt_car[0,5,10] +
b_in_veh_tt_car[-0.00001] * in_veh_tt_car[16,22,29] +
b_cost_car[-0.00001] * cost_car[4.4,9.1,10.4] /

U(pt) =
b_env.dummy[0.00001] * env[1,2] + 
b_out_veh_tt_pt[-0.00001] * out_veh_tt_pt[10,13,15] +
b_in_veh_tt_pt[-0.00001] * in_veh_tt_pt[22,28,33] +
b_cost_pt[-0.00001] * cost_pt[1.7,2.1,3.7] /

U(taxi) =
asc_taxi +
b_env.dummy[0.00001] * env[3,4] + 
b_out_veh_tt_taxi[-0.00001] * out_veh_tt_taxi[10,13,20] +
b_in_veh_tt_taxi[-0.00001] * in_veh_tt_taxi[16,22,29] +
b_cost_taxi[-0.00001] * cost_taxi[14.5,18.3,28.5]   
$ 
Michiel Bliemer
Posts: 2055
Joined: Tue Mar 31, 2009 4:13 pm

Re: Different levels for one alternative

Post by Michiel Bliemer »

You need to impose restrictions on the attribute levels of env, see script below. The reject property requires the modified Federov algorithm. This algorithm ignores attribute level balance so I added attribute level constraints (4-8,4-8,4-8) for numerical attributes to ensure that each attribute level appears between 4 and 8 times. Such constraints are generally not needed for categorical variables like env.

I increased the number of rows to 18 since you have quite a few parameters to estimate.

I removed the * after the alternative names since they are not generic.

Note that the env dummies are confounded with the constants if you only use levels 1 and 2 for pt and only levels 3 and 4 for car and taxi. You can estimate the constants as well as the dummies if you let one level overlap. In the script below, I assume that pt allows levels 1,2,3 and that car and taxi allow levels 3,4,5.

Code: Select all

Design
alts = car, pt, taxi

;rows = 18
;block = 3
;eff = (mnl, d)
;con
 
;alg = mfederov

;reject:
car.env < 3,
pt.env > 3,
taxi.env < 3

;model:
U(car) = asc_car 
       + b_env.dummy[0.004|0.003|0.002|0.001] * env[1,2,3,4,5] 
       + b_out_veh_tt_car[-0.00001]           * out_veh_tt_car[0,5,10](4-8,4-8,4-8) 
       + b_in_veh_tt_car[-0.00001]            * in_veh_tt_car[16,22,29](4-8,4-8,4-8) 
       + b_cost_car[-0.00001]                 * cost_car[4.4,9.1,10.4](4-8,4-8,4-8) 
       /
U(pt)  = b_env * env
       + b_out_veh_tt_pt[-0.00001]            * out_veh_tt_pt[10,13,15](4-8,4-8,4-8) 
       + b_in_veh_tt_pt[-0.00001]             * in_veh_tt_pt[22,28,33](4-8,4-8,4-8) 
       + b_cost_pt[-0.00001]                  * cost_pt[1.7,2.1,3.7](4-8,4-8,4-8) 
       /
U(taxi) = asc_taxi 
        + b_env                               * env
        + b_out_veh_tt_taxi[-0.00001]         * out_veh_tt_taxi[10,13,20](4-8,4-8,4-8) 
        + b_in_veh_tt_taxi[-0.00001]          * in_veh_tt_taxi[16,22,29](4-8,4-8,4-8) 
        + b_cost_taxi[-0.00001]               * cost_taxi[14.5,18.3,28.5](4-8,4-8,4-8)   
$ 
Michiel
eithne
Posts: 3
Joined: Mon Jun 05, 2023 5:26 am

Re: Different levels for one alternative

Post by eithne »

Dear Michiel,

thank you very much for your kind respond and the great explanation.
I worked more on the design and added additional waiting ("wt") and access times ("at"). In order to reduce the number of parameters to be estimated, I changed the number of env levels to 4 and made "b_at" common among the alternatives. The only question I would have is whether the design proposed by you became too unbalanced due to my modifications.
I would be grateful for your feedback.

Code: Select all

Design
alts = car, pt, taxi

;rows = 18
;block = 3
;eff = (mnl, d)
;con
 
;alg = mfederov

;reject:
car.env < 3,
pt.env > 3,
taxi.env < 3

;model:
U(car) = asc_car
       + b_env.dummy[0.003|0.002|0.001]       * env[1,2,3,4]
       + b_at[-0.00001]                                    * at_car[2,4,6](4-8,4-8,4-8)
       + b_ivt_car[-0.00001]                             * inv_car[19,29,39](4-8,4-8,4-8)
       + b_cost_car[-0.00001]                           * cost_car[4.4,9.1,10.4](4-8,4-8,4-8)
       /
U(pt)  = b_env                         * env
       + b_at                              * at_pt[5,8,10](4-8,4-8,4-8)
       + b_wt_pt[-0.00001]         * wt_pt[0,3,5](4-8,4-8,4-8)
       + b_ivt_pt[-0.00001]         * inv_pt[22,28,33](4-8,4-8,4-8)
       + b_cost_pt[-0.00001]       * cost_pt[1.7,2.1,3.7](4-8,4-8,4-8)
       /
U(taxi) = asc_taxi
        + b_env                           * env
        + b_at                             * at_taxi[2,4,6](4-8,4-8,4-8)
        + b_wt_taxi[-0.00001]     * wt_taxi[2,5,8](4-8,4-8,4-8)
        + b_ivt_taxi[-0.00001]     * ivt_taxi[8,9,11](4-8,4-8,4-8)
        + b_cost_taxi[-0.00001]   * cost_taxi[11,15,28.5](4-8,4-8,4-8)   
$
Michiel Bliemer
Posts: 2055
Joined: Tue Mar 31, 2009 4:13 pm

Re: Different levels for one alternative

Post by Michiel Bliemer »

I think it looks fine.
eithne
Posts: 3
Joined: Mon Jun 05, 2023 5:26 am

Re: Different levels for one alternative

Post by eithne »

Thank you very much for the support! :)
Post Reply