Dear Michel,
Thank you for your advice. I saw monte-carlo examples on Biogeme website. I wrote my model based on
06normalMixture.py
and it sounds the problem has been solved, but I am not sure if I use
true syntax. May I ask you to take a look and tell me if I use wrong
syntax?
Thanks again,
Farnaz
omega = bioDraws('B_costs_RND')
B_costs_RND = B_costs + B_costs_s omega
choice=DefineVariable('choice', (ois==1) + (ois==0)*2 )
V1
= ASC1 + B_coe coe + B_aware1 aware1 + B_occu1 occu1 + B_OI OI +
B_costsale costsale coe + salesph B_salesph + B_costs_RND * costs
V2 = ASC2
V = {1: V1, 2: V2,}
av = {1: 1, 2: 1}
integrand = bioLogit(V, av, choice)
simulatedI = MonteCarlo(integrand)
rowIterator('obsIter')
BIOGEME_OBJECT.ESTIMATE = Sum(log(simulatedI),'obsIter')
BIOGEME_OBJECT.EXCLUDE = excluded
BIOGEME_OBJECT.STATISTICS['Num of individuals']=Sum(1,'obsIter')
BIOGEME_OBJECT.PARAMETERS['NbrOfDraws'] = "500"
BIOGEME_OBJECT.PARAMETERS['optimizationAlgorithm'] = "BIO"
BIOGEME_OBJECT.DRAWS = { 'B_costs_RND': ('NORMAL','ID')}