Rounding and attribute levels.

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Rounding and attribute levels.

Postby SimoneP86 » Tue Jun 11, 2024 7:01 pm

Hi All,
This is the first time that I write in this forum; I have discussed the issue with some colleagues and looked in the manual but was unable to find any explanation.
I have an efficient design for an MNL model with priors coming from a pilot, and I have a monetary attribute with 6 levels that is defined as such in the utility function: revenue[0.9:1.9:0.2] . The problem is that the level 1.9 does not appear at all in the design (other levels are quite balanced instead). I have tried to remove the constraints (even if I am confident they are properly written and should not be the cause) and nothing changes. As a check, I have tried to force attribute level balance including (6,6,6,6,6,6) after the text above (I have 36 cards), but I get a message that the I do not have 6 levels. Instead, if I write, for instance, revenue[0.9:1.901:0.2] , with the upper bond higher by 0.001, the level 1.9 appears in the design.
I suspect that this is due to some rounding issues caused by the binary way of thinking of the computer, so that 0.9+6*0.2 is slightly higher than 1.9. Could it be the case? Otherwise, how would you explain this? Suggestions are highly appreciated.
Thanks and all the best,
Simone
SimoneP86
 
Posts: 3
Joined: Tue Jun 11, 2024 12:50 am

Re: Rounding and attribute levels.

Postby Michiel Bliemer » Wed Jun 12, 2024 8:46 am

Hi Simone,

[0.9:1.9:0.2] should be the same as [0.9,1.1,1.3,1.5,1.7,1.9], so I would like to investigate what the issue could be. Given your testing, it may well be that the issue is indeed numerically in the internal calculations. Would you be able to share the Ngene script?

For now, the simple solution would be to use revenue[0.9,1.1,1.3,1.5,1.7,1.9], possibly combined with (6,6,6,6,6,6) although that is very restrictive and you may want to use (4-8,4-8,4-8,4-8,4-8,4-8) instead.

Best wishes,
Michiel
Michiel Bliemer
 
Posts: 1803
Joined: Tue Mar 31, 2009 4:13 pm

Re: Rounding and attribute levels.

Postby SimoneP86 » Thu Jun 13, 2024 1:10 am

Hi Michiel,
Thanks for your response. Indeed I did not think about listing the levels one by one, I used revenue[0.9:1.901:0.2], which resulted in all the 6 levels appearing in the design. But I can re-do it listing all the levels if this is not appropriate. I did not want to force attribute level balance, therefore I omitted (6,...): I had only included it as part of my checks to see what happened. Please see the design below (the priors come from our pilot).
Best,
Simone

?MNL model
Design
;alts = alt1, alt2, alt3
;rows = 36
;block = 6
;eff = (mnl,d)
;cond:
if(alt1.percent = 0.15, alt2.percent <=0.60),
if(alt1.percent = 0.30, alt2.percent <=0.75),
if(alt1.percent = 0.90, alt2.percent >=0.45),
if(alt1.percent = 0.75, alt2.percent >=0.30),
if(alt2.percent = 0.15, alt1.percent <=0.60),
if(alt2.percent = 0.30, alt1.percent <=0.75),
if(alt2.percent = 0.90, alt1.percent >=0.45),
if(alt2.percent = 0.75, alt1.percent >=0.30),
if(alt1.revenue = 0.9, alt2.revenue <=1.5),
if(alt1.revenue = 1.1, alt2.revenue <=1.7),
if(alt1.revenue = 1.9, alt2.revenue >=1.3),
if(alt1.revenue = 1.7, alt2.revenue >=1.1),
if(alt2.revenue = 0.9, alt1.revenue <=1.5),
if(alt2.revenue = 1.1, alt1.revenue <=1.7),
if(alt2.revenue = 1.9, alt1.revenue >=1.3),
if(alt2.revenue = 1.7, alt1.revenue >=1.1)

;model:
U(alt1) = b_plan[0.1656139] + b_legume.dummy[0.5170656|0.2035692|0.2035692] * legume[2,3,4,1] + b_percent[-1.053051] * percent[0.15:0.9:0.15]
+ b_sales.dummy[0.0804288|0.4546849] * sales[2,3,1] + b_conserv.dummy[0.3684585|0.220089] * conserv[2,3,1] + b_revenue[0.935774] * revenue[0.9:1.9:0.2] /
U(alt2) = b_plan + b_legume.dummy * legume + b_percent * percent + b_sales.dummy * sales + b_conserv.dummy * conserv + b_revenue * revenue
$
SimoneP86
 
Posts: 3
Joined: Tue Jun 11, 2024 12:50 am

Re: Rounding and attribute levels.

Postby Michiel Bliemer » Thu Jun 13, 2024 10:34 am

Hi Simone,

I can confirm your suspicion, the last level indeed is not generated when using 0.9:1.9:0.2. I generated a full factorial design with the script below and level 1.9 is not created. Oddly enough, using 0.8:1.8:0.2 DOES create all levels, including 1.8. I will report this bug to our team, thank you for finding this.

Code: Select all
Design
;alts = alt1, optout
;rows = all
;fact
;model:
U(alt1) = b_plan
        + b_legume.dummy[0|0|0] * legume[2,3,4,1]
        + b_percent[0]          * percent[0.15:0.9:0.15]
        + b_sales.dummy[0|0]    * sales[2,3,1]
        + b_conserv.dummy[0|0]  * conserv[2,3,1]
        + b_revenue[0]          * revenue[0.9:1.9:0.2]
$


For now, please write out all levels separately to resolve this issue.

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

Re: Rounding and attribute levels.

Postby SimoneP86 » Thu Jun 13, 2024 6:41 pm

Hi Michiel,
Thanks for your feedback. I have warned my colleagues who use Ngene, so that they also write all the levels if needed.
All the best,
Simone
SimoneP86
 
Posts: 3
Joined: Tue Jun 11, 2024 12:50 am


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 1 guest