Page 1 of 1

Pivoted Design with More Than One Attribute Level

PostPosted: Thu Aug 10, 2017 2:36 pm
by Sadie
Hi NGENE team,

I have generated a Bayesian Efficient design in which one of the attributes has got pivoted levels. As you can see in my sample code below, 'Parking' attribute has 3 levels of 25,50,75 for alternative A, but I would like the same attribute for alternative B to be pivoted on whatever value that shows up for alternative A. For example, if parking attribute for alternative A is 50, then alternative B get the value of 25 (50% less). For the current code, NGENE just takes the first level of the reference alternative (e.g. only 25) and not the rest of the levels (50 and 75). Could you please help me solve this problem?


Design
? This will generate an efficient design for self-driving vehicle project, A = manual, B = self-driving
;alts =A, B
;rows =12
;eff=(mnl,d,mean)


;cond:
if(B.purchase= A.purchase and B.operate= A.operate , B.incentiveA <> 0 or B.incentiveB <> 0 )


;model:
U(A)= b1 + b2[(u,-0.000195,0)] * purchase[30000,40000,50000] + b3 [(u,0,0.009)] * operate[600,700,800] + b4[(u,0.439,0.5)] * parking .ref[25,50,75]/
U(B)= b2 * purchase + b3 * operate + b4 * parking .piv[-50%, 0% -20%] + b5.dummy[(u,0,1)] * incentiveA[0,1] + b6.dummy[(u,0,1)] * incentiveB[0,1]$

Re: Pivoted Design with More Than One Attribute Level

PostPosted: Sun Aug 13, 2017 11:53 am
by Michiel Bliemer
I am afraid what you you would like to do is not possible in Ngene.
in Ngene, pivot designs always work with a reference alternative that has a fixed attribute level for a respondent, so alternative A would be the reference, which can clearly only have one level . Alternative B would then be pivoted around the reference level. What you are trying to do is not a pivot design around respondent specific reference levels, but pivots around attribute levels of another alternative. I am not sure why you would like to do this, but you should be able to get this working by creating additional constraints. Note that any constraints that you add will lead to a decrease in efficiency, so it is best to only add constraints when they are strictly necessary in order to make the choice tasks more realistic. It is not needed to add constraints to try to manually increase efficiency as Ngene already optimises this.

So you could use:
if(A.parking = 25, B.parking = [15, 25, 35]),
if(A.parking = 50, B.parking = [25, 50, 75]),
if(A.parking = 75, B.parking = [40, 75, 110])

and define the following attributes in the utility functions:
U(A) = ... b4 * parking[25,50,75]
U(B) = ... b4 * parking2[15,25,35,40,50,75,110]

Michiel

Re: Pivoted Design with More Than One Attribute Level

PostPosted: Mon Aug 14, 2017 11:52 pm
by paulm
Another option that might work is to treat the second parking variable as just a 3-level attribute with values [-50%, -20%, 0%]. I typically effects code these things but you can do whatever you like. And you wouldn't need any constraints at all.

Optionally, you could include an interaction, assuming Ngene will allow it: b_cross[prior]*parkingA*parkingB.

Paul