creating categorical variables with biogeme

638 views
Skip to first unread message

manolisvergis

unread,
Feb 5, 2018, 4:14:39 PM2/5/18
to Biogeme
Hi everyone,

Is there anyway to create a categorical variable using the 'DefineVariable" command;

thanks in advance,

michel.b...@epfl.ch

unread,
Feb 9, 2018, 3:02:05 AM2/9/18
to Biogeme
Yes. The difference between a variable defined by DefineVariable and by a regular statement is that it is pre-processed and calculated once for all. If you have a model that takes a while to estimate, it may save a significant amount of time. 

manolisvergis

unread,
Mar 9, 2018, 4:17:28 AM3/9/18
to Biogeme

Bierlaire Michel

unread,
Mar 9, 2018, 4:21:04 AM3/9/18
to manoli...@gmail.com, Bierlaire Michel, Biogeme
Yes. Look at the definition of the variable CAR_AV_SP in this model

It is 1 if the car is available and the value of SP is not 0, and 0 otherwise. 

Another example is the definition of the trip purpose in this model

PurpHWH = DefineVariable('PurpHWH', TripPurpose == 1)
PurpOther = DefineVariable('PurpOther', TripPurpose != 1)



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

Reply all
Reply to author
Forward
0 new messages