Conditions and attribute level balance

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Conditions and attribute level balance

Postby Sanchez » Fri Oct 21, 2011 1:51 am

Hello.
I am currently trying to generate a design for a project in which we need to value watershed restoration. Specifically we are looking to find the best policy mix with which to manage stormwater problems in the area.
The problem at hand is very complex in that many of my attributes are nested and so I need to specify a lot of conditions in Ngene. I ran the following syntax:

Code: Select all
Design
;alts = X, Y, sq
;rows = 24
;block = 3
;eff= (mnl, d)
;cond:

If (X.A=0, X.B=0),
If (Y.A=0, Y.B=0),
If (X.A=0, X.C=0),
If (Y.A=0, Y.C=0),
If(X.D=0,  X.C=0),
If(Y.D=0,  Y.C=0),
If (X.D=0, X.E=0),
If (Y.D=0, Y.E=0),
If (X.D>0, X.E>0),
If (Y.D>0, Y.E>0),
If (X.D=0, X.B=0),
If (Y.D=0, Y.B=0)

;model:
U(X) = b1[-0.1]* A[1,2,3,0](5-8,5-8,5-8,5-8) + b2[0.3]* B[1,2,3,0] + b3[0.3] * C[1,2,3,0] + b4[-0.1]* D[1,2,3,0] (5-8,5-8,5-8,5-8) + b5[-0.15] * E[1,2,3,0] + b6[0.5] *F [1,2,0] /
U(Y) = b1 * A + b2 * B + b3 * C + b4*D + b5*E +b6*F
$


Although in the Ngene Manual it mentions that only the nested attributes will not display attribute level balance (p.154 Ngene Manual), this does not appear to be the case in my problem. For example, while attribute A and D are not nested per se, these attributes don’t display attribute level balance in the design generated by Ngene. I guess this is because some of the nesting structures overlap?

Because I wanted the attributes to be balanced as far as possible for attribute A & D (attribute level balance would require each level occurring 6 times in the design – I wanted to have each level occur at least 5 times), I specified that the levels of attributes A & D should occur between 5 and 8 times (following the explanation on p.151 of the manual):

Code: Select all
;model:
U(X) = b1[-0.1]* A[1,2,3,0](5-8,5-8,5-8,5-8) + b2[0.3]* B[1,2,3,0] + b3[0.3] * C[1,2,3,0] + b4[-0.1]* D[1,2,3,0](5-8,5-8,5-8,5-8) + b5[-0.15] * E[1,2,3,0] + b6[0.5] *F [1,2,0] /
U(Y) = b1 * A + b2 * B + b3 * C + b4*D + b5*E +b6*F
$


When I run this however, Ngene doesn’t seem to follow the specifications I stipulated with levels in attribute A & D still occurring 4 or even 9 times.
Am I doing something wrong?

Then, what is the consequence of using so many conditions? Is there anything else that I need to keep in mind besides specifying an adequate number of rows?

On this point, are 24 rows enough? As all my variables will be nominal, I have (4-1) x 6 + (3-1) x 1 + 1 = 3x6 +2 + 1= 21 degrees of freedom. So given this, 24 rows should be sufficient right?
What rule do I follow to find the minimum number of rows required? In the Ngene manual on p.72 I find the following formula: S= K/(J-1) which in my case = 20/(3-1) = 10 rows. But I suspect this is not for efficient designs?

Any assistance would be much appreciated!
Sanchez
 
Posts: 17
Joined: Thu Mar 24, 2011 8:19 am

Re: Conditions and attribute level balance

Postby Andrew Collins » Fri Nov 11, 2011 4:46 pm

Hi

Basically, Ngene is not able to satisfy all the constraints that you wish to impose on the design. Once attribute A is included in a constraint, then attribute level may be lost. A and D are linked since they both have constraints including C, which is the overlap you refer to. It may not have made it into the manual, but the attribute level frequency constraints are not compatible with the cond property - Ngene merely does the best it can to obtain balance. There is a degree of randomness in the allocation of the levels, between syntax runs, so if you run the syntax multiple times you may get more or less suitable solutions (the frequency of each level should remain the same across designs within each run). Attribute level balance will be the primary concern with so many constraints. In some cases, no valid design can be generated. Also, the constraints will have an adverse effect on efficiency, but plausibility of course has priority.

The formula holds for efficient designs, so you will have enough rows.

Andrew
Andrew Collins
 
Posts: 78
Joined: Sat Mar 28, 2009 4:48 pm

Re: Conditions and attribute level balance

Postby Sanchez » Sat Nov 19, 2011 7:35 am

Thank you very much for that Andrew.
I have taken out the restrictions on how many times each level should occur and ran the following code (note that I have renamed the attributes and actually put effects coding in where it is needed).

Code: Select all
Design
;alts = X, Y, sq
;rows = 24
;eff= (mnl, d)
;block = 3
;cond:

? NECESSARY CONDITIONS:
? If no Private BMP (BMP), can’t get a rebate (Reb)
If (X.BMP=0, X.Reb=0),
If (Y.BMP=0, Y.Reb=0),
? If no Payment Mechanism(Mech) in place, can’t have a cost to the Payment mechanism(Pay)
If (X.Mech=0, X.Pay=0),
If (Y.Mech=0, Y.Pay=0),
? If have a Payment Mechanism(Mech), need cost of Payment mechanism(Pay)to be larger than zero
If (X.Pay=0, X.Mech=0),
If (Y.Pay=0, X.Mech=0),
? If no Payment Mechanism(Mech) in place, can’t rebate(Reb)
If (X.Mech=0, X.Reb=0),
If (Y.Mech=0, Y.Reb=0)

