Constrained designs

This forum is for posts that specifically focus on the Windows desktop version of Ngene (i.e. all version 1.x releases).

Moderators: Andrew Collins, Michiel Bliemer, johnr

Post Reply
tn73
Posts: 12
Joined: Thu May 16, 2013 9:29 pm

Constrained designs

Post by tn73 »

Dear all

I am trying to run the syntax below but I keep getting an error: "An attribute, 'alt2.lnbill', specified in the ';cond' property could not be found. My utility function includes both cost (BILL) and the negative of the natural log of cost (lnbill) so naturally the value taken by lnbill in each alternative must be constrained to take on a specific value depending on the level taken by BILL. I have specified this constraint in the ';cond' property but I am not getting any joy when I try to run the syntax. I have even tried removing the spaces after the commas but nothing changes. The syntax looks ok to me -maybe there is something that I am missing.

Please help
tn73


Design
;alts (Male)= alt1, alt2, alt3
;alts(Female)= alt1, alt2, alt3
;rows = 24
;block = 2
;eff = F1(mnl,d,mean)
;fisher(F1) = des1(Male[0.49],Female[0.51])
;alg = swap
;bdraws = halton(250)
;cond:
if(alt2.BILL = 150, alt2.LNBILL = -5.01064),
if(alt2.BILL = 200, alt2.LNBILL = -5.29832),
if(alt2.BILL = 250, alt2.LNBILL = -5.52146),
if(alt2.BILL = 300, alt2.LNBILL = -5.70378),
if(alt3.BILL = 150, alt3.LNBILL = -5.01064),
if(alt3.BILL = 200, alt3.LNBILL = -5.29832),
if(alt3.BILL = 250, alt3.LNBILL = -5.52146),
if(alt3.BILL = 300, alt3.LNBILL = -5.70378)

;model(Male):
U(alt1) = b1[(n,0.18807, 0.23197)] + b2[(n,-0.02094, 0.01267)] * TIME1[5] + b3[(n,-0.00603, 0.0058)] * FIXED1[0] + b4[(n, 0.04283, 0.00831)] * DISCOUNT1[10] + b5[(n,0.30957, 0.18923)] * REWARDS1[1] + b6[(n,0.00586,0.00457)] * RENEW1[50] + b7[(n,0.01285,0.00296)] * OWN1[50] + b8.dummy[(n,-0.5549,0.24797)|(n,-0.67783,0.24303)|(n,-1.23702,0.45671)] * TYPE1[0,1,2,3](0,0,0,24) + b9[(n,-0.01636,0.00429)] * BILL1[250] + b10[(n,-2.71686,0.96428)] * LNBILL1[-5.52146] + b11[(n,-0.00092,0.00093)] * ATT[-3,3]*BILL1[BILL1] + B12[(n,0,1)] * SN[-3,3]*BILL1[BILL1] + b13[(n,-0.0118,0.00067)] * PBC[-3,3]*BILL1[BILL1] + b14[(n,-0.00371,0.00112)] * AC[1,5]*BILL1[BILL1] + b15[(n,-0.00353,0.00125)] * AR[1,5]*BILL1[BILL1] + b16[(n,-0.01177,0.00565)] * NEPD[0,1]*RENEW1[RENEW1] + GENDER[(n,0,1)] * GENDER.COVAR[1] /
U(alt2) = b2 * TIME[0,5,10,15] + b3 * FIXED[0,12,24,36] + b4 * DISCOUNT[0,10,20,30] + b5 * REWARDS[0,1] + b6 * RENEW[25,50,75,100] + b7 * OWN[25,50,75,100] + b8.dummy * TYPE[0,1,2,3] + b9 * BILL[150,200,250,300] + b10 * LNBILL[-5.01064,-5.29832,-5.52146,-5.70378] + b11 * ATT[ATT]*BILL[BILL] + B12 * SN[SN]*BILL[BILL] + b13 * PBC[PBC]*BILL[BILL] + b14 * AC[AC]*BILL[BILL] + b15 * AR[AR]*BILL[BILL] + b16 * NEPD[NEPD]*RENEW[RENEW] + GENDER * GENDER.COVAR[1] /
U(alt3) = b2 * TIME + b3 * FIXED + b4 * DISCOUNT + b5 * REWARDS + b6 * RENEW + b7 * OWN + b8.dummy * TYPE + b9 * BILL + b10 * LNBILL + b11 * ATT[ATT]*BILL + B12 * SN[SN]*BILL + b13 * PBC[PBC]*BILL + b14 * AC[AC]*BILL + b15 * AR[AR]*BILL + b16 * NEPD[NEPD]*RENEW + GENDER * GENDER.COVAR[1]

