labelled design with status quo with an attribute constraint

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

labelled design with status quo with an attribute constraint

Postby Fabio91 » Tue Dec 19, 2017 2:54 am

Dear Ngeners,
I am working on a labelled design with status quo for a pivot study (to get priors) with an attribute (b1) constraint, the level of b1 (possible values:1,2,3,4) of demijet should always be lower than jet and integral. Jet and Integral can have the same values or Jet should be lower than integral. I do know the values of the priori but looking at a previous post I included the sing of the coefficients
I wrote the following code .. but it is not working :| :o ..

?this will generate a design efficiency
Design
;alts = nulla, demijet, jet, integrale
;rows = 6
;eff = (mnl,d)
;rep = 500
;rdraws = halton(250)
;cond:
if(demijet.b1<jet.b1, integrale.b1>=jet.b1),
;model:
U(demijet) = c1[0] + b1[n,0.00000001,1] * A1[1,2,3,4] + b2.dummy[n,0.00000001,1] * B1[0,1] + b3[n,-0.00000001,1]* C1[30,50,90,160] /
U(jet) = c2[0] + b1 * A1 + b2 * B1 + b3 * C1 /
U(integrale) = c3[0] + b1 * A1 + b2 * B1 + b3 * C1
$


Thank you very much for your help :roll:
Kind Regards
Fabio
Fabio91
 
Posts: 4
Joined: Tue Dec 12, 2017 2:49 am

Re: labelled design with status quo with an attribute constr

Postby johnr » Tue Dec 19, 2017 12:24 pm

Hi Fabio

You have an additional comma after the if statement. This should work

Design
;alts = nulla, demijet, jet, integrale
;rows = 6
;eff = (mnl,d)
;rep = 500
;rdraws = halton(250)
;cond:
if(demijet.b1<jet.b1, integrale.b1>=jet.b1)
;model:
U(demijet) = c1[0] + b1[n,0.00000001,1] * A1[1,2,3,4] + b2.dummy[n,0.00000001,1] * B1[0,1] + b3[n,-0.00000001,1]* C1[30,50,90,160] /
U(jet) = c2[0] + b1 * A1 + b2 * B1 + b3 * C1 /
U(integrale) = c3[0] + b1 * A1 + b2 * B1 + b3 * C1
$
johnr
 
Posts: 171
Joined: Fri Mar 13, 2009 7:15 am

Re: labelled design with status quo with an attribute constr

Postby Fabio91 » Wed Dec 20, 2017 1:07 am

Thank you for your prompt reply Johnr but there is still a problem with the desing generated...
For many scenario the values of b1 for semijet is higher than jet and integrale .. it seems that the code ignore my condition. :cry: :cry: :cry: :cry:
Sorry for this
Kind Regards
Fabio
Fabio91
 
Posts: 4
Joined: Tue Dec 12, 2017 2:49 am

Re: labelled design with status quo with an attribute constr

Postby johnr » Wed Dec 20, 2017 4:29 am

Hi Fabio

I have tried the following syntax, which seems to work. I removed the dummy (you have 0,1 only for the attribute, so it already is dummy coded) and changed the attribute names to ensure they are different to parameters (makes it easier to avoid mistakes).

Design
;alts = nulla, demijet, jet, integrale
;rows = 6
;eff = (mnl,d)
;rep = 500
;rdraws = halton(250)
;cond:
if(demijet.bt1<jet.bt1, integrale.bt1>=jet.bt1)
;model:
U(demijet) = c1[0] + b1[n,0.00000001,1] * At1[1,2,3,4] + b2[n,0.00000001,1] * Bt1[0,1] + b3[n,-0.00000001,1]* Ct1[30,50,90,160] /
U(jet) = c2[0] + b1 * At1 + b2 * Bt1 + b3 * Ct1 /
U(integrale) = c3[0] + b1 * At1 + b2 * Bt1 + b3 * Ct1
$

John
johnr
 
Posts: 171
Joined: Fri Mar 13, 2009 7:15 am


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: Google [Bot] and 23 guests