Latent class model

310 views
Skip to first unread message

Ying Lu

unread,
Sep 7, 2019, 11:05:53 AM9/7/19
to Biogeme
Hi Prof. Bierlaire,

I am going to include socio-demographic variables into class membership model. However, I read several posts in this group and found out that it is not available to estimate a latent class choice model (including socio-demographics) with considering panel effects (https://groups.google.com/forum/#!searchin/biogeme/latent$20class$20model%7Csort:date/biogeme/3fwwvCjeI7o/kfYYsIAiFAAJ). 

Could I kindly know if you have a beta version of Biogeme which is able to include socio-demographics when estimating latent class choice model? Thank you!

Kind regards,
Ying 

Bierlaire Michel

unread,
Sep 7, 2019, 11:09:28 AM9/7/19
to luyi...@gmail.com, Bierlaire Michel, Biogeme
Dear Ying,

This feature has now been implemented. I should be able to release it soon. 

Meanwhile, you can always reorganize your data so that all the data for one individual are on the same row, and the observations across days on several columns. 

Michel



--
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/4e0bd595-f6ee-4453-a889-537ad0949469%40googlegroups.com.

Nughthoh Arfawi Kurdhi

unread,
Sep 13, 2019, 6:54:46 AM9/13/19
to Biogeme
Dear Prof.Bierlaire

I am a new user of Biogeme. 07discreteMixture.py is the example syntax for estimating latent class model. 
I have the following two questions:
1.   How to calculate the size of each class? (the number (percentage) of respondents on each class)
2.   Could we indentify individually which respondents in each class?
Thank you very much.

Best regards,
Arfa



Pada Sabtu, 07 September 2019 17.09.28 UTC+2, Bierlaire Michel menulis:
Dear Ying,

This feature has now been implemented. I should be able to release it soon. 

Meanwhile, you can always reorganize your data so that all the data for one individual are on the same row, and the observations across days on several columns. 

Michel


On 7 Sep 2019, at 12:21, Ying Lu <luyi...@gmail.com> wrote:

Hi Prof. Bierlaire,

I am going to include socio-demographic variables into class membership model. However, I read several posts in this group and found out that it is not available to estimate a latent class choice model (including socio-demographics) with considering panel effects (https://groups.google.com/forum/#!searchin/biogeme/latent$20class$20model%7Csort:date/biogeme/3fwwvCjeI7o/kfYYsIAiFAAJ). 

Could I kindly know if you have a beta version of Biogeme which is able to include socio-demographics when estimating latent class choice model? Thank you!

Kind regards,
Ying 

--
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 bio...@googlegroups.com.

Michel Bierlaire

unread,
Sep 13, 2019, 6:56:18 AM9/13/19
to ar...@mipa.uns.ac.id, Michel Bierlaire, Biogeme

On 13 Sep 2019, at 11:53, Nughthoh Arfawi Kurdhi <ar...@mipa.uns.ac.id> wrote:

Dear Prof.Bierlaire

I am a new user of Biogeme. 07discreteMixture.py is the example syntax for estimating latent class model. 
I have the following two questions:
1.   How to calculate the size of each class? (the number (percentage) of respondents on each class)

If you sum the class membership probability over the sample, you’ll have the expected number of people in each class. 
Divide by the total number to have the percentage.

2.   Could we indentify individually which respondents in each class?

No. Only the probability. This is why the class is latent.

Thank you very much.

Best regards,
Arfa



Pada Sabtu, 07 September 2019 17.09.28 UTC+2, Bierlaire Michel menulis:
Dear Ying,

This feature has now been implemented. I should be able to release it soon. 

Meanwhile, you can always reorganize your data so that all the data for one individual are on the same row, and the observations across days on several columns. 

Michel



On 7 Sep 2019, at 12:21, Ying Lu <luyi...@gmail.com> wrote:

Hi Prof. Bierlaire,

I am going to include socio-demographic variables into class membership model. However, I read several posts in this group and found out that it is not available to estimate a latent class choice model (including socio-demographics) with considering panel effects (https://groups.google.com/forum/#!searchin/biogeme/latent$20class$20model%7Csort:date/biogeme/3fwwvCjeI7o/kfYYsIAiFAAJ). 

Could I kindly know if you have a beta version of Biogeme which is able to include socio-demographics when estimating latent class choice model? Thank you!

Kind regards,
Ying 

--
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 bio...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/4e0bd595-f6ee-4453-a889-537ad0949469%40googlegroups.com.


--
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/912f59db-709f-4835-bbf5-b388b173ad36%40googlegroups.com.

Michel Bierlaire

unread,
Sep 17, 2019, 11:00:53 AM9/17/19
to Nughthoh Arfawi Kurdhi, Michel Bierlaire, Biogeme
If the class membership is fixed, this ius easy: 
class 1 : 25.1 % of the population
class 2: 74.9 % of the population. 

On 17 Sep 2019, at 12:25, Nughthoh Arfawi Kurdhi <ar...@mipa.uns.ac.id> wrote:

Dear Prof. Michel Bierlaire

Thank you for the answers. In the example 07discreteMixture.py the class membership model is
W_OTHER0.749

then we have
probClass1 = 0.251
probClass2 = 0.749
I still do not understand how to use this information to sum the class membership probability over the sample in order to ge the size of each class.
Thank you very much in advance.
Best regards
Arfa


Rim

unread,
Apr 4, 2021, 9:45:32 AM4/4/21
to Biogeme
Hello Prof. Bierlaire, and other members,

I have an additional question about the calculation of the membership probability.

If we are in a case similar to the one presented in 16panelDiscreteSocioEco  (but simpler with no random coefficients). So, we have sociodemographic variables influencing the probability of being in class 0 or class1.
How could we calculate the probabilities?

Thank you in advance for any help,
Rim
Reply all
Reply to author
Forward
0 new messages