;model(Female):
U(alt1) = b1[(n,0.18807, 0.23197)] + b2[(n,-0.02094, 0.01267)] * TIM1E1[5] + b3[(n,-0.00603, 0.0058)] * FIXED1[0] + b4[(n, 0.04283, 0.00831)] * DISCOUNT1[10] + b5[(n,0.30957, 0.18923)] * REWARDS1[1] + b6[(n,0.00586,0.00457)] * RENEW1[50] + b7[(n,0.01285,0.00296)] * OWN1[50] + b8.dummy[(n,-0.5549,0.24797)|(n,-0.67783,0.24303)|(n,-1.23702,0.45671)] * TYPE1[0,1,2,3](0,0,0,24) + b9[(n,-0.01636,0.00429)] * BILL1[250] + b10[(n,-2.71686,0.96428)] * LNBILL1[-5.52146] + b11[(n,-0.00092,0.00093)] * ATT[-3,3]*BILL1[BILL1] + B12[(n,0,1)] * SN[-3,3]*BILL1[BILL1] + b13[(n,-0.0118,0.00067)] * PBC[-3,3]*BILL1[BILL1] + b14[(n,-0.00371,0.00112)] * AC[1,5]*BILL1[BILL1] + b15[(n,-0.00353,0.00125)] * AR[1,5]*BILL1[BILL1] + b16[(n,-0.01177,0.00565)] * NEPD[0,1]*RENEW1[RENEW1] + GENDER[(n,0,1)] * GENDER.COVAR[0] /
U(alt2) = b2 * TIME[0,5,10,15] + b3 * FIXED[0,12,24,36] + b4 * DISCOUNT[0,10,20,30] + b5 * REWARDS[0,1] + b6 * RENEW[25,50,75,100] + b7 * OWN[25,50,75,100] + b8.dummy * TYPE[0,1,2,3] + b9 * BILL[150,200,250,300] + b10 * LNBILL[-5.01064,-5.29832,-5.52146,-5.70378] + b11 * ATT[ATT]*BILL[BILL] + B12 * SN[SN]*BILL[BILL] + b13 * PBC[PBC]*BILL[BILL] + b14 * AC[AC]*BILL[BILL] + b15 * AR[AR]*BILL[BILL] + b16 * NEPD[NEPD]*RENEW[RENEW] + GENDER * GENDER.COVAR[0] /
U(alt3) = b2 * TIME + b3 * FIXED + b4 * DISCOUNT + b5 * REWARDS + b6 * RENEW + b7 * OWN + b8.dummy * TYPE + b9 * BILL + b10 * LNBILL + b11 * ATT[ATT]*BILL + B12 * SN[SN]*BILL + b13 * PBC[PBC]*BILL + b14 * AC[AC]*BILL + b15 * AR[AR]*BILL + b16 * NEPD[NEPD]*RENEW + GENDER * GENDER.COVAR[0] $
johnr
Posts: 172
Joined: Fri Mar 13, 2009 7:15 am

Re: Constrained designs

Post by johnr »

Hi Tn73

;cond is incompatible with ;fisher, where the incompatibility is documented in the syntax reference section of the manual, under cond. There is no theoretical problem however it was not implemented in Version 1 of Ngene as it is quite complex to do in the back end of the program.

John
Post Reply