Error componanets and random parameters in panel data mixed logit model

瀏覽次數:282 次
跳到第一則未讀訊息

benzvi...@gmail.com

未讀,
2021年1月27日 清晨5:38:122021/1/27
收件者:Biogeme

Dear Michel,
 I am running a mixed logit model for my panel data with five alternatives. 
I used random parameters on my ASC to capture serial correlation caused by the panel  nature of my data. 

Apart from that, I also included four error components to account for the 'cross nested'  nature of the alternatives (my model isn't a nested logit). 
I used this code for the error components:

SIGMA_SR = Beta('SIGMA_SR',0.1,-10,10,0)
SIGMA_SC = Beta('SIGMA_SC',0.1,-10,10,0)
SIGMA_LATE = Beta('SIGMA_LATE',0.1,-10,10,0)
SIGMA_EARLY = Beta('SIGMA_EARLY',0.1,-10,10,0)

EC_SC = SIGMA_SC * bioDraws('EC_SC','NORMAL')
EC_SR = SIGMA_SR * bioDraws('EC_SR','NORMAL')
EC_LATE = SIGMA_LATE * bioDraws('EC_LATE','NORMAL')
EC_EARLY = SIGMA_EARLY * bioDraws('EC_EARLY','NORMAL')

and this for the random parameters:

ASC_1SC = Beta('1SC',0,None,None,0)
ASC_2SC = Beta('2SC',0,None,None,0)
ASC_1SR = Beta('1SR',0,None,None,0)
ASC_2SR = Beta('2SR',0,None,None,0)
ASC_PT = Beta('PT',0,None,None,1)

ASC_1SC_S = Beta('ASC_1SC_S',1,None, None, 0)
ASC_2SC_S = Beta('ASC_2SC_S',1,None, None, 0)
ASC_1SR_S = Beta('ASC_1SR_S',1,None, None, 0)
ASC_2SR_S = Beta('ASC_2SR_S',1,None, None, 0)
ASC_PT_S = Beta('ASC_PT_S', 1, None, None, 0)

ASC_1SC_RND = ASC_1SC + ASC_1SC_S * bioDraws('ASC_1SC_RND''NORMAL_ANTI')
ASC_2SC_RND = ASC_2SC + ASC_2SC_S * bioDraws('ASC_2SC_RND''NORMAL_ANTI')
ASC_1SR_RND = ASC_1SR + ASC_1SR_S * bioDraws('ASC_1SR_RND''NORMAL_ANTI')
ASC_2SR_RND = ASC_2SR + ASC_2SR_S * bioDraws('ASC_2SR_RND''NORMAL_ANTI')
ASC_PT_RND = ASC_PT + ASC_PT_S * bioDraws('ASC_PT_RND''NORMAL_ANTI')

an example utility function to illustrate how I used the error components:
V1 = ASC_1SC_RND + \
B_payoffSC * payoff_lag_SCALED + \
B_expSC * experience + \
B_lateSC * late_SCALED+ \
B_avgcartimeSC * avgcartime_SCALED+ \
B_avgsharedSC * avgshared_SCALED2+ \
B_stickySC * stickySC+ \
EC_SC + EC_EARLY

My questions are:
1. Does it make sense to use both error components and random parameters this way?
2. Considering the number of alternatives, is there a limit to the number of random parameters/error components I can use ?

Thank you in advance,
Shelly



Bierlaire Michel

未讀,
2021年1月30日 清晨6:32:182021/1/30
收件者:benzvi...@gmail.com、Bierlaire Michel、Biogeme
See below. 
Well, I think so. One is designed to capture the correlation across alternatives. The other one is designed to capture the correlation across time. 
Now, depending on the specification and the data, you may have identification issues. 

I would try first a logit, with the panel effect, and include the nesting ECa afterwards.

2. Considering the number of alternatives, is there a limit to the number of random parameters/error components I can use ?

The limit is defined by the power of your computer and your patience. When the number of random variables is high, a Bayes estimation may be more efficient than maximum likelihood. 

Michel



Thank you in advance,
Shelly




--
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/e31712f2-09e6-468e-b534-a4688a063972n%40googlegroups.com.

Bierlaire Michel

未讀,
2021年2月7日 上午8:37:492021/2/7
收件者:Shelly Ben Zvi Etzioni、Bierlaire Michel、Biogeme


On 7 Feb 2021, at 09:10, Shelly Ben Zvi Etzioni <benzvi...@gmail.com> wrote:

Thank you very much professor, very helpful. I have another question.
It actually worked, but some of  the random parameters related to the ASC were insignificant.

It may happen when the number of draws is insufficient. 

My question is:
1. Do both error types (error components and random parameter) account for the agent effect of the panel data, or only the random parameters?

The error components do. They capture unobserved effects that are persistent over time. 
Random parameters capture unobserved taste heterogeneity. 

2. How do I interpret the random parameters? Why do some of them have negative signs? Should I ignore the signs? 

You mean the sign of the sigma? Yes, it is irrelevant. 

3.Is it correct to say that the larger the random parameter is, the taste variation of this mode is higher? 

Again, I assume that you refer to the sigma. Sigma square is the variance of the error parameter. So, the higher its absolute value, the higher the variance. 

4. And as for the interpretation of the nesting error components, the larger they are (regardless of sign) the stronger the correlation among those alternatives? 

Yes.




Thank you so much
Shelly

--



Shelly Ben Zvi Etzioni
Civil and Environmental Engineering
Technion, Haifa 32000, Israel



Shelly Ben Zvi Etzioni

未讀,
2021年2月7日 上午8:41:422021/2/7
收件者:Bierlaire Michel、Biogeme
Thank you so much! 

xinyu zuo

未讀,
2024年4月17日 清晨7:27:224月17日
收件者:Biogeme
Dear Professor Michel Bierlaire,
I have a similar issue and I want to use the mixture model for analysis. I want to use a nesting structure(but this is not a nested logit model) to observe the correlation of alternatives (divided into two nests (metro/nometro)) and to capture the taste heterogeneity of individual individuals in the sample for the i variable via random parameters.
My question is, how do I program the nesting structure? I've written the utility function below.

I'd appreciate your answers.
Good luck.
微信图片_20240417183532.jpg

Michel Bierlaire

未讀,
2024年4月17日 清晨7:30:444月17日
收件者:xinyuz...@gmail.com、Michel Bierlaire、Biogeme
Exactly as you write the equations:

ec = bioDraws('metro', NORMAL)
U_bm = ... + sigma_metro * ec
U_wm = ... + sigma_metro * ec



> On 17 Apr 2024, at 12:36, xinyu zuo <xinyuz...@gmail.com> wrote:
>
> Dear Professor Michel Bierlaire,
> I have a similar issue and I want to use the mixture model for analysis. I want to use a nesting structure(but this is not a nested logit model) to observe the correlation of alternatives (divided into two nests (metro/nometro)) and to capture the taste heterogeneity of individual individuals in the sample for the i variable via random parameters.
> My question is, how do I program the nesting structure? I've written the utility function below.
>
> I'd appreciate your answers.
> Good luck.<微信图片_20240417183532.jpg>
> To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/d51676c2-7148-4a99-b6b0-742315d35f06n%40googlegroups.com.
> <微信图片_20240417183532.jpg>

Michel Bierlaire
Transport and Mobility Laboratory
School of Architecture, Civil and Environmental Engineering
EPFL - Ecole Polytechnique Fédérale de Lausanne
http://transp-or.epfl.ch
http://people.epfl.ch/michel.bierlaire

Michel Bierlaire

未讀,
2024年4月17日 上午9:43:254月17日
收件者:xinyuz...@gmail.com、Michel Bierlaire、Biogeme
Yes, absolutely.

> On 17 Apr 2024, at 15:33, xinyuz...@gmail.com wrote:
>
> Thank you very much, Professor Michel Bierlaire!
> Can this method be considered "an error component mixed logit model"?
> and maybe I can solve the model with "logprob = log(MonteCarlo(prob))"?

Michel Bierlaire

未讀,
2024年5月10日 清晨5:27:255月10日
收件者:xinyuz...@gmail.com、Michel Bierlaire、Biogeme


> On 9 May 2024, at 10:43, xinyuz...@gmail.com wrote:
>
> Dear Professor Michel Bierlaire,
>
> Hope you're doing well. I'm sorry to bother you again.
>
> I have two questions: Firstly, according to your previous instructions, I obtained a result, but what frustrates me is that sigma_S_METRO is not a significant value. (What I don't understand is: in the nested logit model, MU is a significant value greater than 1. I incorporated the nesting structure into the mixture model, yet sigma_S_METRO is not significant.)
2024-05-09 164015.png
2024-05-09 164015.png
回覆所有人
回覆作者
轉寄
0 則新訊息