Page 1 of 1

Interaction b/w effects coded and linear attributes

PostPosted: Sat Aug 17, 2013 12:55 am
by riedel
I would like to look for an interaction between my effects coded attribute ‘Pain’ and my linear attribute ‘Motion’. The ‘Pain’ attribute is ordered (none, mild, moderate, severe). My code is below but I’m not exactly sure how Ngene interprets this coding. Does it essentially treat the ‘pain’ attribute as linear to produce a single interaction value with ‘motion’?

Design
? assume non-linearity (effects coding)for Pain plus interaction Pain*Motion
;alts= Health State A*,Health State B*
;rows=12
;eff = (mnl,d)
;model:
U (Health State A)=
b2.effects[0|0|0]*Pain[0,1,2,3]
+ b3*Hair[0,1] +b4*Feed[0,1] + b5*Hygiene[0,1] + b6*Shirt[0,1] + b7*Shoes[0,1]
+ b8*Motion[0,1,2]
+ b9*Stability[0,1]
+ i1*Pain*Motion /
U (Health State B)= b2*Pain
+ b3*Hair[0,1] +b4*Feed[0,1] + b5*Hygiene[0,1] + b6*Shirt[0,1] + b7*Shoes[0,1]
+ b8*Motion
+ b9*Stability
+ i1*Pain*Motion $

Re: Interaction b/w effects coded and linear attributes

PostPosted: Mon Aug 19, 2013 3:10 pm
by Andrew Collins
You can find information on how to interect with dummy or effects coded attributes on page 126 of the current version of the manual (1.1.1). Essentially, you create the interaction with a specific level. So for example, you could interact with level 1 of the Pain attribute as follows:

Code: Select all
Design
? assume non-linearity (effects coding)for Pain plus interaction Pain*Motion
;alts= Health State A*,Health State B*
;rows=12
;eff = (mnl,d)
;model:
U (Health State A)=
b2.effects[0|0|0]*Pain[0,1,2,3]
+ b3*Hair[0,1] +b4*Feed[0,1] + b5*Hygiene[0,1] + b6*Shirt[0,1] + b7*Shoes[0,1]
+ b8*Motion[0,1,2]
+ b9*Stability[0,1]
+ i1*Pain.dummy[1]*Motion /
U (Health State B)= b2*Pain
+ b3*Hair[0,1] +b4*Feed[0,1] + b5*Hygiene[0,1] + b6*Shirt[0,1] + b7*Shoes[0,1]
+ b8*Motion
+ b9*Stability
+ i1*Pain.dummy[1]*Motion $


Note too that the base level is the final attribute level specified.

Re: Interaction b/w effects coded and linear attributes

PostPosted: Tue Aug 20, 2013 2:08 am
by riedel
As for your reminder about the base level being the last attribute specified, am I therefore correct to think of my ‘Pain’ attribute in reverse order so that the level ‘none’ is my base (coded ‘3’). Then I build a more complex design whereby I look for an interaction b/w ‘severe’ and ‘moderate’ pain coded (0,1), respectively, with motion (i.e. interaction 1, interaction 2). See code below:

?Pain(0,1,2,3)= (severe, moderate, mild, none)
?assume non-linearity (effects coding) for Pain plus interaction Pain*Motion
Design
;alts= Health State A*,Health State B*
;rows=12
;eff = (mnl,d)
;model:
U (Health State A)=
b2.effects[-0.02|-0.01|0]*Pain[0,1,2,3]
+ b3*Hair[0,1] +b4*Feed[0,1] + b5*Hygiene[0,1] + b6*Shirt[0,1] + b7*Shoes[0,1]
+ b8*Motion[0,1,2]
+ b9*Stability[0,1]
+ i1*Pain.dummy[0]*Motion
+ i2*Pain.dummy[1]*Motion /
U (Health State B)= b2*Pain
+ b3*Hair[0,1] +b4*Feed[0,1] + b5*Hygiene[0,1] + b6*Shirt[0,1] + b7*Shoes[0,1]
+ b8*Motion
+ b9*Stability
+ i1*Pain.dummy[0]*Motion
+ i2*Pain.dummy[1]*Motion $

Everything works fine until I insert the small negative utility estimates for severe and moderate pain. If I leave my priors =0, I can generate a design but I know there is a negative utility to having pain. How can I best reflect this negative utililty for 'pain' in my efficient design?
Thanks for any help you can offer.

Re: Interaction b/w effects coded and linear attributes

PostPosted: Tue Aug 20, 2013 3:45 pm
by Andrew Collins
Yes, this is correctly specified.

The problem you have encountered is an interesting one, and easily fixed. Specifying * next to the alternative names means that Ngene will check for dominance in the choice tasks. Since you have not specified priors for most parameters, the two alternatives cannot be compared for dominance on the attributes with zero priors. Consequently, only pain is used to check for dominance, and over 12 choice tasks, there is always some dominance (at least with the algorithms employed).

If you specify some priors for more attributes, then this is likely to break the dominance. This is because now there are more attributes on which to compare, and for one alternative relative to the other, some are likely to be better, and some worse. Even if you just use very small priors, the sign of them will inform the dominance check, and overcome the problem you encountered.

Andrew