Dummy or effects coding of a continuous attribute

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Dummy or effects coding of a continuous attribute

Postby nastay » Fri Mar 04, 2022 1:50 am

Dear all,

I have an attribute in my project which has three levels. The attributs name is quality of life(QoL) and the levels are 50, 75 and 90.

I don't think that there is linear relationship between changes in attribute levels and therfore I believe that dummy or effects coding is more suitable for this attribute. Is it correct to dummy code a continuous attribute?

I appreciate your help.

Best, Nasrin
nastay
 
Posts: 16
Joined: Thu Nov 22, 2018 7:45 pm

Re: Dummy or effects coding of a continuous attribute

Postby Michiel Bliemer » Fri Mar 04, 2022 9:54 am

Yes you can use dummy/effects coding for numerical variables, this is often done, as long as you realise that computing willingness to pay or computing marginal rates of substitution becomes a bit more complicated with dummy/effects coding. This is the reason why most people will estimate only a single parameter for a numerical variable. Another reason is that forecasting becomes a bit more challenging, namely if you would like to forecast the choice probabilities with a QoL level of 80, which cannot be done if you dummy/effects code the variable.

The main reason why people choose to dummy/effects code a numerical variable is to account for nonlinearities, as you also point out. But note that you can account for nonlinearities in a different way, namely via a continuous nonlinear transformation, e.g. using log(QoL), then in Ngene you could use levels b[..] * QoL[3.91,4.31,4.50], noting that log(50) = 3.91. This is especially useful in model estimation later where you can try different nonlinear transformations.

For the experimental design, it is perfectly acceptable to assume dummy/effects coding, which makes sure that nonlinearities can be picked up, while in final model estimation you apply a nonlinear transformation and estimate a single parameter instead of multiple dummy/effects coded parameters.

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

Re: Dummy or effects coding of a continuous attribute

Postby nastay » Fri Mar 04, 2022 7:39 pm

Dear Michiel,

Thank you very much for your replay and suggestion. I have revised the Ngene codes, would you please see if all looks fine with the codes? I really appreciate your help.

I am working with following attributes and levels:

1- Age (10, 50, 75 years)
2- Life years without treatment- LY-UNTREAT (3, 5, 10)
3- Quality of life- QoL (50,75,90)
4- Effect of tretament as life years after treatment-LY-TREAT (0.5,1,3)
5- Distribution of effect- DISTRIBUTION (all get the same effect in average, most are under average while 5% get 3xaverage effect (1.5, 3,9), half get minimal effect while the other half get double (1,2,6))
6- Risk of known and unknown side effect- RISK (No, 10% risk of known and no risk of unknown, 10% risk of known and there is risk of unknown as well).

I applied a nonlinear transformation on age and QoL. Both life years attributes are continuous and I assume there is linear relationship in attribute levels. DISTRIBUTION and RISK are categorical and I used effects coding.


Design
;alts = altA, altB
;rows = 24
;block = 3
;eff = (mnl, d)

;model:
U(altA) = b1[0]
+ b2 [0] * age[2.30,3.91,4.32]
+ b3 [0] * LY-UNTREAT[3,5,10]
+ b4 [0] * QoL[3.91,4.32,4.50]
+ b5[0] * LY-TREAT[0.5,1,3]
+ b6.effects[0|0] * DISTRIBUTION[1,2,3]
+ b7.effects[0|0] * RISK[1,2,3] /

U(altB) = b2 * age
+ b3 * LY-UNTREAT
+ b4 * QoL
+ b5 * LY-TREAT
+ b6.effects * DISTRIBUTION
+ b7.effects * RISK

$
nastay
 
Posts: 16
Joined: Thu Nov 22, 2018 7:45 pm

Re: Dummy or effects coding of a continuous attribute

Postby Michiel Bliemer » Fri Mar 04, 2022 10:29 pm

The syntax looks fine (note that I did not look at the meaning of the attributes since I am not a domain expert).

Since the alternatives are unlabelled, you will need to use

;alts = altA*, altB*

which avoids repeated choice tasks where the profiles of altA and altB are swapped (which yields an identical choice task).

If you also want to let Ngene avoid dominant alternatives, then you will need to indicate the preference order of the attribute levels using small positive and negative priors, e.g.

b4[0.001] * QoL[..], since a higher QoL is more preferred.
b7.effects[0.002|0.001] * RISK[..], since level 1 is preferred over level 2, and level 2 is preferred over level 3.

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


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 12 guests