Latent class model with weighted data

121 views
Skip to first unread message

Jingzhu Shan

unread,
Jun 25, 2022, 10:33:32 AM6/25/22
to Biogeme
Professor, can we do a latent class model with weighted data using Biogeme? If so, how can we do that? Thanks!

Jingzhu

Bierlaire Michel

unread,
Jun 25, 2022, 10:44:06 AM6/25/22
to jingz...@gmail.com, Bierlaire Michel, Biogeme

On 25 Jun 2022, at 10:53, Jingzhu Shan <jingz...@gmail.com> wrote:

Professor, can we do a latent class model with weighted data using Biogeme?

Yes.

If so, how can we do that?

Just define the weights, as in this example: http://biogeme.epfl.ch/examples/swissmetro/02weight.py

Thanks!

Jingzhu

--
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/6ee2a336-759c-4b58-9829-10b33c969e4an%40googlegroups.com.

Jingzhu Shan

unread,
Jun 29, 2022, 8:17:39 AM6/29/22
to Biogeme
Thanks professor! But I've tried to add weight in the latent class. It keeps remind me of error :" Biogeme exception: Null pointer: No data has been provided to the formula to obtain a value for variable COASTAL". The error massage did not appear when weight is not introduced into the model. I can not figure out why this situation happens. Could you please if there is anything wrong with my syntax? Thanks!
latentclass_model_20220629-1.py
Reply all
Reply to author
Forward
0 new messages