alternative to ;require if i use scenario

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

alternative to ;require if i use scenario

Postby Michael_D » Fri Dec 15, 2023 10:46 pm

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

Re: alternative to ;require if i use scenario

Postby Michiel Bliemer » Mon Dec 18, 2023 7:56 pm

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
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 56 guests