Error when Using Nelder-Mead Algorithm

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Error when Using Nelder-Mead Algorithm

Postby acanakci » Mon Oct 21, 2024 7:45 pm

Why does the following line of code result in an error as the following? The same syntax runs smooth when I use mfederov algorithm.

Code: Select all
Error: The 'model' property contains an alternative with too many or too few '=' characters. 'u(alt1) = b1.dummy[0.00001] * guvenlikekipmani[0,1] + b2.dummy[0.00001] * havadurumu[0,1] + b3.dummy[-0.00001|-0.00001] * trafikYogunlugu[0,1,2] + b4.dummy[0.00001|0.00001] * sigorta[0,1,2] + b5.dummy[0.00001] * dolaptandolaba[0,1] + b6.dummy[0.00001|0.00001|-0.00001] * calismasaatleri[0,1,2,3] + b7.dummy[0.00001|0.00001|0.00001|0.00001] * bisikletyoluorani[0,1,2,3,4] + b8.dummy[-0.00001|-0.00001] * katedilenmesafe[0,1,2] + b9[0.00001] * toplamkazanc[50:200]u(alt2) = b1 * guvenlikekipmani + b2 * havadurumu + b3 * trafikYogunlugu + b4 * sigorta + b5 * dolaptandolaba + b6 * calismasaatleri + b7 * bisikletyoluorani + b8 * katedilenmesafe + b9 * toplamkazanc'

Code: Select all
Design
;alts = alt1*, alt2*
;rows = 100
;eff = (mnl, d)
;block = 20
;alg = neldermead(nointerim=0)
;model:
U(Alt1) = b1.dummy[0.00001] * GuvenlikEkipmani[0,1] +
          b2.dummy[0.00001] * HavaDurumu[0,1] +
          b3.dummy[-0.00001|-0.00001] * TrafikYogunlugu[0,1,2] +
          b4.dummy[0.00001|0.00001] * Sigorta[0,1,2] +
          b5.dummy[0.00001] * DolaptanDolaba[0,1] +
          b6.dummy[0.00001|0.00001|-0.00001] * CalismaSaatleri[0,1,2,3] +
          b7.dummy[0.00001|0.00001|0.00001|0.00001] * BisikletYoluOrani[0,1,2,3,4] +
          b8.dummy[-0.00001|-0.00001] * KatedilenMesafe[0,1,2] +
          b9[0.00001] * ToplamKazanc[50:200]

U(Alt2) = b1 * GuvenlikEkipmani +
          b2 * HavaDurumu +
          b3 * TrafikYogunlugu +
          b4 * Sigorta +
          b5 * DolaptanDolaba +
          b6 * CalismaSaatleri +
          b7 * BisikletYoluOrani +
          b8 * KatedilenMesafe +
          b9 * ToplamKazanc $
acanakci
 
Posts: 28
Joined: Tue Jun 11, 2024 11:55 pm

Re: Error when Using Nelder-Mead Algorithm

Postby NassarN » Mon Oct 21, 2024 9:02 pm

Hi

U(alt1) don't have the '/' command and the code is working quite fine when fixing this

Best
Nassar
NassarN
 
Posts: 8
Joined: Wed Feb 02, 2022 2:24 am


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 12 guests