Page 1 of 1

Differentiating Parameter Priors in Dummy Coded Variables

PostPosted: Tue Oct 13, 2020 10:49 pm
by bbryseck
I'm just starting out with NGene, so please forgive me if this has been asked, but is it possible to specify different priors for a dummy variable, or for effects coding?

For context:
I would like to understand which information types transit users most need to plan a journey. For simplicity sake, let's say that these information types (attributes) are fare, departure and arrival information. Fare information has two levels: No information given or exact fare information is given. Departure and arrival information have three levels: no information given, scheduled information is given, or live information is given.
No information given on an attribute would have less utility than at least some information given. So theoretically, 'no information given' would be negatively received and therefore have a negative prior while 'scheduled' and 'live' information would have positive priors. So in order of utility (least to greatest): No information < Scheduled information <= Live information

Translating this into NGene, would this then become the following (where in the dummy coding 0 indicates the level 'no information', 1 indicates 'live' info in the case of arrival and departure, or the most information in the case of fare, and 2 indicates 'scheduled' in the case of arrival and departure)?

Design
;alts = alt1*, alt2*, alt3*
;rows = 12
;eff = (mnl, d)
; model:
U(alt1) =
+ b2.dummy[-0.001] * fare[0,1]
+ b3.dummy[-0.001|0.001] * departure[0,1,2]
+ b4.dummy[-0.001|0.001] * arrival[0,1,2]
/
U(alt2) = b2.dummy*fare + b3.dummy*departure + b4.dummy*arrival /
U(alt3) = b2.dummy*fare + b3.dummy*departure + b4.dummy*arrival
$


Is it at all possible to specify a third parameter prior in a dummy coded variable with three attributes like above?

So in essence, the relationship is a bit like that of figure 7.11 in the Ngene User Manual p.112.

Re: Differentiating Parameter Priors in Dummy Coded Variable

PostPosted: Wed Oct 14, 2020 10:09 am
by Michiel Bliemer
Dummy and effects coding in Ngene works as follows:

... + coefficient.dummy[value_1|value_2|...|value_N] * attribute[1,2,3,...,N,0] + ...

where the last level (in this case, 0) is the base level, value_1 is the value attacted to level 1 relative to the base level, value_2 is the value attached to level 2 relative to the base level, etc.

So I believe that your syntax is correct, in your case level 2 is the base level.

Michiel

Re: Differentiating Parameter Priors in Dummy Coded Variable

PostPosted: Wed Oct 14, 2020 5:02 pm
by bbryseck
Many many thanks!