Latent Class Choice Model with pre-defined classes

121 views
Skip to first unread message

Ishant Sharma

unread,
May 19, 2022, 1:31:57 AM5/19/22
to Biogeme
Dear Professor Bierlaire, 

I am working on a latent class choice model (or integrated latent class and choice model). I went through the example scripts ( 15panelDiscrete.py,  16panelDiscreteSocioEco.py) and all previous queries related to latent class models (especially  Developing a latent class choice model in Biogeme (google.com)). 

I am using Likert scale-based psychometric indicators to identify the two latent classes ( in R package poLCA) and then, based on the maximum item response probability, assigning each individual to a particular class (1 or 2). 

Now I want to utilize these pre-defined classes instead of unknown W in the formulation: 

W = CLASS_CTE + CLASS_INC * INCOME 

PROB_class0 = models.logit({0: W, 1: 0}, None, 0) 

PROB_class1 = models.logit({0: W, 1: 0}, None, 1)

After that, I will use these probabilities with a binary logit choice model to estimate both class membership and choice model coefficients. 

I admit that using the following definition while using aggregate probability from the dataset is one way. However, then I would have no control over individuals and class membership equation based on sociodemographics. 

PROB_CLASS1 = Beta('PROB_CLASS1', 0.23, 0, 1, 1)

PROB_CLASS2 = Beta('PROB_CLASS2', 0.77, 0, 1, 1)

My question is: Is there a way of replacing "W" with a variable representing two classes in the dataset. The model would then be a mixture of two binary logit distributions.  

Please assist me with this issue and let me know if you have any questions.

Thanks, 

Ishant 


Bierlaire Michel

unread,
May 19, 2022, 1:46:17 AM5/19/22
to reachish...@gmail.com, Bierlaire Michel, Biogeme
The class membership model is a “structural equation”. It can depend on socio-economic characteristics. 

What you describe is a “measurement equation”, that provides the probability that an individual responds something on a likert scale, conditional to a class. This must be captured by an ordered logit or probit model. 

The likelihood function must involve both, as you observe the likert scale response and the choice. 

--
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/e7079244-3eb2-4293-962a-d6c0e617f035n%40googlegroups.com.

Ishant Sharma

unread,
May 19, 2022, 7:22:38 PM5/19/22
to Biogeme
Thanks for the swift response, Prof Bierlaire. 

I understood structural and measurement equation part performed as part of structural equation modeling (thanks to my experience in working with integrated choice and latent variable models).  However, my only doubt is how do we make latent variable categorical (to consider it as a class) as the structural equation modeling approach works well for continous latent variable. 
To make the scripting and estimation simple, I am wondering if there is a way to enter the latent class in the Biogeme script (replacing W) if we run measurement equation as part of data pre-processing to identify the classes. 

Bierlaire Michel

unread,
May 20, 2022, 3:00:42 AM5/20/22
to reachish...@gmail.com, Bierlaire Michel, Biogeme

On 19 May 2022, at 16:13, Ishant Sharma <reachish...@gmail.com> wrote:

Thanks for the swift response, Prof Bierlaire. 

I understood structural and measurement equation part performed as part of structural equation modeling (thanks to my experience in working with integrated choice and latent variable models).  However, my only doubt is how do we make latent variable categorical (to consider it as a class) as the structural equation modeling approach works well for continous latent variable.


There is no fundamental difference. You simply have a class membership model with discrete output. Typically, a logit. 

Reply all
Reply to author
Forward
0 new messages