necessary attribute level balance for constrained attribute

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

necessary attribute level balance for constrained attribute

Postby Yana » Mon Apr 11, 2016 5:01 pm

I have a question about how to keep one "necessary" attribute level balance feature for one specific attribute in a constrained design.

As you can see in the first code, I try to make sure when illness type=1 , sick= 0
In the design generated, type=1 only appear very limited times, much fewer than other types. I understand that as it is a constrained design, the level balance for nested attribute will be lost. Even adding (times of level requirements) after attribute will not work in this case.

However in this particular research, to make each respondent see more or less the same times of different types is necessary. The attribute level balance for "type" is desired.
Then in the second code, I randomly tried a way to "fix" this by adding another almost zero level for "sick" : sick[0, 0.0001, 50,100,150]
Somehow the design has balanced level for the attribute "type" now. If this works, I can easily treat sick=0.0001 as 0 in formatting questionnaires.

My question is, does this way of "fix" this problem really fix it? Will it cause other unintended problems? I do not see that for the moment, to me it seems the level of sick=0 and 0.0001 will have no or minimum effect on utility by the current utility function setting. But I am not sure.
I would appreciate a lot if there are other better ways to solve the problem.

Code: Select all
Design
;alts = alt1, alt2,alt3
;rows = 24
;eff=(mnl,d)
;block=3
;cond:

if(alt1.type=1,alt1.sick=[0]),
if(alt1.type<>1,alt1.sick>10),
if(alt2.type=1,alt2.sick=[0]),
if(alt2.type<>1,alt2.sick>10)

;model:
U(alt1)=b0[-0.5]
+b1[0.2|0.5|-0.2].effects*type[0,1,2,3]
+b2[0.01]*sick[0,50,100,150]
+b3[0.05]*die[5,10,20]
+b4[-0.015]*cost[20,50,100]


/
U(alt2)=b0+b1.effects*type+b2*sick+b3*die+b4*cost

$


Code: Select all
Design
;alts = alt1, alt2,alt3
;rows = 24
;eff=(mnl,d)
;block=3
;cond:

if(alt1.type=1,alt1.sick=[0,0.0001]),
if(alt1.type<>1,alt1.sick>10),
if(alt2.type=1,alt2.sick=[0,0.0001]),
if(alt2.type<>1,alt2.sick>10)

;model:
U(alt1)=b0[-0.5]
+b1[0.2|0.5|-0.2].effects*type[0,1,2,3]
+b2[0.01]*sick[0,0.0001,50,100,150]
+b3[0.05]*die[5,10,20]
+b4[-0.015]*cost[20,50,100]


/
U(alt2)=b0+b1.effects*type+b2*sick+b3*die+b4*cost

$


Thanks.
Yana
 
Posts: 4
Joined: Mon Mar 28, 2016 6:34 pm

Re: necessary attribute level balance for constrained attrib

Postby Michiel Bliemer » Mon Apr 11, 2016 5:26 pm

Using the ;reject command together with the Modified Federov algorithm and requiring balancedness of "type" by adding (6,6,6,6) to the attribute levels is doing what you want I think?

Code: Select all
Design
;alts = alt1, alt2,alt3
;rows = 24
;eff=(mnl,d)
;block=3
;alg = mfederov(candidates = 1000)
;reject:
alt1.type = 1 and alt1.sick = 50,
alt1.type = 1 and alt1.sick = 100,
alt1.type = 1 and alt1.sick = 150,
alt2.type = 1 and alt2.sick = 50,
alt2.type = 1 and alt2.sick = 100,
alt2.type = 1 and alt2.sick = 150
;model:
U(alt1)=b0[-0.5]
    +b1[0.2|0.5|-0.2].effects*type[0,1,2,3](6,6,6,6)
    +b2[0.01]*sick[0,50,100,150]
    +b3[0.05]*die[5,10,20]
    +b4[-0.015]*cost[20,50,100] /
U(alt2)=b0+b1.effects*type+b2*sick+b3*die+b4*cost
$
Michiel Bliemer
 
Posts: 1733
Joined: Tue Mar 31, 2009 4:13 pm

Re: necessary attribute level balance for constrained attrib

Postby Yana » Mon Apr 11, 2016 6:29 pm

Dear Michiel, Thanks a lot!
I add some more constraints on the code you suggested and it is working as what I want.

Code: Select all
Design
;alts = alt1, alt2,alt3
;rows = 24
;eff=(mnl,d)
;block=3
;alg = mfederov(candidates = 1000)
;reject:
alt1.type = 1 and alt1.sick = 50,
alt1.type = 1 and alt1.sick = 100,
alt1.type = 1 and alt1.sick = 150,
alt2.type = 1 and alt2.sick = 50,
alt2.type = 1 and alt2.sick = 100,
alt2.type = 1 and alt2.sick = 150,
alt1.type = 0 and alt1.sick=0,
alt1.type = 2 and alt1.sick=0,
alt1.type = 3 and alt1.sick=0,
alt2.type = 0 and alt2.sick=0,
alt2.type = 2 and alt2.sick=0,
alt2.type = 3 and alt2.sick=0

;model:
U(alt1)=b0[-0.5]
    +b1[0.2|0.5|-0.2].effects*type[0,1,2,3](6,6,6,6)
    +b2[0.01]*sick[0,50,100,150]
    +b3[0.05]*die[5,10,20]
    +b4[-0.015]*cost[20,50,100] /
U(alt2)=b0+b1.effects*type+b2*sick+b3*die+b4*cost
$
Yana
 
Posts: 4
Joined: Mon Mar 28, 2016 6:34 pm

Re: necessary attribute level balance for constrained attrib

Postby Michiel Bliemer » Mon Apr 11, 2016 7:00 pm

Excellent!
Michiel Bliemer
 
Posts: 1733
Joined: Tue Mar 31, 2009 4:13 pm

Re: necessary attribute level balance for constrained attrib

Postby phpufter » Thu May 19, 2016 5:47 am

Yana, just a quick question, how long does your design take before the first attempt pops out? My similar design has run for hours and I still do not see the first attempt. I am curious how long I need to wait before concluding my syntax is wrong. Without constraints the first iteration appears within minutes.
Thansk,
Fern
phpufter
 
Posts: 2
Joined: Sat Jan 18, 2014 1:39 pm

Re: necessary attribute level balance for constrained attrib

Postby Michiel Bliemer » Thu May 19, 2016 8:55 am

Dear Fern,

Ngene should not take more than 1 minute to show a design. If it takes longer, then usually your constraints are too strict, the number of draws is too high, or your model is not estimable. Feel free to start a new discussion to discuss your syntax.

Michiel
Michiel Bliemer
 
Posts: 1733
Joined: Tue Mar 31, 2009 4:13 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 33 guests