Page 1 of 1

problems with constraints

PostPosted: Wed Apr 17, 2013 3:11 am
by goneill
Dear NGene forum,
I am trying to run the following design. The design has a number of (necessary) constraints. I found that the design was very sensitive to the prior values, however I have managed to get it running with the values below. My problem is that after running for a bit I get the following error -"ERROR: An attribute level for an attribute associated with constraints (;cond) could not be placed. There may not be enough rows, or the constraints might be too tight." Is there a way to overcome this or do I need to drop all the constraints (is this a fatal problem with this design?). This is a health experiment so the constraints are necessary for realism.

Any advice you can give me would be much appreciated.


Design
;alts = alt1*, alt2*, alt3*, SQ
;rows = 12
;bdraws = gauss(3)
;con
;eff = (mnl,d, mean)
;cond:
if(alt1.wl=2, alt1.A1=[25,30]),
if(alt2.wl=2, alt2.A1=[25,30]),
if(alt3.wl=2, alt3.A1=[25,30]),
if(alt1.wl=4, alt1.A1=[15,20,25]),
if(alt2.wl=4, alt2.A1=[15,20,25]),
if(alt3.wl=4, alt3.A1=[15,20,25]),
if(alt1.wl=6, alt1.A1=[5,10,15]),
if(alt2.wl=6, alt2.A1=[5,10,15]),
if(alt3.wl=6, alt3.A1=[5,10,15]),
if(alt1.wl=2, alt1.B1=[20,25]),
if(alt2.wl=2, alt2.B1=[20,25]),
if(alt3.wl=2, alt3.B1=[20,25]),
if(alt1.wl=4, alt1.B1=[12,15,20]),
if(alt2.wl=4, alt2.B1=[12,15,20]),
if(alt3.wl=4, alt3.B1=[12,15,20]),
if(alt1.wl=6, alt1.B1=[5,10,12]),
if(alt2.wl=6, alt2.B1=[5,10,12]),
if(alt3.wl=6, alt3.B1=[5,10,12]),
if(alt1.wl=2, alt1.E1=[0,1]),
if(alt2.wl=2, alt2.E1=[0,1]),
if(alt3.wl=2, alt3.E1=[0,1])
;model:
U(alt1) = b1[(n,0.034,0.01)] * wl[2,4,6] + b2[(n,-0.005,0.015)] * A1[5,10,15,20,25,30] + b3[(n,-0.005,0.02)] * B1[5,10,12,15,20,25] + b4[(n,-0.001,0.003)] * cost[20,30,40,50,65,85] + b5.dummy[(n, 0.028,0.02)] * D1[0,1] + b6.dummy[(n,0.027,0.03)|(n,-0.02,0.02)] * E1[0,1,2] /
U(alt2) = b1 * wl + b2 * A1 + b3 * B1 + b4 * cost + b5 * D1 + b6 * E1 /
U(alt3) = b1 * wl + b2 * A1 + b3 * B1 + b4 * cost + b5 * D1 + b6 * E1 /
U(SQ) = b0[-0.043] + b2 * A1_sq[50] + b3 * B1_sq[30] $

Re: problems with constraints

PostPosted: Wed Apr 17, 2013 5:49 pm
by Michiel Bliemer
I tried running the syntax, and besides the warnings that it may not be able to find a balanced design (which may not be a problem), Ngene seems to have no problem finding efficient designs? Maybe you get an error message when you run it for a long time, but then perhaps select an efficient design before the error message occurs?

Adding constraints, such as these nesting constraints, always make it much more difficult to find designs that satisfy all constraints (and in some cases they do not even exist). But I think in your case Ngene is able to find designs.

Michiel