Page 1 of 1

Mean and variance of the log-normal WTP considering the complex heterogeneity structure of the coefficient, ex. ch. 6.1

Posted: 26 Aug 2020, 14:55
by Andy
Dear Stephane Hess,
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.
Is there an option to obtain the mean and variance of the VTT (the log-normal coefficient) using the Apollo package considering this complex heterogeneity structure?

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

Re: Mean and variance of the log-normal WTP considering the complex heterogeneity structure of the coefficient, ex. ch.

Posted: 07 Sep 2020, 11:12
by stephanehess
Hi Andy

the easiest thing to do here is to use the function apollo_unconditionals which returns the actual draws from the distribution for the parameter and then you can calculate means and standard deviations empirically from that. With a finite number of draws, these will differ slightly from the theoretical means and standard deviations (i.e. calculated analytically on the basis of the parameters of the distribution) but will be the ones actually used during the estimation

Best wishes

Stephane

Re: Mean and variance of the log-normal WTP considering the complex heterogeneity structure of the coefficient, ex. ch.

Posted: 08 Sep 2020, 15:00
by Andy
Dear Stephane,

great that Apollo provides these results. Thank you very much.

Best regards
Andy