;model:
U(X) = b1.effects [-0.05|-0.07|-0.09]* BMP [1,2,3,0]+ b2[0.3]* Reb[0,25,50,75] + b3.effects [-0.1|-0.1|-0.1|-0.1]* Mech [1,2,3,4,0] + b4[-0.15] * Pay[0,36,60,108] + b5.effects [0.05|0.1] *Env [1,2,0]] /
U(Y) = b1.effects * BMP + b2 * Reb + b3*Mech.effects + b4*Pay +b5*Env.effects
$


My problem now is, that when I run the above, I get 5 out of 24 strictly dominated alternatives (where the probabilities of choosing one alternative are 1 and the probability of choosing the other zero).
I have tried to fix this by putting in asterisks behind the alternatives (as suggested in the Ngene Manual), but when I do this, the code doesn't run.

I have also tried to fix this problem by running two models and weighting them as below (as I think using the stars with non-dominance only works with non-dummy/effects coding), but I also get no designs.


Code: Select all
Design
;alts(m1) = X*,Y*,sq
;alts(m2) = X*,Y*
;rows = 24
;eff=m1(mnl,d) + 0.001*m2(mnl,b)
;block = 3
;cond:

? NECESSARY CONDITIONS:
? If no Private BMP (BMP), can’t get a rebate (Reb)
If (X.BMP=0, X.Reb=0),
If (Y.BMP=0, Y.Reb=0),
? If no Payment Mechanism(Mech) in place, can’t have a cost to the Payment mechanism(Pay)
If (X.Mech=0, X.Pay=0),
If (Y.Mech=0, Y.Pay=0),
? If have a Payment Mechanism(Mech), need cost of Payment mechanism(Pay)to be larger than zero
If (X.Pay=0, X.Mech=0),
If (Y.Pay=0, X.Mech=0),
? If no Payment Mechanism(Mech) in place, can’t rebate(Reb)
If (X.Mech=0, X.Reb=0),
If (Y.Mech=0, Y.Reb=0)

;model(m1):
U(X) = b1.effects [-0.05|-0.07|-0.09]* BMP [1,2,3,0]+ b2[0.3]* Reb[25,50,75,0] + b3.effects [-0.1|-0.1|-0.1|-0.1]* Mech [1,2,3,4,0] + b4[-0.15] * Pay[36,60,108,0] + b5.effects [0.05|0.1] *Env [1,2,0]] /
U(Y) = b1.effects * BMP + b2 * Reb + b3*Mech.effects + b4*Pay +b5*Env.effects

;model(m2):
U(X) = b1 [-0.07]* BMP [1,2,3,0]+ b2[0.3]* Reb[25,50,75,0] + b3 [-0.1]* Mech [1,2,3,4,0] + b4[-0.15] * Pay[36,60,108,0] + b5 [0.07] *Env [1,2,0]] /
U(Y) = b1 * BMP + b2 * Reb + b3*Mech + b4*Pay +b5*Env
$


What am I doing wrong?
Sanchez
 
Posts: 17
Joined: Thu Mar 24, 2011 8:19 am

Re: Conditions and attribute level balance

Postby Andrew Collins » Sun Dec 04, 2011 5:57 pm

Hi

There are a number of errors in your syntax that are causing problems.
* Remove the extra ] where Env is defined
* Remove .effects from the attributes in alternative Y. You will not need to define the generic parameters as .effects again.
* I notice that your third pair of conditions do not match the text describing them. If you have payment, then that is X.Pay>0, and similarly for Mech.

There are issues with the current Ngene implementation of the dominance check and dummy coding, but it will work for effects coding. So, fixing the above three points, I can generate designs. The syntax is below. Most designs are failing the conditional statements, so it takes a long time to find designs to evaluate, however there are valid designs that don't have dominance.

Andrew

Code: Select all
Design
;alts = X*, Y*, sq
;rows = 24
;eff= (mnl, d)
;block = 3
;cond:
? NECESSARY CONDITIONS:
? If no Private BMP (BMP), can’t get a rebate (Reb)
If (X.BMP=0, X.Reb=0),
If (Y.BMP=0, Y.Reb=0),
? If no Payment Mechanism(Mech) in place, can’t have a cost to the Payment mechanism(Pay)
If (X.Mech=0, X.Pay=0),
If (Y.Mech=0, Y.Pay=0),
? If have a Payment Mechanism(Mech), need cost of Payment mechanism(Pay)to be larger than zero
? *** These conditions were changed to reflect the above statement
If (X.Pay>0, X.Mech>0),
If (Y.Pay>0, X.Mech>0),
? If no Payment Mechanism(Mech) in place, can’t rebate(Reb)
If (X.Mech=0, X.Reb=0),
If (Y.Mech=0, Y.Reb=0)
;model:
U(X) =
b1.effects [-0.05|-0.07|-0.09]* BMP [1,2,3,0] +
b2[0.3]* Reb[0,25,50,75] +
b3.effects [-0.1|-0.1|-0.1|-0.1]* Mech [1,2,3,4,0] +
b4[-0.15] * Pay[0,36,60,108] +
b5.effects [0.05|0.1] * Env [1,2,0] /
U(Y) = b1* BMP + b2 * Reb + b3*Mech+ b4*Pay +b5*Env
$
Andrew Collins
 
Posts: 78
Joined: Sat Mar 28, 2009 4:48 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 9 guests

cron