Can I use the numerical integration and Monte-Carlo integration together in panel data

39 views
Skip to first unread message

jianbiao wang

unread,
Aug 9, 2021, 3:57:08 AM8/9/21
to Biogeme
Dear Prof. Michel Bierlaire,

Is the following specification right?

This is the specification of random parameter of travel time:

B_TIME = Beta('B_TIME', 0, None, None, 0)   # the mean of parameter
B_TIME_S_o = Beta('B_TIME_S', 1, None, None, 0) # the s.t.d of parameter (varies across observation)
B_TIME_S_i = Beta('B_TIME_S', 1, None, None, 0) # the s.t.d of parameter (varies across individual)
omega = RandomVariable('omega') # variable for numerical integration 
density = dist.normalpdf(omega)
B_TIME_RND = B_TIME + B_TIME_S_o * omega + B_TIME_S_i * bioDraws('B_TIME_RND', 'NORMAL'))

The reason why I use this specification is that, I think the random parameter will not only varies across individual, but also will varies across observation, even though in the panel data. Then,  to obtain the probability (where B_TIME_S_o varies across observation, B_TIME_S_i  varies across individual)

condprob = models.logit(V, av, CHOICE)   # the chosen probability 
prob = Integrate(condprob * density, 'omega')  # integrate the probability with respect to 'omega' (across observation)

condprobIndiv = PanelLikelihoodTrajectory(prob)  #get the trajectory of each person
logprob = log(MonteCarlo(condprobIndiv))  #simulate the probability, the random parameter varies across individual

Is it correct in this way? If not, could you please tell me how to fix it? 

Thank you very much!

Best Regards,
WANG

 





Bierlaire Michel

unread,
Aug 9, 2021, 3:59:07 AM8/9/21
to wang.j...@d.mbox.nagoya-u.ac.jp, Bierlaire Michel, Biogeme
It looks correct. The best way to know is to try...

--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/403c3896-38da-4853-b63a-4f5abca51b65n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages