Modified Federov algorithm

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Modified Federov algorithm

Postby nastay » Thu Mar 24, 2022 10:50 pm

Dear all,

I am doing an unlabelled design to elicit public preferences for treatments. I have 5 attributes with 3 levels and one attribute with 4 levels. If I run the following syntax without Modified Federov algorithm, Ngene won't be able to gernerate a design after 10 seconds. However, the syntax works well with mfederov algorithm.

1) Is it correct to run the syntax including mfederov algorithm without defining any condition?
2) I have used near zero values as I don't know the priors, but I expect preference order for some of the attributes. Can I still call near zero priors as 'non informative' priors?


[
Design
;alts = altA*, altB*
;rows = 36
;block = 4
;eff = (mnl, d)

;alg = mfederov

;model:
U(altA) = b1[0]
+ b2.dummy [0.0003|0.00015] * AGE[10,40,70]
+ b3.dummy [0.0004|0.0002] * LEUNTREAT[8,5,2]
+ b4.dummy[0|0] * QoL[50,75,90]
+ b5.dummy [0.0005|0.0002] * LETREAT[3,1,0.5]
+ b6.dummy[0|0] * DISTRIBUTION[1,3,2]
+ b7.dummy[0.0004|0.0002|0.0002] * RISK[1,2,3,4]
+ i1[0] * AGE * QoL
+ i2[0] * LEUNTREAT * QoL
+ i3[0] * LETREAT * QoL /

U(altB) = b2.dummy * AGE
+ b3.dummy * LEUNTREAT
+ b4.dummy * QoL
+ b5.dummy * LETREAT
+ b6.dummy * DISTRIBUTION
+ b7.dummy * RISK
+ i1 * AGE * QoL
+ i2 * LEUNTREAT * QoL
+ i3 * LETREAT * QoL

$
]

I appreciate your help.
Best, Nasrin
nastay
 
Posts: 16
Joined: Thu Nov 22, 2018 7:45 pm

Re: Modified Federov algorithm

Postby Michiel Bliemer » Fri Mar 25, 2022 8:22 am

The warning in Ngene gives a clue:

A valid initial random design could not be generated after approximately 10 seconds. In this time, of the 158799 attempts made, there were 0 row repetitions, 452 alternative repetitions, and 158347 cases of dominance.

In other words, using the default swapping algorithm it seems impossible to find a design where no choice task has a dominant alternative. The default swapping algorithm is a column based algorithm and cannot easily avoid dominant alternatives. Therefore, the manual suggests using the modified Federov algorithm when there are many constraints, including dominance constraints (set by the asterisk * after each alternative).

You have involved the modified Federov algorithm correctly, it does not need any further inputs and it defaults to a candidate set of 2000 choice tasks.

These are all noninformative priors: zero, near-zero (only indicating sign or preference order), or a Bayesian uniform distribution around zero. So your priors are still called noninformative. Informative priors will typically come from a pilot study or from the literature and have actually meaningful values.

What you need to think about is your interaction effects. You currently have specified AGE, LEUNTREAT, LETREAT, and QoL as dummy coded variables, each with three levels and therefore each has two variables in the utility function. However, in your interactions you do not use these dummy variables but rather you consider them as numerical variables. To capture all interactions properly you will need to use for example:

+ i11[0] * AGE.dummy[10] * QoL.dummy[50] + i12[0] * AGE.dummy[40] * QoL.dummy[50] + i13[0] * AGE.dummy[10] * QoL.dummy[75] + i14[0] * AGE.dummy[40] * QoL.dummy[75] + etc.

This puts a lot of emphasis on the interaction effects though, so your specification results in a simpler model as long as you realise that you are dummy coding AGE and QoL as a main effect while in the interaction effect you are using numerical coding, so you will need to be aware of this when you interpret the model parameters.

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

Re: Modified Federov algorithm

Postby nastay » Sat Mar 26, 2022 7:59 pm

