alternative to ;require if i use scenario

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
Michael_D
Posts: 5
Joined: Wed Nov 15, 2023 5:16 pm

alternative to ;require if i use scenario

Post by Michael_D »

Hello everyone,

I use design with scenarios like:
....
;alg=mfederov
;require:
Alt1.B>Alt2.B
U(Alt1) = A[-0.6] * age[20,30,40,50]+B * income[1,2,3,4] /
U(Alt2) = A * age[age]+ B* income$

Now I like to program, that income in Alt1 is higher in each choice card than in Alt2. The require comand needs alg=mfederov, however, running the design results in an error that says mfederov is not suitable with scenarios.
Is there an other way to fix my problem?

Thank you!
Michael
Michiel Bliemer
Posts: 2055
Joined: Tue Mar 31, 2009 4:13 pm

Re: alternative to ;require if i use scenario

Post by Michiel Bliemer »

There is an easy fix.

For scenarios, you need to use:

;require:
alt1.age = alt2.age

You cannot use shortcut age[age] as this only works in the default swapping algorithm.

If you want alt1 income to be higher than in alt2, then you need:

;reject:
alt1.income < alt2.income

Note that the modified Federov algorithm ignores attribute level balance, so you may want to impose some attribute level constraints, such as B*income[1,2,3,4](4-6,4-6,4-6,4-6) if you want all levels to appear in each column a minimum of 4 times and a maximum of 6 times.

Michiel
Post Reply