Page 1 of 1

specifying number of times a level appears

PostPosted: Fri Oct 26, 2012 4:02 pm
by kirstenh
Hi John,

I was wondering whether you could help me. We are doing a design where we would like to be able to specify the number of times an attribute level comes up, but it is a conditional attribute

I’ve put the design code below – it all works ok; apart form being able to require a level to appear a certain number of times

Ideally we would like Alt B and C to each have ‘leave’ = 0 (stay ) and ‘leave’ = 1 (transfer out) presented 6 times each in the 12 questions, and then the conditionality for ‘away’ be applied after that, so away levels [0,6,12,24] would appear (6,2,2,2) times respectively

Is there a way we can do that? At the moment, as written below, it always seems to force us into Leave [0,1] having levels appearing (3,9) times respectively and away [0,6,12,24] then appearing (3,3,3,3) so the imbalance is in the leave attribute because of the conditionality. We tried to specify the number of time a level appears by using (6,6), but the ;cond commands seem to overrule the levels

thanks


design
;alts = A,B,C
;rows=12
;eff =(mnl,d)
;con
;cond:
if (B.leave=1,B.away=[6,12,24]),
if (B.leave=0,B.away=[0]),
if (C.leave=1,C.away=[6,12,24]),
if (C.leave=0,C.away=[0])
;model:
U(A)= wait[-0.211]*wait[1,2,4,8,12,24] + failure[-0.099]*failure[1,5,10,30] + leave[0.592]*leaveA[1]
+ symp.dummy[-0.643|-2.484]*symp[1,2,0] + alone[-0.890]*alone[0,1] + away[-0.098]*awayA[6,12,24]/

U(B)= wait*wait + failure*failure + leave*leave[0,1] + symp*symp + alone*alone + away*away[0,6,12,24]/

U(C)= wait*wait + failure*failure + leave*leave + symp*symp + alone*alone + away*away$

Re: specifying number of times a level appears

PostPosted: Tue Oct 30, 2012 9:25 am
by johnr
Hi Kirsten

Unfortunately, the command to do this:

Prior[value] * attribute[lvl1, lvl2, vl3,... lvlk](# time lvl1 appears, # time level2 appears, # time lvl3 appears, ..., # time level k appears)

won't work in this instance. A work around to this problem would be to implement two separate designs with the constraints already embedded within the utility functions and then meld them. For example

Step 1: Set up a design a design with the first constraint already accounted for:

? step 1
design
;alts = A,B,C
;rows=12
;eff =(mnl,d)
;con
;model:
U(A)= wait[-0.211]*wait[1,2,4,8,12,24] + failure[-0.099]*failure[1,5,10,30] + leave[0.592]*leaveA[1]
+ symp.dummy[-0.643|-2.484]*symp[1,2,0] + alone[-0.890]*alone[0,1] + away[-0.098]*awayA[6,12,24]/
U(B)= wait*wait + failure*failure + leave*leaveb[1] + symp*symp + alone*alone + away*awayb[6,12,24]/
U(C)= wait*wait + failure*failure + leave*leavec[0] + symp*symp + alone*alone + away*awayc[0]$

Step 2: Set up a design a design with the second constraint already accounted for:

? step 2
design
;alts = A,B,C
;rows=12
;eff =(mnl,d)
;con
;model:
U(A)= wait[-0.211]*wait[1,2,4,8,12,24] + failure[-0.099]*failure[1,5,10,30] + leave[0.592]*leaveA[1]
+ symp.dummy[-0.643|-2.484]*symp[1,2,0] + alone[-0.890]*alone[0,1] + away[-0.098]*awayA[6,12,24]/
U(B)= wait*wait + failure*failure + leave*leaveB[0] + symp*symp + alone*alone + away*awayB[0]/
U(C)= wait*wait + failure*failure + leave*leavec[1] + symp*symp + alone*alone + away*awayc[6,12,24]$

Step 3. Copy and paste both designs from Ngene into Excel – stack them so that you have a single design with 24 tasks; Make sure you use the correct format used by Ngene to read designs.

Step 4: Create a new design syntax – same utility functions, etc. but with 24 tasks and now with a blocking column. Read in the saved 'merged' design into Ngene. In the new syntax, add the eval command and relate it to the merged design file.

design
;alts = A,B,C
;rows=24
;eff =(mnl,d)
;con
;eval = efficientdesign.xls
;block=2
;model:
U(A)= wait[-0.211]*wait[1,2,4,8,12,24] + failure[-0.099]*failure[1,5,10,30] + leave[0.592]*leaveA[1]
+ symp.dummy[-0.643|-2.484]*symp[1,2,0] + alone[-0.890]*alone[0,1] + away[-0.098]*awayA[6,12,24]/
U(B)= wait*wait + failure*failure + leave*leave[0,1] + symp*symp + alone*alone + away*away[0,6,12,24]/
U(C)= wait*wait + failure*failure + leave*leave + symp*symp + alone*alone + away*away$

This should give you a design with the correct level balance, however it will double the number of rows. The blocking column however will allow you to provide each respondent with the desired 12 rows however.

John