cannot replicate code in manual

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

cannot replicate code in manual

Postby hlsee » Tue Jun 16, 2020 12:04 pm

Hi,

I have the most recent version of Ngene, and all permanent setting is on default. I was trying to replicate the code on manual pp99 and 100, attached below. Ngene would continue to run forever and won't give me the result shown on the manual. These commands should take no time to run. Any advice is appreciated.

Design
;alts = alt1, alt2
;rows = 12
;eff = (mnl,d)
;model:
U(alt1) = b1[-0.2] + b2[1.2] * A[0,1,2] + b3[2.5] * B[0,1] /
U(alt2) = b2 * A + b4[1.1] * C[2,4,6,8]
$


Design
;alts = alt1, alt2
;rows = 12
;eff = (mnl,d)
;model:
U(alt1) = b1[-0.2] + b2[1.2] * A[0:2:1] + b3[2.5] * B[0:1:1] /
U(alt2) = b2 * A + b4[1.1] * C[2:8:2]
$
hlsee
 
Posts: 3
Joined: Mon Jun 15, 2020 8:54 am

Re: cannot replicate code in manual

Postby Michiel Bliemer » Tue Jun 16, 2020 1:00 pm

As mentioned in the manual, in generating an efficient design, Ngene will keep evaluating designs until the user stops the search process. There are typically millions/billions of designs and it is not possible to evaluate all designs, therefore Ngene simply keeps searching. For such a simple design, you can stop the search process after one minute or so. Note that there is not a single efficient design, so each time you run the syntax, a different design may be generated (wtih a similar efficiency).

So if Ngene is running and generating designs, this means that your syntax is correct. You can stop at any time and simply open the design with the best efficiency.

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

Re: cannot replicate code in manual

Postby hlsee » Tue Jun 16, 2020 2:02 pm

Thank you Michiel. I noticed the manual saying it but didn't realize that I needed to stop for this simple design. Stata and SAS (not used yet but heard) would stop automatically so I imagined I only need to hard stop for more complex designs. Thanks for your answer. I still like Ngene the most so far.
hlsee
 
Posts: 3
Joined: Mon Jun 15, 2020 8:54 am

Re: cannot replicate code in manual

Postby Michiel Bliemer » Tue Jun 16, 2020 4:06 pm

I am not sure what algorithms SAS and Stata use for efficient designs, but note that there are more than 1,000,000,000,000,000,000,000 possible designs using your first syntax. So even with a simple design there are many combinations and it is not possible to explore all of them (it would take years), so we decided to just let Ngene run. But you can also change the settings such that Ngene stops after a given stop criterion (e.g. number of evaluations, time elapsed since it found a better solution, etc).

The way I computed the above number:

There exist in total 72 possible choice tasks, you can check with the syntax below. Selecting 12 out of 72 can be done in 72*71*70*...*62 = 1.2064*10^20 possible ways.

Code: Select all
Design
;alts = alt1, alt2
;rows = all
;fact
;model:
U(alt1) = b1[-0.2] + b2[1.2] * A[0,1,2] + b3[2.5] * B[0,1] /
U(alt2) = b2 * A + b4[1.1] * C[2,4,6,8]
$
Michiel Bliemer
 
Posts: 1705
Joined: Tue Mar 31, 2009 4:13 pm

Re: cannot replicate code in manual

Postby hlsee » Wed Jun 17, 2020 12:57 am

Most helpful. Thanks Michiel.
hlsee
 
Posts: 3
Joined: Mon Jun 15, 2020 8:54 am


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 10 guests