Page 1 of 1

Observed and unobserved heterogeneity

Posted: 12 Oct 2020, 05:18
by Wenjian
Hi Prof. Hess,

I try to implement a mixed logit model considering both observed and unobserved heterogeneity, but have a few confusions on the model specification.

I intend to specify the coefficient for a cost variable to be random but also relate to income (greater income, less sensitive to cost). So for the normal distribution, I have tried the following two specifications (1) and (2), and the model results prefer the first one. I am not sure whether this is dataset specific. Generally I feel the first specification is more intuitive, as it clearly shows that the importance of cost consists of one observed component linked to income and one purely random component.

(1) randcoeff[["rand_cost"]] = b_cost / income + sigma_cost * norm_draws

(2) randcoeff[["rand_cost"]] = (b_cost + sigma_cost * norm_draws)/ income

Similarly, for the lognormal distribution, we also have the following two:

(3) randcoeff[["rand_cost"]] = - exp(b_cost / income + sigma_cost * norm_draws)

(4) randcoeff[["rand_cost"]] = - exp(b_cost + sigma_cost * norm_draws) / income

Lastly, for the triangular distribution,

(5) randcoeff[["rand_cost"]] = a / income + b * (draws_u1 + draws_u2)

(6) randcoeff[["rand_cost"]] = a / income + b / income * (draws_u1 + draws_u2)

(7) randcoeff[["rand_cost"]] = [a + b * (draws_u1 + draws_u2)] / income

Thanks for your time and appreciate if you can help to clarify which one is the appropriate specification.

Best,
Wenjian

Re: Observed and unobserved heterogeneity

Posted: 12 Oct 2020, 08:04
by stephanehess
Wenjian

of course, I would strongly recommend against using a Normal distribution for a cost coefficient. That aside, I would also suggest not just dividing by cost as you're making the strong assumption about the income elasticity.

Instead, I would do something like this (with a negative lognormal here)

randcoeff[["rand_cost"]] = - exp(b_cost + sigma_cost * norm_draws) * (income/av_income)^lambda_income

where av_income is for normalisation and lambda_income is an estimated income elasticity.

See example 3 on the website for more details on this in an MNL context

Stephane

Re: Observed and unobserved heterogeneity

Posted: 19 Oct 2020, 04:56
by wj5tu
Hi Prof. Hess,

Thanks for your help! I found the estimated income elasticity to be highly insignificant. So I tried another specification by interacting cost coefficient with a high-income dummy.

randcoeff[["rand_cost"]] = - exp(b_cost + sigma_cost * norm_draws) * (delta * income_high + (1 - income_high)).

I actually have another question about using Johnson Sb distribution. Would you share your experience in setting the start values for a, b, mu, and sigma? I have played with a few start values, but they show very different results, and crazy estimates with NaN standard errors.

randcoeff[["rand_cost"]] = a + b / (1 + exp(-(mu + sigma * norm_draws))).

Best,
Wenjian

Re: Observed and unobserved heterogeneity

Posted: 21 Oct 2020, 18:10
by stephanehess
Hi Wenjian

yes, that specification is fine, though of course it's very subjective to decide what is high income.

Regarding Johnson SB, my personal experience is that this distribution is indeed quite unstable. The choice of starting parameters is very application specific, but one option could be to estimate a model with a Normal first, and let that help you decide about appropriate values for a and b, as well mu and sigma.

Stephane