Examples of the ICLV model with multiple latent variables

578 views
Skip to first unread message

Jay

unread,
Feb 28, 2019, 11:39:04 AM2/28/19
to Biogeme
Hello All,

I am struggling with developing the Integrated Choice and Latent Variable (ICLV) model through PandasBiogeme.

Although the website provides an example of this model, but there is only one latent variable. Also, it only includes the latent variable indirectly in the choice model.

Does anyone have an example (Python scripts) for the ICLV model with multiple latent variables, including them directly in the choice model? For example, U = Beta * X + Gamma * Z + e

Any suggestions, recommendations, examples would be welcome.

Thank you very much in advance.

Michel Bierlaire

unread,
Mar 1, 2019, 2:45:16 AM3/1/19
to urba...@tamu.edu, Michel Bierlaire, Biogeme
This example includes the latent variable in the choice model
BETA_TIME_PT = BETA_TIME_PT_REF * exp(BETA_TIME_PT_CL * CARLOVERS)
If you need another latent variable, just do the same: define the structural equation, the measurement equations, and include the latent variable wherever you want.

--
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 post to this group, send email to bio...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeme.
For more options, visit https://groups.google.com/d/optout.

Maximiliano Lizana

unread,
Feb 4, 2020, 12:32:32 PM2/4/20
to Biogeme
Hello,

Following the question of Jay, in particular, for a simple estimation with one latent variable and three indicators considering the original pandas biogeme's examples nomenclature, the latest part of the specification would consider:

condprob = models.logit(V,av,CHOICE)

condlike = P_Att1_1 * \
                 P_Att1_2 * \
                 P_Att1_3 * \
                 condprob
loglike = log(Integrate(condlike * density,'omega'))
biogeme  = bio.BIOGEME(database,loglike)

where P_att1_N are the probabilities of each indicator, V is the utility function,  av represents the availability and CHOICE is the Election 

So, If now I want to add a second latent variable with four indicators for example, how can I specify "condlike" and "loglike" sentences?

Any advice is welcome,

Maximiliano. 

La información contenida en este correo electrónico y cualquier anexo o respuesta relacionada, puede contener datos e información confidencial y no puede ser usada o difundida por personas distintas a su(s) destinatario(s). Si usted no es el destinatario de esta comunicación, le informamos que cualquier divulgación, distribución o copia de esta información constituye un delito conforme a la ley chilena. Si lo ha recibido por error, por favor borre el mensaje y todos sus anexos y notifique al remitente.

Michel Bierlaire

unread,
Feb 4, 2020, 12:39:00 PM2/4/20
to maximilia...@ufrontera.cl, Michel Bierlaire, Biogeme

On 4 Feb 2020, at 15:32, Maximiliano Lizana <maximilia...@ufrontera.cl> wrote:

Hello,

Following the question of Jay, in particular, for a simple estimation with one latent variable and three indicators considering the original pandas biogeme's examples nomenclature, the latest part of the specification would consider:

condprob = models.logit(V,av,CHOICE)

condlike = P_Att1_1 * \
                 P_Att1_2 * \
                 P_Att1_3 * \
                 condprob
loglike = log(Integrate(condlike * density,'omega'))
biogeme  = bio.BIOGEME(database,loglike)

where P_att1_N are the probabilities of each indicator, V is the utility function,  av represents the availability and CHOICE is the Election 

So, If now I want to add a second latent variable with four indicators for example, how can I specify "condlike" and "loglike" sentences?

condlike = P_Att1_1 * \
                 P_Att1_2 * \
                 P_Att1_3 * \      
                 P_Att2_1 * \      
                 P_Att2_2 * \      
                 P_Att2_3 * \      
                 P_Att2_4 * \      
                 condprob

For two LV, I’d suggest to use Monte-Carlo instead of numerical integration. 




Any advice is welcome,

Maximiliano. 

La información contenida en este correo electrónico y cualquier anexo o respuesta relacionada, puede contener datos e información confidencial y no puede ser usada o difundida por personas distintas a su(s) destinatario(s). Si usted no es el destinatario de esta comunicación, le informamos que cualquier divulgación, distribución o copia de esta información constituye un delito conforme a la ley chilena. Si lo ha recibido por error, por favor borre el mensaje y todos sus anexos y notifique al remitente.

--
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.

Maximiliano Lizana

unread,
Feb 8, 2020, 11:55:23 AM2/8/20
to Biogeme
Thank you for your help professor Bierlaire.

Best regards,



Maximiliano

Ali Karami

unread,
May 18, 2022, 10:15:53 AM5/18/22
to Biogeme
Dear Jay
Hope you be fine.
I faced the same problem. Could you tackle your problem with multi Latent Variables?
Could you please kindly share your code with me?
Thank you in advance.

Ashique Hussain

unread,
Jul 20, 2023, 3:46:15 PM7/20/23
to Biogeme
Hello everyone
I need ICLV data to model one latent variable. Can You help, please? 

Reply all
Reply to author
Forward
0 new messages