Dear David Palma,
I want to ask a question to your example incorporating random heterogeneity on p. 68 of the manual.
I was wondering how to calculate the mean and the standard deviation of the log-normal WTP for travel time and headway.
I guess for headway one can use the usual formulas (mean = exp(my+sigma^2/2), variance=exp(2*my+sigma^2)*(exp(sigma^2)-1)) but sigma in this case is sqrt((sigma_log(beta_VHV))^2+(sigma_log(beta_VHV,beta_VTT))^2) as both random variables e_hw,n and e_tt,n are standard normal distributed.
But I am struggling with the mean and variance of the log-normal VTT because of two reasons.
- A standard normal distribution and a chi-square distribution (squared standard normal) are added, and therefore, so I guess I cannot use the same procedure as for the headway WTP.
- The random term e_tt_nt for intra-individual heterogeneity varies across the observations of a person. I am wondering if it is relevant for calculating the mean and standard deviation of the log-normal WTP at all.
I have seen the code snippet in the answer of David Palma viewtopic.php?f=13&t=104&p=266&hilit=lognormal#p266 . But I guess this function uses the usual formulas I mentioned above because my and sigma are the only inputs.
I appreciate any help.
Kind regards
Andy Obermeyer