Dummy coding in SQ

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Dummy coding in SQ

Postby Mahlalela » Wed Jul 18, 2018 8:13 pm

Good day,

I have 2 unlabelled alternatives and a status quo option. The status quo option is wetcon[0], infedu[12], toupre[2.5] and a price attribute hhtax[0]. Attribute A is a dummy with 3 levels (1,2,0) where 0 is the base. I am new to Ngene.

If you want to fix the levels of the other attributes, you can do that also, but please be careful. If you read the most recent posts, you will see doing this can cause issues with dummy codes.


In light of the above quote, what measures can I take to ensure that issues with dummy codes in the status quo option (in the syntax) are minimised?

Code: Select all
Design
;alts = alt1, alt2, sq
;rows = 12
;eff = (mnl,d,mean)
;bdraws = gauss(1)
;model:
U(alt1) = b2.dummy[(n,0.169831,0.086648)|(n,0.339661,0.086648)] * wetcon[1,2,0] +
              b3[(n,0.05661,0.014441)] * infedu[8,12,16] +
              b4[(n,0.069674,0.017774)] * toupre[1,2.5,5,7.5] +
              b5[(n,-0.011322,0.00525)] * hhtax[0,10,20,40,80,120]/
U(alt2) = b2 * wetcon +
              b3 * infedu +
              b4 * toupre +
              b5 * hhtax /
U(sq) = b2 * wetcon1[0] +
           b3 * infedu1[12] +
           b4 * toupre1[2.5] +
           b5 * hhtax1[0] $


I have also tried to run another syntax where I did not specify the status quo option in the model. My concern with is that where there is a 0 price in either alt1 or alt2, that alternative in some instances becomes inherently dominant. I think the respondent is likely to make a choice between that alt with a 0 price and the status quo. Please advise.

Code: Select all
Design
;alts = alt1*, alt2*, sq
;rows = 12
;eff = (mnl,d,mean)
;bdraws = gauss(1)
;model:
U(alt1) = b2.dummy[(n,0.169831,0.086648)|(n,0.339661,0.086648)] * wetcon[1,2,0] +
              b3[(n,0.05661,0.014441)] * infedu[8,12,16] +
              b4[(n,0.069674,0.017774)] * toupre[1,2.5,5,7.5] +
              b5[(n,-0.011322,0.00525)] * hhtax[0,10,20,40,80,120]/
U(alt2) = b2 * wetcon +
              b3 * infedu +
              b4 * toupre +
              b5 * hhtax $


I could not run the first syntax and the latter ran but had 4 choice tasks that had 0 price or household tax increment in alt1 or alt2 which were dominant.

The last syntax I have does not include the 0 price in alt1 and alt2. If there is no solution to design 1 and 2, can I use design 3 below and specify SQ in the DCE survey?

Code: Select all
Design
;alts = alt1*, alt2*, sq
;rows = 12
;eff = (mnl,d,mean)
;bdraws = gauss(1)
;model:
U(alt1) = b2.dummy[(n,0.169831,0.086648)|(n,0.339661,0.086648)] * wetcon[1,2,0] +
              b3[(n,0.05661,0.014441)] * infedu[8,12,16] +
              b4[(n,0.069674,0.017774)] * toupre[1,2.5,5,7.5] +
              b5[(n,-0.011322,0.00525)] * hhtax[5,10,20,40,80,120]/
U(alt2) = b2 * wetcon +
              b3 * infedu +
              b4 * toupre +
              b5 * hhtax $


Thank you,

Linda
Mahlalela
 
Posts: 4
Joined: Fri May 26, 2017 9:03 pm

Re: Dummy coding in SQ

Postby Michiel Bliemer » Fri Jul 20, 2018 3:41 pm

I believe that this syntax would do what you are looking for?

Code: Select all
Design
;alts = alt1*, alt2*, sq
;rows = 12
;eff = (mnl,d,mean)
;alg = mfederov(candidates = 10000)
;require:
sq.wetcon = 0, sq.infedu = 12, sq.toupre = 2.5,sq.hhtax = 0
;bdraws = gauss(1)
;model:
U(alt1) = b2.dummy[(n,0.169831,0.086648)|(n,0.339661,0.086648)] * wetcon[1,2,0] +
              b3[(n,0.05661,0.014441)] * infedu[8,12,16] +
              b4[(n,0.069674,0.017774)] * toupre[1,2.5,5,7.5] +
              b5[(n,-0.011322,0.00525)] * hhtax[0,10,20,40,80,120] /
U(alt2) = b2 * wetcon +
              b3 * infedu +
              b4 * toupre +
              b5 * hhtax /
U(sq) = b6[0]+
           b2 * wetcon +
           b3 * infedu +
           b4 * toupre +
           b5 * hhtax
$


Note that the design will not be attribute level balanced, not every level may appear.

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

Re: Dummy coding in SQ

Postby Mahlalela » Fri Jul 20, 2018 9:22 pm

Thank you so much, Prof!

Yes, this is want I am looking for :)

Grateful,

Linda
Mahlalela
 
Posts: 4
Joined: Fri May 26, 2017 9:03 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 5 guests

cron