Use pivot with effect-coded attribute

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

Moderators: Michiel Bliemer, johnr, Andrew Collins

Use pivot with effect-coded attribute

Postby djourdain » Tue Apr 04, 2017 5:17 pm

Dear all,

I have difficulties to use pivot with effect-coded attributes.
The following design result in an error:

Design
; alts = alt1, alt2, alt3
; rows = 8
; eff = (mnl,d)
; model:
U(alt1) = b1*coutH.ref[100] + b2*wMH.ref[10] + b3.effects*stabRev.ref[2] /
U(alt2) = b0 + b1*coutH.piv[-100 , 0 , 100] + b2*wMH.piv[-10, 0, 20] + b3_1.effects[0|0]*stabRev.piv[1,2,3] /
U(alt3) = b0 + b1*coutH.piv[-100 , 0 , 100] + b2*wMH.piv[-10, 0, 20] + b3_1.effects[0|0]*stabRev.piv[1,2,3] $

Error: A pivot reference attribute has been specified with effects coding. The two are not compatible.

So far, I have tried this. Is this a correct way to circumvent my problem?

Design
; alts = alt1, alt2, alt3
; rows = 8
; eff = (mnl,d)
; model:
U(alt1) = b1*coutH.ref[100] + b2*wMH.ref[10] + b3*stabRev.ref[2] /
U(alt2) = b0 + b1*coutH.piv[-100 , 0 , 100] + b2*wMH.piv[-10, 0, 20] + b3_1.effects[0|0]*stabRev.piv[-1,0,1] /
U(alt3) = b0 + b1*coutH.piv[-100 , 0 , 100] + b2*wMH.piv[-10, 0, 20] + b3_1.effects[0|0]*stabRev.piv[-1,0,1] $




Best,

Damien
djourdain
 
Posts: 8
Joined: Mon Aug 19, 2013 7:55 pm

Re: Use pivot with effect-coded attribute

Postby Michiel Bliemer » Tue Apr 11, 2017 1:11 am

Apologies for the late reply, ew were all attending the International Choice Modelling Conference last week.

As the warning indicated, Ngene currently does not support effects coded variables in pivot designs. But there is a way to do this as follows:

Code: Select all
Design
;alts = alt1, alt2, alt3
;rows = 8
;eff = (mnl,d)
;alg = mfederov
;require:
alt1.stabRev = 2
;model:
U(alt1) = b1*coutHref[100] + b2*wMHref[10] + b3.effects[0|0]*stabRev[1,2,3] /
U(alt2) = b0 + b1*coutH[0,100,200](2-3,2-3,2-3) + b2*wMH[0,10,20](2-3,2-3,2-3) + b3.effects[0|0]*stabRev[1,2,3] /
U(alt3) = b0 + b1*coutH[0,100,200](2-3,2-3,2-3) + b2*wMH[0,10,20](2-3,2-3,2-3) + b3.effects[0|0]*stabRev[1,2,3] $


I have removed the references and pivots and replaced them with regular levels. Since I needed to add a constraint (;require command) I can only use the modified federov algorithm. In order to obtain some level of attribute level balance, I have added constraints on the number of times each level needs to appear in the design.

Outcome of this syntax is something like:


Choice situation alt1.couthref alt1.wmhref alt1.stabrev alt2.couth alt2.wmh alt2.stabrev alt3.couth alt3.wmh alt3.stabrev
1 100 10 2 100 20 3 200 0 2
2 100 10 2 200 20 2 0 0 3
3 100 10 2 200 0 3 0 20 1
4 100 10 2 0 0 2 200 10 3
5 100 10 2 0 10 2 100 0 1
6 100 10 2 100 20 3 0 10 1
7 100 10 2 200 0 1 100 20 2
8 100 10 2 0 10 3 200 20 1

You can manually create the pivot design by using the reference value, which results in

Choice situation alt1.couthref alt1.wmhref alt1.stabrev alt2.couth alt2.wmh alt2.stabrev alt3.couth alt3.wmh alt3.stabrev
1 100 10 2 0 10 1 100 -10 0
2 100 10 2 100 10 0 -100 -10 1
3 100 10 2 100 -10 1 -100 10 -1
4 100 10 2 -100 -10 0 100 0 1
5 100 10 2 -100 0 0 0 -10 -1
6 100 10 2 0 10 1 -100 0 -1
7 100 10 2 100 -10 -1 0 10 0
8 100 10 2 -100 0 1 100 10 -1
Michiel Bliemer
 
Posts: 401
Joined: Tue Mar 31, 2009 4:13 pm


Return to Stated choice experimental design

Who is online

Users browsing this forum: No registered users and 5 guests

cron