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