Thank you so much Michiel.

So you recommend to properly define the interaction effect as follow:

[
Design
;alts = altA*, altB*
;rows = 36
;block = 4
;eff = (mnl, d)

;alg = mfederov

;model:
U(altA) = b1[0]
+ b2.dummy [0.0003|0.00015] * AGE[10,40,70]
+ b3.dummy [0.0004|0.0002] * LEUNTREAT[8,5,2]
+ b4.dummy[0|0] * QoL[50,75,90]
+ b5.dummy [0.0005|0.0002] * LETREAT[3,1,0.5]
+ b6.dummy[0|0] * DISTRIBUTION[1,3,2]
+ b7.dummy[0.0004|0.0002|0.0002] * RISK[1,2,3,4]
+ i1[0] * AGE.dummy[10] * QoL.dummy[50]
+ i2[0] * AGE.dummy[40] * QoL.dummy[50]
+ i3[0] * AGE.dummy[10] * QoL.dummy[75]
+ i4[0] * AGE.dummy[40] * QoL.dummy[75]
+ i5[0] * LEUNTREAT.dummy[8] * QoL.dummy[50]
+ i6[0] * LEUNTREAT.dummy[5] * QoL.dummy[50]
+ i7[0] * LEUNTREAT.dummy[8] * QoL.dummy[75]
+ i8[0] * LEUNTREAT.dummy[5] * QoL.dummy[75]
+ i9[0] * LETREAT.dummy[3] * QoL.dummy[50]
+ i10[0] * LETREAT.dummy[1] * QoL.dummy[50]
+ i11[0] * LETREAT.dummy[3] * QoL.dummy[75]
+ i12[0] * LETREAT.dummy[1] * QoL.dummy[75] /

U(altB) = b2.dummy * AGE
+ b3.dummy * LEUNTREAT
+ b4.dummy * QoL
+ b5.dummy * LETREAT
+ b6.dummy * DISTRIBUTION
+ b7.dummy * RISK
+ i1 * AGE.dummy[10] * QoL.dummy[50]
+ i2 * AGE.dummy[40] * QoL.dummy[50]
+ i3 * AGE.dummy[10] * QoL.dummy[75]
+ i4 * AGE.dummy[40] * QoL.dummy[75]
+ i5 * LEUNTREAT.dummy[8] * QoL.dummy[50]
+ i6 * LEUNTREAT.dummy[5] * QoL.dummy[50]
+ i7 * LEUNTREAT.dummy[8] * QoL.dummy[75]
+ i8 * LEUNTREAT.dummy[5] * QoL.dummy[75]
+ i9 * LETREAT.dummy[3] * QoL.dummy[50]
+ i10 * LETREAT.dummy[1] * QoL.dummy[50]
+ i11 * LETREAT.dummy[3] * QoL.dummy[75]
+ i12 * LETREAT.dummy[1] * QoL.dummy[75]

$
]

Thank you.
Nasrin
nastay
 
Posts: 16
Joined: Thu Nov 22, 2018 7:45 pm

Re: Modified Federov algorithm

Postby Michiel Bliemer » Sun Mar 27, 2022 7:54 am

That is the syntax you would want to use if you believe that all interaction interaction effects are important and need to be optimised on. Note that optimising for interaction effects comes at the cost of optimising for main effects and since the number of parameters of interaction effects is larger than the number of parameters for main effects, the optimisation of the D-error will mainly focus on interaction effects. I usually find main effects far more important to optimise on, so I would only include interaction effects that I absolutely want to include in model estimation.

If you are worried that some interaction effects cannot be estimated if you only optimise for estimating main effects, you can consider the syntax below. It optimises for a model with main effects only (modelA), but when you open the design you can inspect the D-error for a model with all interaction effects (modelB). If the D-error for modelB is finite then you can estimate all interaction effects with the design.

Code: Select all
Design
;alts(modelA) = altA*, altB*
;alts(modelB) = altA*, altB*
;rows = 36
;block = 4
;eff = modelA(mnl, d)

;alg = mfederov

;model(modelA):
U(altA) = b1[0]
+ b2.dummy [0.0003|0.00015] * AGE[10,40,70]
+ b3.dummy [0.0004|0.0002] * LEUNTREAT[8,5,2]
+ b4.dummy[0|0] * QoL[50,75,90]
+ b5.dummy [0.0005|0.0002] * LETREAT[3,1,0.5]
+ b6.dummy[0|0] * DISTRIBUTION[1,3,2]
+ b7.dummy[0.0004|0.0002|0.0002] * RISK[1,2,3,4] /

U(altB) = b2.dummy * AGE
+ b3.dummy * LEUNTREAT
+ b4.dummy * QoL
+ b5.dummy * LETREAT
+ b6.dummy * DISTRIBUTION
+ b7.dummy * RISK

;model(modelB):
U(altA) = b1[0]
+ b2.dummy [0.0003|0.00015] * AGE[10,40,70]
+ b3.dummy [0.0004|0.0002] * LEUNTREAT[8,5,2]
+ b4.dummy[0|0] * QoL[50,75,90]
+ b5.dummy [0.0005|0.0002] * LETREAT[3,1,0.5]
+ b6.dummy[0|0] * DISTRIBUTION[1,3,2]
+ b7.dummy[0.0004|0.0002|0.0002] * RISK[1,2,3,4]
+ i1[0] * AGE.dummy[10] * QoL.dummy[50]
+ i2[0] * AGE.dummy[40] * QoL.dummy[50]
+ i3[0] * AGE.dummy[10] * QoL.dummy[75]
+ i4[0] * AGE.dummy[40] * QoL.dummy[75]
+ i5[0] * LEUNTREAT.dummy[8] * QoL.dummy[50]
+ i6[0] * LEUNTREAT.dummy[5] * QoL.dummy[50]
+ i7[0] * LEUNTREAT.dummy[8] * QoL.dummy[75]
+ i8[0] * LEUNTREAT.dummy[5] * QoL.dummy[75]
+ i9[0] * LETREAT.dummy[3] * QoL.dummy[50]
+ i10[0] * LETREAT.dummy[1] * QoL.dummy[50]
+ i11[0] * LETREAT.dummy[3] * QoL.dummy[75]
+ i12[0] * LETREAT.dummy[1] * QoL.dummy[75] /

U(altB) = b2.dummy * AGE
+ b3.dummy * LEUNTREAT
+ b4.dummy * QoL
+ b5.dummy * LETREAT
+ b6.dummy * DISTRIBUTION
+ b7.dummy * RISK
+ i1 * AGE.dummy[10] * QoL.dummy[50]
+ i2 * AGE.dummy[40] * QoL.dummy[50]
+ i3 * AGE.dummy[10] * QoL.dummy[75]
+ i4 * AGE.dummy[40] * QoL.dummy[75]
+ i5 * LEUNTREAT.dummy[8] * QoL.dummy[50]
+ i6 * LEUNTREAT.dummy[5] * QoL.dummy[50]
+ i7 * LEUNTREAT.dummy[8] * QoL.dummy[75]
+ i8 * LEUNTREAT.dummy[5] * QoL.dummy[75]
+ i9 * LETREAT.dummy[3] * QoL.dummy[50]
+ i10 * LETREAT.dummy[1] * QoL.dummy[50]
+ i11 * LETREAT.dummy[3] * QoL.dummy[75]
+ i12 * LETREAT.dummy[1] * QoL.dummy[75]

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

Re: Modified Federov algorithm

Postby nastay » Mon Mar 28, 2022 5:49 pm

Dear Michiel,

Thank you so much for your feedback, which is very clear and helpfull :)

Best, Nasrin
nastay
 
Posts: 16
Joined: Thu Nov 22, 2018 7:45 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 18 guests

cron